From ee2959ac5d903bb1dcc427f5a21cd6a75c5435c3 Mon Sep 17 00:00:00 2001 From: KennyTV Date: Thu, 21 Jan 2021 11:37:31 +0100 Subject: [PATCH] Handle shulker meta change --- .../metadata/MetadataRewriter1_17To1_16_4.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_17to1_16_4/metadata/MetadataRewriter1_17To1_16_4.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_17to1_16_4/metadata/MetadataRewriter1_17To1_16_4.java index 1c758dfbf..4ed3d4fcd 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_17to1_16_4/metadata/MetadataRewriter1_17To1_16_4.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_17to1_16_4/metadata/MetadataRewriter1_17To1_16_4.java @@ -41,6 +41,15 @@ public class MetadataRewriter1_17To1_16_4 extends MetadataRewriter { metadata.setId(metadata.getId() + 1); // Ticks frozen added with id 7 } } + + if (type == Entity1_17Types.EntityType.SHULKER) { + // Attachment position removed + if (metadata.getId() == 16) { + metadatas.remove(metadata); + } else if (metadata.getId() > 16) { + metadata.setId(metadata.getId() - 1); + } + } } @Override