Advertisement
supersaiyansubtlety

player-interact.zs

Feb 13th, 2020
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. import crafttweaker.event.PlayerInteractEvent;
  2.  
  3. events.onPlayerInteract(function(event as PlayerInteractEvent)
  4. {
  5. if (event.usingBlock) {return;}
  6. if (event.player.currentItem.definition.id == <minecraft:fire_charge>.definition.id)
  7. {
  8. print("fire charge used, not on a block!");
  9. /* val direction as
  10. eyeHeight
  11. heldEquipment
  12. rotationYaw
  13. rotationPitch
  14. lookingDirection */
  15. event.player.executeCommand("summon small_fireball ~ ~3 ~ {direction:[0.0,0.0,0.0],power:[0.1,0.0, 0.0]}");
  16. }
  17. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement