Class PlaceInteraction

java.lang.Object
dev.boze.api.interaction.PlaceInteraction
All Implemented Interfaces:
Interaction, RotateInteraction

public class PlaceInteraction extends Object implements RotateInteraction
Place Interaction Represents a place interaction with the server
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final net.minecraft.util.math.Direction
     
    final net.minecraft.util.Hand
     
    final net.minecraft.util.math.BlockPos
     
    final int
     
    final boolean
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    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
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Executes the interaction, then runs the callback - this is called by Boze, you shouldn't call this
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 executed
      rotation - The rotation to rotate to, or null if no rotation is needed
      pos - The position to place the block on
      direction - The direction to place the block on
      hand - The hand to use
      swing - Whether to swing
      slot - 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 interface Interaction
    • getRotation

      public Rotation getRotation()
      Specified by:
      getRotation in interface RotateInteraction
      Returns:
      Rotation to rotate to
      See Also: