Package com.hbm_m.compat.create
Class HbmDoorPartInteractionBehaviour
java.lang.Object
com.simibubi.create.api.behaviour.interaction.MovingInteractionBehaviour
com.hbm_m.compat.create.HbmDoorPartInteractionBehaviour
public class HbmDoorPartInteractionBehaviour
extends com.simibubi.create.api.behaviour.interaction.MovingInteractionBehaviour
Right-click по блоку-ЧАСТИ двери (UniversalMachinePartBlock) на собранном поезде.
На земле UniversalMachinePartBlock.use роутит клик на контроллер через
getControllerPos(). На контрапшене NBT-координаты контроллера — мировые, а
blocks-map ключируется локальными позициями, поэтому прямой роутинг не работает.
Контроллер достаётся из кэша ContraptionDoorState.getControllerForPart(net.minecraft.world.level.Level, net.minecraft.core.BlockPos),
который наполняет DoorShapeComputer.populate на каждом тике behaviour; если
записи ещё нет (дверь не успела тикнуть после сборки) — клик игнорируем, на следующем
тике повторим.
Не-дверные parts (radar/launchpad/…) → в кэше отсутствуют → возвращаем false (клик не поглощаем).
-
Field Summary
Fields inherited from class com.simibubi.create.api.behaviour.interaction.MovingInteractionBehaviour
REGISTRY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanhandlePlayerInteraction(net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand activeHand, net.minecraft.core.BlockPos partLocalPos, com.simibubi.create.content.contraptions.AbstractContraptionEntity contraptionEntity) Methods inherited from class com.simibubi.create.api.behaviour.interaction.MovingInteractionBehaviour
handleEntityCollision, interactionBehaviour, setContraptionActorData, setContraptionBlockData
-
Constructor Details
-
HbmDoorPartInteractionBehaviour
public HbmDoorPartInteractionBehaviour()
-
-
Method Details
-
handlePlayerInteraction
public boolean handlePlayerInteraction(net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand activeHand, net.minecraft.core.BlockPos partLocalPos, com.simibubi.create.content.contraptions.AbstractContraptionEntity contraptionEntity) - Overrides:
handlePlayerInteractionin classcom.simibubi.create.api.behaviour.interaction.MovingInteractionBehaviour
-