Update DataConverter to 1.20.6-rc1

Fixes trader llama inventory incorrectly converting
This commit is contained in:
Spottedleaf 2024-04-27 12:39:35 -07:00
parent c82766d436
commit f933c35700

View File

@ -196,10 +196,10 @@ index 0000000000000000000000000000000000000000..a27d3d41109271834b6c37fa22d4b80d
+}
diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/MCVersionRegistry.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/MCVersionRegistry.java
new file mode 100644
index 0000000000000000000000000000000000000000..057a2e1e160282c53336802580410ca23ea3222a
index 0000000000000000000000000000000000000000..86775cd8ba9956ecaa4522acf15ed7b83dabcdbd
--- /dev/null
+++ b/src/main/java/ca/spottedleaf/dataconverter/minecraft/MCVersionRegistry.java
@@ -0,0 +1,424 @@
@@ -0,0 +1,425 @@
+package ca.spottedleaf.dataconverter.minecraft;
+
+import ca.spottedleaf.dataconverter.converters.DataConverter;
@ -439,7 +439,7 @@ index 0000000000000000000000000000000000000000..057a2e1e160282c53336802580410ca2
+ 3825,
+ 3828,
+ 3833
+ // All up to 1.20.5
+ // All up to 1.20.6-rc1
+ };
+ Arrays.sort(converterVersions);
+
@ -458,6 +458,7 @@ index 0000000000000000000000000000000000000000..057a2e1e160282c53336802580410ca2
+
+ registerSubVersion(MCVersions.V24W04A + 1, 1);
+ registerSubVersion(MCVersions.V24W04A + 2, 1);
+ registerSubVersion(MCVersions.V24W04A + 2, 2);
+
+ registerSubVersion(MCVersions.V24W07A + 1, 1);
+ registerSubVersion(MCVersions.V24W07A + 1, 2);
@ -626,10 +627,10 @@ index 0000000000000000000000000000000000000000..057a2e1e160282c53336802580410ca2
+}
diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/MCVersions.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/MCVersions.java
new file mode 100644
index 0000000000000000000000000000000000000000..dbd232869253c4b06c09a52c2d7ad64fbbc3b71c
index 0000000000000000000000000000000000000000..3379bb124b17bc0b96a5054404b6a3f545af7aee
--- /dev/null
+++ b/src/main/java/ca/spottedleaf/dataconverter/minecraft/MCVersions.java
@@ -0,0 +1,525 @@
@@ -0,0 +1,526 @@
+package ca.spottedleaf.dataconverter.minecraft;
+
+@SuppressWarnings("unused")
@ -1152,6 +1153,7 @@ index 0000000000000000000000000000000000000000..dbd232869253c4b06c09a52c2d7ad64f
+ public static final int V1_20_5_RC2 = 3835;
+ public static final int V1_20_5_RC3 = 3836;
+ public static final int V1_20_5 = 3837;
+ public static final int V1_20_6_RC1 = 3838;
+
+ private MCVersions() {}
+}
@ -22062,10 +22064,10 @@ index 0000000000000000000000000000000000000000..a76916cdb7cf91b8ba5461524472b3e4
+}
diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3808.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3808.java
new file mode 100644
index 0000000000000000000000000000000000000000..cce86ebda50fc258eb28ad2f45e908b29934abec
index 0000000000000000000000000000000000000000..22b7bf301c8ab7cde285fa257f240986a697b83f
--- /dev/null
+++ b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3808.java
@@ -0,0 +1,76 @@
@@ -0,0 +1,82 @@
+package ca.spottedleaf.dataconverter.minecraft.versions;
+
+import ca.spottedleaf.dataconverter.converters.DataConverter;
@ -22138,16 +22140,22 @@ index 0000000000000000000000000000000000000000..cce86ebda50fc258eb28ad2f45e908b2
+ MCTypeRegistry.ENTITY.addWalker(VERSION, 1, "minecraft:llama", new DataWalkerItemLists("Items"));
+ MCTypeRegistry.ENTITY.addWalker(VERSION, 1, "minecraft:llama", new DataWalkerItems("SaddleItem"));
+ V100.registerEquipment(VERSION, 1, "minecraft:llama");
+
+ // Step 2
+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:trader_llama", new BodyArmorConverter(VERSION, 2, "DecorItem", false));
+ MCTypeRegistry.ENTITY.addWalker(VERSION, 2, "minecraft:trader_llama", new DataWalkerItemLists("Items"));
+ MCTypeRegistry.ENTITY.addWalker(VERSION, 2, "minecraft:trader_llama", new DataWalkerItems("SaddleItem"));
+ V100.registerEquipment(VERSION, 2, "minecraft:trader_llama");
+ }
+
+ private V3808() {}
+}
diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3809.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3809.java
new file mode 100644
index 0000000000000000000000000000000000000000..7b782a6bb8d41f61201323d541f4acfac5af49dc
index 0000000000000000000000000000000000000000..c45a1a77adbb5dc5ba8c3dae0bb480450520c731
--- /dev/null
+++ b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3809.java
@@ -0,0 +1,40 @@
@@ -0,0 +1,41 @@
+package ca.spottedleaf.dataconverter.minecraft.versions;
+
+import ca.spottedleaf.dataconverter.converters.DataConverter;
@ -22182,6 +22190,7 @@ index 0000000000000000000000000000000000000000..7b782a6bb8d41f61201323d541f4acfa
+ };
+
+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:llama", slotConverter);
+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:trader_llama", slotConverter);
+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:mule", slotConverter);
+ MCTypeRegistry.ENTITY.addConverterForId("minecraft:donkey", slotConverter);
+ }
@ -22857,10 +22866,10 @@ index 0000000000000000000000000000000000000000..0635b81924d4431fdfbcdd3814eaf01f
+}
diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3825.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3825.java
new file mode 100644
index 0000000000000000000000000000000000000000..cded86949c5af12aa96a8883b56b36b13d5dcd57
index 0000000000000000000000000000000000000000..26e27331223bc5671db49bb730a754597815b8cc
--- /dev/null
+++ b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3825.java
@@ -0,0 +1,155 @@
@@ -0,0 +1,153 @@
+package ca.spottedleaf.dataconverter.minecraft.versions;
+
+import ca.spottedleaf.dataconverter.converters.DataConverter;
@ -22869,9 +22878,7 @@ index 0000000000000000000000000000000000000000..cded86949c5af12aa96a8883b56b36b1
+import ca.spottedleaf.dataconverter.minecraft.util.ComponentUtils;
+import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils;
+import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItems;
+import ca.spottedleaf.dataconverter.types.ListType;
+import ca.spottedleaf.dataconverter.types.MapType;
+import ca.spottedleaf.dataconverter.types.ObjectType;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
@ -22972,7 +22979,7 @@ index 0000000000000000000000000000000000000000..cded86949c5af12aa96a8883b56b36b1
+ }
+ final MapType<String> ominousConfig = data.getMap("ominous_config");
+ if (ominousConfig != null) {
+ WalkerUtils.convertListPath(MCTypeRegistry.ENTITY, normalConfig, "spawn_potentials", "data", "entity", fromVersion, toVersion);
+ WalkerUtils.convertListPath(MCTypeRegistry.ENTITY, ominousConfig, "spawn_potentials", "data", "entity", fromVersion, toVersion);
+ }
+
+ WalkerUtils.convert(MCTypeRegistry.ENTITY, data.getMap("spawn_data"), "entity", fromVersion, toVersion);