Forgified Fabric API

Forgified Fabric API

13M Downloads

Interaction event is too late

Phoupraw opened this issue ยท 0 comments

commented

In fabric, AttackEntityCallback, AttackBlockCallback, UseBlockCallback, UseItemCallback, UseEntityCallback are invoked before client sends packet to server and the client is able to cancel the packet.

In forge, these events are invoked after the packet is sent, so client side only mod isn't able to cancel the event entirely: server side code is still executed, only client side code can be skipped.

https://github.com/Sinytra/ForgifiedFabricAPI/blob/1.21.1/fabric-events-interaction-v0/src/main/java/net/fabricmc/fabric/impl/event/interaction/InteractionEventHooks.java