Fix lodestone compass target conversion

This commit is contained in:
Joseph Burton 2024-05-04 12:58:06 +02:00 committed by Nassim Jahnke
parent 0db72ac19e
commit 156675c773
No known key found for this signature in database
GPG Key ID: EF6771C01F6EF02F

View File

@ -22782,7 +22782,7 @@ index 0000000000000000000000000000000000000000..29d256c2f5d5e338dc7abeb82c0f1ae9
+}
diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3820.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3820.java
new file mode 100644
index 0000000000000000000000000000000000000000..0635b81924d4431fdfbcdd3814eaf01f85e53787
index 0000000000000000000000000000000000000000..c45dda60ed8da6802181f7f169a5b97f591b00ee
--- /dev/null
+++ b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3820.java
@@ -0,0 +1,78 @@
@ -22841,10 +22841,10 @@ index 0000000000000000000000000000000000000000..0635b81924d4431fdfbcdd3814eaf01f
+ components.remove("minecraft:lodestone_target");
+ components.setMap("minecraft:lodestone_tracker", oldTarget);
+
+ final Object pos = oldTarget.getMap("pos");
+ final Object dim = oldTarget.getMap("dimension");
+ final Object pos = oldTarget.getGeneric("pos");
+ final Object dim = oldTarget.getGeneric("dimension");
+
+ if (pos == null && dim == null) {
+ if (pos == null || dim == null) {
+ return null;
+ }
+