backport1.20.1 #6

Zusammengeführt
YoyoNow hat 54 Commits von backport1.20.1 nach master 2024-02-01 19:58:32 +01:00 zusammengeführt
Nur Änderungen aus Commit b694a0515b werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -176,6 +176,11 @@ public class ManipulateEntityPacketListener implements PluginMessageListener {
}
private static CompoundTag merge(CompoundTag left, CompoundTag right) {
if (right.contains("axiom:modify")) {
right.remove("axiom:modify");
return right;
}
for (String key : right.getAllKeys()) {
Tag tag = right.get(key);
if (tag instanceof CompoundTag compound) {
@ -183,9 +188,14 @@ public class ManipulateEntityPacketListener implements PluginMessageListener {
left.remove(key);
} else if (left.contains(key, Tag.TAG_COMPOUND)) {
CompoundTag child = left.getCompound(key);
merge(child, compound);
child = merge(child, compound);
left.put(key, child);
} else {
left.put(key, tag.copy());
CompoundTag copied = compound.copy();
if (copied.contains("axiom:modify")) {
copied.remove("axiom:modify");
}
left.put(key, copied);
}
} else {
left.put(key, tag.copy());