Class ConductorBlockInteractionBehavior

java.lang.Object
com.simibubi.create.api.behaviour.interaction.MovingInteractionBehaviour
com.simibubi.create.api.behaviour.interaction.ConductorBlockInteractionBehavior
Direct Known Subclasses:
ConductorBlockInteractionBehavior.BlazeBurner

public abstract class ConductorBlockInteractionBehavior extends MovingInteractionBehaviour
Partial interaction behavior implementation that allows blocks to act as conductors on trains, like Blaze Burners.
  • 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 removed
      blockStateSetter - 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:
      handlePlayerInteraction in class MovingInteractionBehaviour