From 79e5555d4298c8f4602aa0f0d8565e4cfa9ec694 Mon Sep 17 00:00:00 2001 From: Paulomart Date: Wed, 2 Mar 2016 13:31:15 +0100 Subject: [PATCH] Drop MetadataPacket where metadata could not be rewritten --- .../myles/ViaVersion/transformers/OutgoingTransformer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/us/myles/ViaVersion/transformers/OutgoingTransformer.java b/src/main/java/us/myles/ViaVersion/transformers/OutgoingTransformer.java index 9a5dcc412..d05c602b0 100644 --- a/src/main/java/us/myles/ViaVersion/transformers/OutgoingTransformer.java +++ b/src/main/java/us/myles/ViaVersion/transformers/OutgoingTransformer.java @@ -516,7 +516,7 @@ public class OutgoingTransformer { return line; } - private void transformMetadata(int entityID, Object dw, ByteBuf output) { + private void transformMetadata(int entityID, Object dw, ByteBuf output) throws CancelException { // get entity try { transformMetadata(entityID, (List) ReflectionUtil.invoke(dw, "b"), output); @@ -529,11 +529,11 @@ public class OutgoingTransformer { } } - private void transformMetadata(int entityID, List dw, ByteBuf output) { + private void transformMetadata(int entityID, List dw, ByteBuf output) throws CancelException { EntityType type = clientEntityTypes.get(entityID); if (type == null) { System.out.println("Unable to get entity for ID: " + entityID); - return; + throw new CancelException(); } if (dw != null) { short id = -1;