From a0c2ebbdd48ef03413c901d9950acd3b3b6348f2 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sat, 27 Apr 2024 12:39:35 -0700 Subject: [PATCH] Update DataConverter to 1.20.6-rc1 Fixes trader llama inventory incorrectly converting --- patches/server/Rewrite-dataconverter-system.patch | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/patches/server/Rewrite-dataconverter-system.patch b/patches/server/Rewrite-dataconverter-system.patch index 59be9b9dc3..93c17fbeb9 100644 --- a/patches/server/Rewrite-dataconverter-system.patch +++ b/patches/server/Rewrite-dataconverter-system.patch @@ -439,7 +439,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + 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..00000000000000000000000000000000 + + 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); @@ -1152,6 +1153,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + 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() {} +} @@ -22138,6 +22140,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + 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() {} @@ -22182,6 +22190,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + }; + + 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); + } @@ -22869,9 +22878,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +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..00000000000000000000000000000000 + } + final MapType 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);