Class InteractionEvents
java.lang.Object
net.ixdarklord.coolcatcore.api.event.v2.common.InteractionEvents
A player using or attacking blocks, items and entities, before the game acts on it. These fire on both sides, once
for each hand tried; check
player.level().isClientSide(). To stop a use for good, answer the same on both
sides (the client otherwise still predicts it).-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA player starts hitting a block (the first click, not each tick of breaking it); interrupting stops it.static interfaceA player is about to attack an entity; interrupting stops the attack.static interfaceA player is about to use (right-click) a block, with whatever is in the hand.static interfaceA player is about to use (right-click) an entity.static interfaceA player is about to use (right-click) the item in a hand, aimed at no block or entity. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final EventInvoker<InteractionEvents.AttackBlock> static final EventInvoker<InteractionEvents.AttackEntity> static final EventInvoker<InteractionEvents.UseBlock> static final EventInvoker<InteractionEvents.UseEntity> static final EventInvoker<InteractionEvents.UseItem> -
Method Summary
-
Field Details
-
USE_BLOCK
-
USE_ITEM
-
USE_ENTITY
-
ATTACK_BLOCK
-
ATTACK_ENTITY
-