diff --git a/src/main/java/ca/spottedleaf/moonrise/common/util/JsonUtil.java b/src/main/java/ca/spottedleaf/moonrise/common/util/JsonUtil.java index 91efda72..4f10913e 100644 --- a/src/main/java/ca/spottedleaf/moonrise/common/util/JsonUtil.java +++ b/src/main/java/ca/spottedleaf/moonrise/common/util/JsonUtil.java @@ -1,6 +1,7 @@ package ca.spottedleaf.moonrise.common.util; import com.google.gson.JsonElement; +import com.google.gson.Strictness; import com.google.gson.internal.Streams; import com.google.gson.stream.JsonWriter; import java.io.File; @@ -16,7 +17,7 @@ public static void writeJson(final JsonElement element, final File file) throws final StringWriter stringWriter = new StringWriter(); final JsonWriter jsonWriter = new JsonWriter(stringWriter); jsonWriter.setIndent(" "); - jsonWriter.setLenient(false); + jsonWriter.setStrictness(Strictness.LENIENT); Streams.write(element, jsonWriter); final String jsonString = stringWriter.toString(); diff --git a/src/main/java/ca/spottedleaf/moonrise/mixin/poi_lookup/AcquirePoiMixin.java b/src/main/java/ca/spottedleaf/moonrise/mixin/poi_lookup/AcquirePoiMixin.java index a3ef8816..224802b2 100644 --- a/src/main/java/ca/spottedleaf/moonrise/mixin/poi_lookup/AcquirePoiMixin.java +++ b/src/main/java/ca/spottedleaf/moonrise/mixin/poi_lookup/AcquirePoiMixin.java @@ -24,8 +24,8 @@ abstract class AcquirePoiMixin { */ @Redirect( method = { - "method_46885", - "*(ZLorg/apache/commons/lang3/mutable/MutableLong;Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;Ljava/util/function/Predicate;Lnet/minecraft/world/entity/ai/behavior/declarative/MemoryAccessor;Ljava/util/Optional;Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/world/entity/PathfinderMob;J)Z" + "lambda$create$8", + "method_46885" }, at = @At( target = "Lnet/minecraft/world/entity/ai/village/poi/PoiManager;findAllClosestFirstWithType(Ljava/util/function/Predicate;Ljava/util/function/Predicate;Lnet/minecraft/core/BlockPos;ILnet/minecraft/world/entity/ai/village/poi/PoiManager$Occupancy;)Ljava/util/stream/Stream;", @@ -33,9 +33,9 @@ abstract class AcquirePoiMixin { ordinal = 0 ) ) - private static Stream, BlockPos>> aaa(PoiManager poiManager, Predicate> predicate, - Predicate predicate2, BlockPos blockPos, int i, - PoiManager.Occupancy occup) { + private static Stream, BlockPos>> useLimitedSearch(PoiManager poiManager, Predicate> predicate, + Predicate predicate2, BlockPos blockPos, int i, + PoiManager.Occupancy occup) { final List, BlockPos>> ret = new ArrayList<>(); PoiAccess.findNearestPoiPositions(