Package com.hbm_m.network
Class DoorContraptionStatePacket
java.lang.Object
com.hbm_m.network.DoorContraptionStatePacket
- All Implemented Interfaces:
S2CPacket
S2C-пакет: открыть/закрыть HBM-дверь на Create-контрапшене.
Замена blockstate-flip'у (который триггерил resetClientContraption и
сносил клиент-BE/звук). Серверный HbmDoorMovementBehaviour.doToggle
обновляет серверный кэш + шлёт этот пакет; клиентский хендлер populate кэш
(ContraptionWorld + VirtualRenderWorld) + invalidateColliders.
Поля: entityId контрапшен-сущности, controllerLocalPos, doorDeclId, facing, open. Никаких blockstate-изменений → ноль resetClientContraption.
-
Constructor Summary
ConstructorsConstructorDescriptionDoorContraptionStatePacket(int entityId, net.minecraft.core.BlockPos controllerLocalPos, String doorDeclId, net.minecraft.core.Direction facing, boolean open) -
Method Summary
Modifier and TypeMethodDescriptionstatic DoorContraptionStatePacketdecode(net.minecraft.network.FriendlyByteBuf buf) static voidhandle(DoorContraptionStatePacket msg, dev.architectury.networking.NetworkManager.PacketContext context) static voidsendToNear(net.minecraft.server.level.ServerLevel level, net.minecraft.world.phys.Vec3 pos, int entityId, net.minecraft.core.BlockPos controllerLocalPos, String doorDeclId, net.minecraft.core.Direction facing, boolean open) voidwrite(net.minecraft.network.FriendlyByteBuf buf)
-
Constructor Details
-
DoorContraptionStatePacket
public DoorContraptionStatePacket(int entityId, net.minecraft.core.BlockPos controllerLocalPos, String doorDeclId, net.minecraft.core.Direction facing, boolean open)
-
-
Method Details
-
decode
-
write
public void write(net.minecraft.network.FriendlyByteBuf buf) -
handle
public static void handle(DoorContraptionStatePacket msg, dev.architectury.networking.NetworkManager.PacketContext context) -
sendToNear
public static void sendToNear(net.minecraft.server.level.ServerLevel level, net.minecraft.world.phys.Vec3 pos, int entityId, net.minecraft.core.BlockPos controllerLocalPos, String doorDeclId, net.minecraft.core.Direction facing, boolean open)
-