CottonMC / ClientCommands

A Minecraft mod that adds support for client-side commands.
MIT License
21 stars 7 forks source link

Use minecraft argument types #10

Closed NAHFE closed 4 years ago

NAHFE commented 4 years ago

How do i I use for example "EntityArgumentType" as argument?

Juuxel commented 4 years ago

You can use them in the same way as with normal commands. There are four different entity argument types:

Then you can do the normal ArgumentBuilders.argument(<your argument name>, EntityArgumentType.entity() /* or one of those others */).

Edit: the player ones will not work with client-side commands as they provide ServerPlayerEntitys. The entity ones also need a server-side command source, which CCC can't provide. You'll need your own alternative, sorry.