Class MovingInteractionBehaviour
java.lang.Object
com.simibubi.create.api.behaviour.interaction.MovingInteractionBehaviour
- Direct Known Subclasses:
ConductorBlockInteractionBehavior,ContraptionControlsMovingInteraction,ControlsInteractionBehaviour,DeployerMovingInteraction,MountedDepotInteractionBehaviour,SeatInteractionBehaviour,SimpleBlockMovingInteraction
MovingInteractionBehaviors define behavior of blocks on contraptions
when interacted with by players or collided with by entities.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SimpleRegistry<net.minecraft.world.level.block.Block, MovingInteractionBehaviour> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleEntityCollision(net.minecraft.world.entity.Entity entity, net.minecraft.core.BlockPos localPos, AbstractContraptionEntity contraptionEntity) booleanhandlePlayerInteraction(net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand activeHand, net.minecraft.core.BlockPos localPos, AbstractContraptionEntity contraptionEntity) 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.protected voidsetContraptionActorData(AbstractContraptionEntity contraptionEntity, int index, net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo info, MovementContext ctx) protected voidsetContraptionBlockData(AbstractContraptionEntity contraptionEntity, net.minecraft.core.BlockPos pos, net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo info)
-
Field Details
-
REGISTRY
public static final SimpleRegistry<net.minecraft.world.level.block.Block,MovingInteractionBehaviour> REGISTRY
-
-
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)
-