Skip to content

Commit 5194c27

Browse files
authored
Fix skull owner with multiple properties of the same key in 1.20.5->1.20.3 (#1248)
1 parent c887ab7 commit 5194c27

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

common/src/main/java/com/viaversion/viabackwards/protocol/v1_20_5to1_20_3/rewriter/BlockPacketRewriter1_20_5.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@ private void updateProfileTag(final CompoundTag tag, final CompoundTag profileTa
102102
final String value = propertyTag.getString("value", "");
103103
final String signature = propertyTag.getString("signature");
104104

105-
final ListTag<CompoundTag> list = new ListTag<>(CompoundTag.class);
105+
ListTag<CompoundTag> list = propertiesTag.getListTag(property, CompoundTag.class);
106+
if (list == null) {
107+
list = new ListTag<>(CompoundTag.class);
108+
}
106109
final CompoundTag updatedPropertyTag = new CompoundTag();
107110
updatedPropertyTag.putString("Value", value);
108111
if (signature != null) {

0 commit comments

Comments
 (0)