Porting to 1.9 - PlayerInteractEvent

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

VictiniX888

New Member
Jul 29, 2019
285
-2
0
So there were a lot of changes made to PlayerInteractEvent.

https://github.com/VictiniX888/JARM...nix/jarm/events/EventWandMalfunction.java#L18

So in the above line I am checking for whether the player is left-clicking. However, "event.action" doesn't exist anymore. "PlayerInteractEvent.Action.LEFT_CLICK_BLOCK" is also gone. I found "PlayerInteractEvent.LeftClickBlock" but that seems to be a method, should I be using that?
Can anyone tell me what I should replace them with? Thanks in advance
 

UberAffe

New Member
Jul 29, 2019
143
0
0
PlayerInteractEvent is a Base event now, if you want to do something on left click you would have an event handler for LeftClickBlock which extends PlayerInteractEvent.

If you go to the declaration of PlayerInteractEvent you can see all of its extended classes inside that file.
 

SatanicSanta

New Member
Jul 29, 2019
4,849
-3
0
PlayerInteractEvent is a Base event now, if you want to do something on left click you would have an event handler for LeftClickBlock which extends PlayerInteractEvent.

If you go to the declaration of PlayerInteractEvent you can see all of its extended classes inside that file.
I love this and I love you for saying this.
 
  • Like
Reactions: UberAffe