From 8cc4ba168a5e12a2ce61f8e6ba5fe8a302a41580 Mon Sep 17 00:00:00 2001 From: Mats Date: Wed, 8 Jun 2016 12:29:08 +0200 Subject: [PATCH] Patch EchoPet wrong metadata value (#419) --- .../protocols/protocol1_9to1_8/storage/EntityTracker.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/storage/EntityTracker.java b/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/storage/EntityTracker.java index 1438a4253..564daa11a 100644 --- a/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/storage/EntityTracker.java +++ b/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/storage/EntityTracker.java @@ -143,6 +143,13 @@ public class EntityTracker extends StoredObject { } } + //ECHOPET Patch + if (type == EntityType.HORSE) { + // Wrong metadata value from EchoPet, patch since it's discontinued. (https://github.com/DSH105/EchoPet/blob/06947a8b08ce40be9a518c2982af494b3b99d140/modules/API/src/main/java/com/dsh105/echopet/compat/api/entity/HorseArmour.java#L22) + if (metadata.getId() == 16 && (int) metadata.getValue() == Integer.MIN_VALUE) + metadata.setValue(0); + } + if (type == EntityType.PLAYER) { if (metadata.getId() == 0) { // Byte