From cae5122d044f36ff3d206f281c3fa859f3710212 Mon Sep 17 00:00:00 2001 From: RK_01 <50594595+RaphiMC@users.noreply.github.com> Date: Tue, 25 Aug 2020 15:53:58 +0200 Subject: [PATCH] Applied suggestions for PR Co-authored-by: Nassim --- .../metadata/MetadataRewriter1_9To1_8.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/metadata/MetadataRewriter1_9To1_8.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/metadata/MetadataRewriter1_9To1_8.java index aba9d59a9..4fab7b1cb 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/metadata/MetadataRewriter1_9To1_8.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/metadata/MetadataRewriter1_9To1_8.java @@ -112,16 +112,8 @@ public class MetadataRewriter1_9To1_8 extends MetadataRewriter { metadata.setValue(value); break; case BlockID: - // convert from int, short, byte - if (metaIndex.getOldType() == MetaType1_8.Byte) { - metadata.setValue(((Byte) value).intValue()); - } - if (metaIndex.getOldType() == MetaType1_8.Short) { - metadata.setValue(((Short) value).intValue()); - } - if (metaIndex.getOldType() == MetaType1_8.Int) { - metadata.setValue(value); - } + // Convert from int, short, byte + metadata.setValue(((Number) value).intValue()); break; default: metadatas.remove(metadata);