Contents
Class UseBlockEvent
java.lang.Object
com.hypixel.hytale.component.system.EcsEvent
com.hypixel.hytale.server.core.event.events.ecs.UseBlockEvent
- Direct Known Subclasses:
UseBlockEvent.Post, UseBlockEvent.Pre
An event that is called when an entity interacts with a block in the world.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classAn event that is called after an entity interacts with a block in the world.static final classAn event that is called before an entity interacts with a block in the world. -
Constructor Summary
ConstructorsConstructorDescriptionUseBlockEvent(InteractionType interactionType, InteractionContext context, org.joml.Vector3i targetBlock, BlockType blockType) Default Constructor for aUseBlockEventinstance. -
Method Summary
Modifier and TypeMethodDescriptionorg.joml.Vector3i
-
Constructor Details
-
UseBlockEvent
public UseBlockEvent(@Nonnull InteractionType interactionType, @Nonnull InteractionContext context, @Nonnull org.joml.Vector3i targetBlock, @Nonnull BlockType blockType) Default Constructor for aUseBlockEventinstance.- Parameters:
interactionType- The type of interaction being performed.context- The context of the interaction.targetBlock- The position of the block being interacted with.blockType- TheBlockTypeof the block being interacted with.
-
-
Method Details
-
getInteractionType
- Returns:
- the type of interaction being performed.
-
getContext
- Returns:
- the context of the interaction.
-
getTargetBlock
@Nonnull public org.joml.Vector3i getTargetBlock()- Returns:
- the position of the block being broken.
-
getBlockType
-