From 23f776a6ee2da6f24bc432c797a3868888cebe82 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Fri, 11 Aug 2023 21:12:23 +1000 Subject: [PATCH] Handle minecart blocks --- .../rewriter/EntityPacketRewriter1_20_2.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_20_2to1_20/rewriter/EntityPacketRewriter1_20_2.java b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_20_2to1_20/rewriter/EntityPacketRewriter1_20_2.java index 460afff2b..1d6f5291a 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_20_2to1_20/rewriter/EntityPacketRewriter1_20_2.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/protocol1_20_2to1_20/rewriter/EntityPacketRewriter1_20_2.java @@ -146,7 +146,13 @@ public final class EntityPacketRewriter1_20_2 extends EntityRewriter meta.setMetaType(Types1_20_2.META_TYPES.byId(meta.metaType().typeId()))); registerMetaTypeHandler(null, Types1_20_2.META_TYPES.blockStateType, Types1_20_2.META_TYPES.optionalBlockStateType, Types1_20_2.META_TYPES.particleType); + filter().filterFamily(Entity1_19_4Types.DISPLAY).addIndex(10); + + filter().filterFamily(Entity1_19_4Types.MINECART_ABSTRACT).index(11).handler((event, meta) -> { + final int blockState = meta.value(); + meta.setValue(protocol.getMappingData().getNewBlockStateId(blockState)); + }); } @Override