diff --git a/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/EntityPackets.java b/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/EntityPackets.java index c51b92f7f..2b61e8b00 100644 --- a/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/EntityPackets.java +++ b/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/EntityPackets.java @@ -184,6 +184,7 @@ public class EntityPackets { MetadataRewriter.transform(tracker.getClientEntityTypes().get(entityID), metadataList); } else if (!ViaVersion.getConfig().isUnknownEntitiesSuppressed()) { System.out.println("Unable to find entity for metadata, entity ID: " + entityID); + metadataList.clear(); } } }); diff --git a/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/SpawnPackets.java b/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/SpawnPackets.java index 8e8b318cb..d8c4bad11 100644 --- a/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/SpawnPackets.java +++ b/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/SpawnPackets.java @@ -180,6 +180,7 @@ public class SpawnPackets { MetadataRewriter.transform(tracker.getClientEntityTypes().get(entityID), metadataList); } else { System.out.println("Unable to find entity for metadata, entity ID: " + entityID); + metadataList.clear(); } } }); @@ -235,6 +236,16 @@ public class SpawnPackets { map(Type.VAR_INT); // 0 - Entity ID map(Type.UUID); // 1 - Player UUID + // Parse this info + handler(new PacketHandler() { + @Override + public void handle(PacketWrapper wrapper) throws Exception { + int entityID = wrapper.get(Type.VAR_INT, 0); + EntityTracker tracker = wrapper.user().get(EntityTracker.class); + tracker.getClientEntityTypes().put(entityID, EntityType.PLAYER); + } + }); + map(Type.INT, toNewDouble); // 2 - X - Needs to be divide by 32 map(Type.INT, toNewDouble); // 3 - Y - Needs to be divide by 32 map(Type.INT, toNewDouble); // 4 - Z - Needs to be divide by 32 @@ -256,6 +267,7 @@ public class SpawnPackets { MetadataRewriter.transform(tracker.getClientEntityTypes().get(entityID), metadataList); } else { System.out.println("Unable to find entity for metadata, entity ID: " + entityID); + metadataList.clear(); } } });