Package dev.boze.api.interaction
Class PlaceInteraction
java.lang.Object
dev.boze.api.interaction.PlaceInteraction
- All Implemented Interfaces:
Interaction
,RotateInteraction
Place Interaction
Represents a place interaction with the server
-
Field Summary
-
Constructor Summary
ConstructorDescriptionPlaceInteraction
(Runnable callback, Rotation rotation, net.minecraft.util.math.BlockPos pos, net.minecraft.util.math.Direction direction, net.minecraft.util.Hand hand, boolean swing, int slot) Creates a new place interaction -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute()
Executes the interaction, then runs the callback - this is called by Boze, you shouldn't call this
-
Field Details
-
pos
public final net.minecraft.util.math.BlockPos pos -
direction
public final net.minecraft.util.math.Direction direction -
hand
public final net.minecraft.util.Hand hand -
swing
public final boolean swing -
slot
public final int slot
-
-
Constructor Details
-
PlaceInteraction
public PlaceInteraction(Runnable callback, Rotation rotation, net.minecraft.util.math.BlockPos pos, net.minecraft.util.math.Direction direction, net.minecraft.util.Hand hand, boolean swing, int slot) Creates a new place interaction- Parameters:
callback
- The callback to run when the interaction is executedrotation
- The rotation to rotate to, or null if no rotation is neededpos
- The position to place the block ondirection
- The direction to place the block onhand
- The hand to useswing
- Whether to swingslot
- The slot to use
-
-
Method Details
-
execute
public void execute()Executes the interaction, then runs the callback - this is called by Boze, you shouldn't call this- Specified by:
execute
in interfaceInteraction
-
getRotation
- Specified by:
getRotation
in interfaceRotateInteraction
- Returns:
- Rotation to rotate to
- See Also:
-