Package com.hbm_m.compat
Class ContraptionDoorState
java.lang.Object
com.hbm_m.compat.ContraptionDoorState
Состояние HBM-дверей на Create-контрапшенах, синкаемое кастомным S2C-пакетом
(см.
DoorContraptionStatePacket). Намеренно ВНЕ зависимости от Create:
только vanilla-типы, чтобы core-блоки (DoorBlock, UniversalMachinePartBlock)
и DoorRenderer могли читать состояние без импорта Create.
Ключ — Level (по identity):
- коллизия: getCollisionShape получает
ContraptionWorld(сервер и клиент — разные экземпляры); - рендер: DoorRenderer читает состояние из
VirtualRenderWorld(клиент).
-
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.core.BlockPosgetControllerForPart(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos partPos) static booleangetOpen(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos controllerPos) Текущий open-таргет контроллера; если записи нет — fallback.static net.minecraft.world.phys.shapes.VoxelShapegetShape(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos) static booleanhasOpenEntry(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos controllerPos) static booleanisContraptionWorld(net.minecraft.world.level.Level level) static voidmarkContraptionWorld(net.minecraft.world.level.Level level) static voidsetOpen(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos controllerPos, boolean open) static voidsetPartController(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos partPos, net.minecraft.core.BlockPos controllerPos) static voidsetShape(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.phys.shapes.VoxelShape shape)
-
Method Details
-
markContraptionWorld
public static void markContraptionWorld(net.minecraft.world.level.Level level) -
isContraptionWorld
public static boolean isContraptionWorld(net.minecraft.world.level.Level level) -
setShape
public static void setShape(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.phys.shapes.VoxelShape shape) -
getShape
public static net.minecraft.world.phys.shapes.VoxelShape getShape(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos) -
setOpen
public static void setOpen(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos controllerPos, boolean open) -
getOpen
public static boolean getOpen(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos controllerPos) Текущий open-таргет контроллера; если записи нет — fallback. -
hasOpenEntry
public static boolean hasOpenEntry(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos controllerPos) -
setPartController
public static void setPartController(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos partPos, net.minecraft.core.BlockPos controllerPos) -
getControllerForPart
public static net.minecraft.core.BlockPos getControllerForPart(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos partPos)
-