senseiwells / EssentialClient

EssentialClient is a client side mod originally forked from Carpet Client for 1.15.2 that implements new client side features
MIT License
77 stars 14 forks source link

Client.addCommand() #102

Closed JiangZeOvO closed 1 year ago

JiangZeOvO commented 1 year ago

parameter "arguments" Type inside Is there a "String" type Instead of "GreedyString" If you create an instruction with two "GreedyStrings", it will not work eg: image image "Item" will also match the parameters of "int" in it, resulting in that "int" has no parameters to use

JiangZeOvO commented 1 year ago

The first parameter is of GreedyString type, and all subsequent parameters cannot be matched

aria1th commented 1 year ago

Its vanilla behavior, since GreedyString is 'greedy' string that tries to get everything as string.

JiangZeOvO commented 1 year ago

What should I do if I just want him to match a string without greedy matching

senseiwells commented 1 year ago

You'd use "word", it only captures letters and stops after a space

senseiwells commented 1 year ago

But if you want an item (as your screenshot suggests) you can use other argument types, e.g. "itemstack". You can see the documentation: https://github.com/senseiwells/EssentialClient/blob/main/docs/Full.md#commandbuilderfrommapargumentmap

JiangZeOvO commented 1 year ago

What I need to deliver is the Chinese of the item