Class ConductorBlockInteractionBehavior
java.lang.Object
com.simibubi.create.api.behaviour.interaction.MovingInteractionBehaviour
com.simibubi.create.api.behaviour.interaction.ConductorBlockInteractionBehavior
- Direct Known Subclasses:
ConductorBlockInteractionBehavior.BlazeBurner
Partial interaction behavior implementation that allows blocks to act as conductors on trains, like Blaze Burners.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classImplementation used for Blaze Burners. -
Field Summary
Fields inherited from class com.simibubi.create.api.behaviour.interaction.MovingInteractionBehaviour
REGISTRY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanhandlePlayerInteraction(net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand activeHand, net.minecraft.core.BlockPos localPos, AbstractContraptionEntity contraptionEntity) abstract booleanisValidConductor(net.minecraft.world.level.block.state.BlockState state) Check if the given state is capable of being a conductor.protected voidonScheduleUpdate(boolean hasSchedule, net.minecraft.world.level.block.state.BlockState currentBlockState, Consumer<net.minecraft.world.level.block.state.BlockState> blockStateSetter) Called when the conductor's schedule has changed.Methods inherited from class com.simibubi.create.api.behaviour.interaction.MovingInteractionBehaviour
handleEntityCollision, interactionBehaviour, setContraptionActorData, setContraptionBlockData
-
Constructor Details
-
ConductorBlockInteractionBehavior
public ConductorBlockInteractionBehavior()
-
-
Method Details
-
isValidConductor
public abstract boolean isValidConductor(net.minecraft.world.level.block.state.BlockState state) Check if the given state is capable of being a conductor. -
onScheduleUpdate
protected void onScheduleUpdate(boolean hasSchedule, net.minecraft.world.level.block.state.BlockState currentBlockState, Consumer<net.minecraft.world.level.block.state.BlockState> blockStateSetter) Called when the conductor's schedule has changed.- Parameters:
hasSchedule- true if the schedule was set, false if it was removedblockStateSetter- a consumer that will change the BlockState of this conductor on the contraption
-
handlePlayerInteraction
public final boolean handlePlayerInteraction(net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand activeHand, net.minecraft.core.BlockPos localPos, AbstractContraptionEntity contraptionEntity) - Overrides:
handlePlayerInteractionin classMovingInteractionBehaviour
-