From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Fri, 31 Mar 2023 20:40:28 -0700 Subject: [PATCH] MC-Dev fixes diff --git a/src/main/java/net/minecraft/world/entity/ai/Brain.java b/src/main/java/net/minecraft/world/entity/ai/Brain.java index afbb027021acfbe25d534a84f1750e420bbde6e0..af6f91c66e9cc7e0d491e6efed992a140947155e 100644 --- a/src/main/java/net/minecraft/world/entity/ai/Brain.java +++ b/src/main/java/net/minecraft/world/entity/ai/Brain.java @@ -79,7 +79,7 @@ public class Brain { } public DataResult> decode(DynamicOps dynamicOps, MapLike mapLike) { - MutableObject>>> mutableObject = new MutableObject<>( + MutableObject>>> mutableObject2 = new MutableObject<>( // Folia - decompile fix DataResult.success(ImmutableList.builder()) ); mapLike.entries() @@ -91,10 +91,10 @@ public class Brain { DataResult> dataResult2 = dataResult.flatMap( memoryType -> this.captureRead((MemoryModuleType)memoryType, dynamicOps, (T)pair.getSecond()) ); - mutableObject.setValue(mutableObject.getValue().apply2(Builder::add, dataResult2)); + mutableObject2.setValue(mutableObject2.getValue().apply2(Builder::add, dataResult2)); // Folia - decompile fix } ); - ImmutableList> immutableList = mutableObject.getValue() + ImmutableList> immutableList = mutableObject2.getValue() // Folia - decompile fix .resultOrPartial(Brain.LOGGER::error) .map(Builder::build) .orElseGet(ImmutableList::of); @@ -194,14 +194,14 @@ public class Brain { if (optional == null) { throw new IllegalStateException("Unregistered memory fetched: " + type); } else { - return optional.map(ExpirableValue::getValue); + return (Optional)optional.map(ExpirableValue::getValue); // Folia - decompile fix } } @Nullable public Optional getMemoryInternal(MemoryModuleType type) { Optional> optional = this.memories.get(type); - return optional == null ? null : optional.map(ExpirableValue::getValue); + return optional == null ? null : (Optional)optional.map(ExpirableValue::getValue); // Folia - decompile fix } public long getTimeUntilExpiry(MemoryModuleType type) {