diff --git a/common/src/main/java/com/viaversion/viabackwards/api/rewriters/EntityRewriter.java b/common/src/main/java/com/viaversion/viabackwards/api/rewriters/EntityRewriter.java index dd193c14..ba5487e2 100644 --- a/common/src/main/java/com/viaversion/viabackwards/api/rewriters/EntityRewriter.java +++ b/common/src/main/java/com/viaversion/viabackwards/api/rewriters/EntityRewriter.java @@ -140,6 +140,7 @@ public abstract class EntityRewriter addTrackedEntity(wrapper, wrapper.get(Types.VAR_INT, 0), objectTypeFromId(wrapper.get(Types.BYTE, 0))); + return wrapper -> { + EntityType type = objectTypeFromId(wrapper.get(Types.BYTE, 0)); + if (type == null) { + return; + } + + addTrackedEntity(wrapper, wrapper.get(Types.VAR_INT, 0), type); + }; } protected PacketHandler getTrackerAndDataHandler(Type> dataType, EntityType entityType) { diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/v1_13to1_12_2/rewriter/EntityPacketRewriter1_13.java b/common/src/main/java/com/viaversion/viabackwards/protocol/v1_13to1_12_2/rewriter/EntityPacketRewriter1_13.java index ce61ca88..b14ed392 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/v1_13to1_12_2/rewriter/EntityPacketRewriter1_13.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/v1_13to1_12_2/rewriter/EntityPacketRewriter1_13.java @@ -138,6 +138,7 @@ public class EntityPacketRewriter1_13 extends LegacyEntityRewriter