Class MovingInteractionBehaviour

java.lang.Object
com.simibubi.create.api.behaviour.interaction.MovingInteractionBehaviour
Direct Known Subclasses:
ConductorBlockInteractionBehavior, ContraptionControlsMovingInteraction, ControlsInteractionBehaviour, DeployerMovingInteraction, MountedDepotInteractionBehaviour, SeatInteractionBehaviour, SimpleBlockMovingInteraction

public abstract class MovingInteractionBehaviour extends Object
MovingInteractionBehaviors define behavior of blocks on contraptions when interacted with by players or collided with by entities.
  • Field Details

  • Constructor Details

    • MovingInteractionBehaviour

      public MovingInteractionBehaviour()
  • Method Details

    • interactionBehaviour

      public static <B extends net.minecraft.world.level.block.Block> com.tterrag.registrate.util.nullness.NonNullConsumer<? super B> interactionBehaviour(MovingInteractionBehaviour behaviour)
      Creates a consumer that will register a behavior to a block. Useful for Registrate.
    • setContraptionActorData

      protected void setContraptionActorData(AbstractContraptionEntity contraptionEntity, int index, net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo info, MovementContext ctx)
    • setContraptionBlockData

      protected void setContraptionBlockData(AbstractContraptionEntity contraptionEntity, net.minecraft.core.BlockPos pos, net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo info)
    • handlePlayerInteraction

      public boolean handlePlayerInteraction(net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand activeHand, net.minecraft.core.BlockPos localPos, AbstractContraptionEntity contraptionEntity)
    • handleEntityCollision

      public void handleEntityCollision(net.minecraft.world.entity.Entity entity, net.minecraft.core.BlockPos localPos, AbstractContraptionEntity contraptionEntity)