diff options
Diffstat (limited to 'patch-remap/mache-vineflower-stripped/net/minecraft/util/datafix/fixes/ItemStackTheFlatteningFix.java.patch')
-rw-r--r-- | patch-remap/mache-vineflower-stripped/net/minecraft/util/datafix/fixes/ItemStackTheFlatteningFix.java.patch | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower-stripped/net/minecraft/util/datafix/fixes/ItemStackTheFlatteningFix.java.patch b/patch-remap/mache-vineflower-stripped/net/minecraft/util/datafix/fixes/ItemStackTheFlatteningFix.java.patch new file mode 100644 index 0000000000..cb554a827d --- /dev/null +++ b/patch-remap/mache-vineflower-stripped/net/minecraft/util/datafix/fixes/ItemStackTheFlatteningFix.java.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/util/datafix/fixes/ItemStackTheFlatteningFix.java ++++ b/net/minecraft/util/datafix/fixes/ItemStackTheFlatteningFix.java +@@ -421,11 +372,12 @@ + typed1 = typed.set(opticFinder, Pair.of(References.ITEM_NAME.typeName(), string)); + } + +- if (DAMAGE_IDS.contains(optional.get().getSecond())) { +- Typed<?> typed2 = typed.getOrCreateTyped(opticFinder1); +- Dynamic<?> dynamic1 = typed2.get(DSL.remainderFinder()); +- dynamic1 = dynamic1.set("Damage", dynamic1.createInt(_int)); +- typed1 = typed1.set(opticFinder1, typed2.set(DSL.remainderFinder(), dynamic1)); ++ if (ItemStackTheFlatteningFix.DAMAGE_IDS.contains(((Pair) optional.get()).getSecond())) { ++ Typed<?> typed2 = typed.getOrCreateTyped(opticfinder1); ++ Dynamic<?> dynamic1 = (Dynamic) typed2.get(DSL.remainderFinder()); ++ ++ if (i != 0) dynamic1 = dynamic1.set("Damage", dynamic1.createInt(i)); // CraftBukkit ++ typed1 = typed1.set(opticfinder1, typed2.set(DSL.remainderFinder(), dynamic1)); + } + + return typed1.set(DSL.remainderFinder(), dynamic.remove("Damage")); |