1

Left click detection with stick command

Universal Mages 10/8/17 12:38 pm
2.2k
10/8/2017 4:29 pm
So I want to know what the command for detecting a player that punches with a stick and if yes then that would set a redstone block next to another command block which would throw an entity the direction that player is looking.
any help would be very... helpful... wow good job me at writing
Posted by
Universal Mages
Level 7 : Apprentice Miner
1

  Have something to say?

JoinSign in

1

Pepijn
10/08/2017 4:29 pm
Level 58 : Grandmaster Cyborg
Left click detection is pretty bad in Minecraft, you basically have to place an entity on the player and check when that entity gets damaged (but of course this interferes with a lot of other stuff that player can be doing, hence why it's such a "bad" solution).

About throwing an entity in the direction a player is looking, this is complicated as well (it might become easier in 1.13, but no certainty yet). It involves checking where the player is looking using rym=,ry= and then hardcoding the motion for each facing direction (the amount depending on how accurate you want it to be).
1

Welcome