-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Path command extension #96
base: master
Are you sure you want to change the base?
Conversation
@@ -25,6 +25,11 @@ public BlockInteractEventImpl() { | |||
*/ | |||
@Override | |||
public InteractionResult interact(Player player, Level world, InteractionHand hand, BlockHitResult blockHitResult) { | |||
return BlockEvent.onBlockInteract(player, world, blockHitResult.getBlockPos()); | |||
// check in if clause prevents crash (check for server side) on clients | |||
// and prevents executing event handler twice (check for main hand) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just minor clarification: as player's npc will be null on client, it won't crash (at least it shouldn't :) ).
However, it will still double trigger (& it's clearer to check the side than relying on nulls).
Hi, thanks again! |
Hi samolego!
I've extended the path command with a few useful features which ease access for users who want to change the path easily via commands and not in an interactive manner. (For example I use this for automatic and dynamic changes of my Taterzen NPCs ingame.)
It is actually possible to mix both editing modes, i.e. you can enter the interactive editor and still use only commands for editing, but will get visual feedback (e.g. you add a node via commandline and the redstone block appears in the world accordingly).
I have also extended the documentation accordingly. See docs/getting_started/path.md.
Best regards
Zacrain