diff --git a/common/src/main/java/com/viaversion/viabackwards/api/rewriters/EntityRewriterBase.java b/common/src/main/java/com/viaversion/viabackwards/api/rewriters/EntityRewriterBase.java index 152d004b..cdb632ff 100644 --- a/common/src/main/java/com/viaversion/viabackwards/api/rewriters/EntityRewriterBase.java +++ b/common/src/main/java/com/viaversion/viabackwards/api/rewriters/EntityRewriterBase.java @@ -177,18 +177,24 @@ public abstract class EntityRewriterBase { MetaType type = meta.metaType(); if (type == itemType) { protocol.getItemRewriter().handleItemToClient(meta.value()); - } else if (type == blockType) { + } else if (type == blockStateType) { int data = meta.value(); meta.setValue(protocol.getMappingData().getNewBlockStateId(data)); + } else if (type == optionalBlockStateType) { + int data = meta.value(); + if (data != 0) { + meta.setValue(protocol.getMappingData().getNewBlockStateId(data)); + } } else if (type == particleType) { rewriteParticle(meta.value()); } else if (type == optionalComponentType || type == componentType) { diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_13_2to1_14/packets/EntityPackets1_14.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_13_2to1_14/packets/EntityPackets1_14.java index 71a1457b..712eb3ac 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_13_2to1_14/packets/EntityPackets1_14.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_13_2to1_14/packets/EntityPackets1_14.java @@ -348,8 +348,8 @@ public class EntityPackets1_14 extends LegacyEntityRewriter { final int data = (int) meta.getValue(); diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_19_1to1_19_3/packets/EntityPackets1_19_3.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_19_1to1_19_3/packets/EntityPackets1_19_3.java index d26989f3..d73e417a 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_19_1to1_19_3/packets/EntityPackets1_19_3.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_19_1to1_19_3/packets/EntityPackets1_19_3.java @@ -230,8 +230,8 @@ public final class EntityPackets1_19_3 extends EntityRewriter { // Sitting pose added diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_19_3to1_19_4/packets/EntityPackets1_19_4.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_19_3to1_19_4/packets/EntityPackets1_19_4.java index 7f31bb59..9db1c37b 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_19_3to1_19_4/packets/EntityPackets1_19_4.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_19_3to1_19_4/packets/EntityPackets1_19_4.java @@ -143,8 +143,8 @@ public final class EntityPackets1_19_4 extends EntityRewriter { final int blockState = meta.value(); diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_19_4to1_20/packets/EntityPackets1_20.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_19_4to1_20/packets/EntityPackets1_20.java index e0b2a633..bb71e4b9 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_19_4to1_20/packets/EntityPackets1_20.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_19_4to1_20/packets/EntityPackets1_20.java @@ -90,8 +90,8 @@ public final class EntityPackets1_20 extends EntityRewriter meta.setMetaType(Types1_19_4.META_TYPES.byId(meta.metaType().typeId()))); - registerMetaTypeHandler(Types1_19_4.META_TYPES.itemType, Types1_19_4.META_TYPES.blockStateType, - Types1_19_4.META_TYPES.particleType, Types1_19_4.META_TYPES.optionalComponentType, Types1_19_4.META_TYPES.componentType); + registerMetaTypeHandler(Types1_19_4.META_TYPES.itemType, Types1_19_4.META_TYPES.blockStateType, Types1_19_4.META_TYPES.optionalBlockStateType, + Types1_19_4.META_TYPES.particleType, Types1_19_4.META_TYPES.componentType, Types1_19_4.META_TYPES.optionalComponentType); filter().filterFamily(Entity1_19_4Types.MINECART_ABSTRACT).index(11).handler((event, meta) -> { final int blockState = meta.value();