-
-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add some custom command argument types #834
Conversation
As a side note, I've tested this on the egg finder command and the clearGriffinBurrow command. Perhaps not exhaustively, but it's better than nothing. Also these argument types aren't registered to the map in |
Add some custom command argument types (cherry picked from commit 1d1cfea)
Added an
EggTypeArgumentType
for the egg finder's location sharing command (not that anyone would use it manually, but I just wanted to) andClientBlockPosArgumentType
because the one minecraft has (BlockPosArgumentType
) requires aServerCommandSource
, and since these are client-side commands we don't have an instance ofServerCommandSource
. That led to this monstrosity:So now you can do this:
or this for short:
I've updated the usages of
BlockPosArgumentType
to use the custom one instead. I've also noticed that the/skyblocker diana clearGriffinBurrow pos
command wasn't working due to incorrect class given as the argument to thecontext.getArgument
method, and fixed that along the way. Additionally, there are some minor code cleanups here and there.