From 11c713dc6f72a422cbdbeb6e20ed1a8c54cd2024 Mon Sep 17 00:00:00 2001 From: Camotoy <20743703+DoctorMacc@users.noreply.github.com> Date: Mon, 3 Aug 2020 17:29:52 -0400 Subject: [PATCH] JavaEntityMetadataTranslator: replace stack trace with concise warning (#1086) * JavaEntityMetadataTranslator: replace stack trace with concise warning Removes the stack trace given when a ClassCastException occurs and replaces it with a friendlier message. Class cast errors will happen since some servers send incorrect values, and apparently it is default Minecraft behavior to ignore them. * Update languages submodule --- .../java/entity/JavaEntityMetadataTranslator.java | 14 +++++++++++++- connector/src/main/resources/languages | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/connector/src/main/java/org/geysermc/connector/network/translators/java/entity/JavaEntityMetadataTranslator.java b/connector/src/main/java/org/geysermc/connector/network/translators/java/entity/JavaEntityMetadataTranslator.java index e3de626c2..97160250d 100644 --- a/connector/src/main/java/org/geysermc/connector/network/translators/java/entity/JavaEntityMetadataTranslator.java +++ b/connector/src/main/java/org/geysermc/connector/network/translators/java/entity/JavaEntityMetadataTranslator.java @@ -32,6 +32,7 @@ import org.geysermc.connector.network.translators.Translator; import com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata; import com.github.steveice10.mc.protocol.packet.ingame.server.entity.ServerEntityMetadataPacket; +import org.geysermc.connector.utils.LanguageUtils; @Translator(packet = ServerEntityMetadataPacket.class) public class JavaEntityMetadataTranslator extends PacketTranslator { @@ -45,7 +46,18 @@ public class JavaEntityMetadataTranslator extends PacketTranslator