onPlayerInteractEvent should not be cancelling event during sneaking
bloodmc opened this issue ยท 1 comments
As discussed on IRC, cancelling the PlayerInteractEvent.RightClickBlock to avoid item activation is violating the event contract. The proper way to prevent a player from using the item in hand is to simply use the following code in your event handler
event.setItemResult(Result.DENY)
Javadocs explain it here
https://github.com/MinecraftForge/MinecraftForge/blob/1.11.x/src/main/java/net/minecraftforge/event/entity/player/PlayerInteractEvent.java#L189
Once this fix is added, SpongeForge should work properly with RFTools latest builds.