From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: IPECTER Date: Tue, 30 May 2023 12:12:29 +0900 Subject: [PATCH] MC Dev fixes diff --git a/src/main/java/net/minecraft/util/datafix/fixes/LeavesFix.java b/src/main/java/net/minecraft/util/datafix/fixes/LeavesFix.java index 11ae164cce84081843518953bbeaf29904334fa9..131a0bb93c0711cc657c5571f3d8313b4bf154a8 100644 --- a/src/main/java/net/minecraft/util/datafix/fixes/LeavesFix.java +++ b/src/main/java/net/minecraft/util/datafix/fixes/LeavesFix.java @@ -71,14 +71,14 @@ public class LeavesFix extends DataFix { return this.fixTypeEverywhereTyped("Leaves fix", type, (typed) -> { return typed.updateTyped(opticFinder, (typedx) -> { int[] is = new int[]{0}; - Typed typed2 = typedx.updateTyped(opticFinder2, (typed) -> { - Int2ObjectMap int2ObjectMap = new Int2ObjectOpenHashMap<>(typed.getAllTyped(opticFinder3).stream().map((typedx) -> { - return new LeavesFix.LeavesSection(typedx, this.getInputSchema()); + Typed typed2 = typedx.updateTyped(opticFinder2, (typed2x) -> { + Int2ObjectMap int2ObjectMap = new Int2ObjectOpenHashMap<>(typed2x.getAllTyped(opticFinder3).stream().map((typedx2) -> { + return new LeavesFix.LeavesSection(typedx2, this.getInputSchema()); }).collect(Collectors.toMap(LeavesFix.Section::getIndex, (leavesSection) -> { return leavesSection; }))); if (int2ObjectMap.values().stream().allMatch(LeavesFix.Section::isSkippable)) { - return typed; + return typed2x; } else { List list = Lists.newArrayList(); @@ -134,8 +134,8 @@ public class LeavesFix extends DataFix { } } - return typed.updateTyped(opticFinder3, (typedx) -> { - return int2ObjectMap.get(typedx.get(DSL.remainderFinder()).get("Y").asInt(0)).write(typedx); + return typed.updateTyped(opticFinder3, (typedx2) -> { + return int2ObjectMap.get(typedx2.get(DSL.remainderFinder()).get("Y").asInt(0)).write(typedx2); }); } }); @@ -298,8 +298,8 @@ public class LeavesFix extends DataFix { throw new IllegalStateException("Block state type is not what was expected."); } else { Optional>>> optional = typed.getOptional(this.paletteFinder); - this.palette = optional.map((list) -> { - return list.stream().map(Pair::getSecond).collect(Collectors.toList()); + this.palette = (java.util.List)optional.map((list) -> { + return (java.util.List)list.stream().map(Pair::getSecond).collect(Collectors.toList()); }).orElse(ImmutableList.of()); Dynamic dynamic = typed.get(DSL.remainderFinder()); this.index = dynamic.get("Y").asInt(0); @@ -321,7 +321,7 @@ public class LeavesFix extends DataFix { public Typed write(Typed typed) { return this.isSkippable() ? typed : typed.update(DSL.remainderFinder(), (dynamic) -> { return dynamic.set("BlockStates", dynamic.createLongList(Arrays.stream(this.storage.getRaw()))); - }).set(this.paletteFinder, this.palette.stream().map((dynamic) -> { + }).set(this.paletteFinder, (java.util.List)this.palette.stream().map((dynamic) -> { return Pair.of(References.BLOCK_STATE.typeName(), dynamic); }).collect(Collectors.toList())); } diff --git a/src/main/java/net/minecraft/world/level/storage/loot/entries/EntryGroup.java b/src/main/java/net/minecraft/world/level/storage/loot/entries/EntryGroup.java index 6e971a9891e43b971d439c3ca11eff8965f3dae9..da1b5c6b68f14969b85472826d3d36ca673a0e5a 100644 --- a/src/main/java/net/minecraft/world/level/storage/loot/entries/EntryGroup.java +++ b/src/main/java/net/minecraft/world/level/storage/loot/entries/EntryGroup.java @@ -31,8 +31,8 @@ public class EntryGroup extends CompositeEntryBase { }; default: return (context, lootChoiceExpander) -> { - for(ComposableEntryContainer composableEntryContainer : children) { - composableEntryContainer.expand(context, lootChoiceExpander); + for(ComposableEntryContainer composableEntryContainer3 : children) { // Plazma - decompile fix + composableEntryContainer3.expand(context, lootChoiceExpander); } return true;