Skip to content

Commit

Permalink
Fix AcquirePoiMixin
Browse files Browse the repository at this point in the history
Just needed to update the method targets
  • Loading branch information
Spottedleaf committed Dec 3, 2024
1 parent 6b4139a commit f6541b0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ 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;",
value = "INVOKE",
ordinal = 0
)
)
private static Stream<Pair<Holder<PoiType>, BlockPos>> aaa(PoiManager poiManager, Predicate<Holder<PoiType>> predicate,
Predicate<BlockPos> predicate2, BlockPos blockPos, int i,
PoiManager.Occupancy occup) {
private static Stream<Pair<Holder<PoiType>, BlockPos>> useLimitedSearch(PoiManager poiManager, Predicate<Holder<PoiType>> predicate,
Predicate<BlockPos> predicate2, BlockPos blockPos, int i,
PoiManager.Occupancy occup) {
final List<Pair<Holder<PoiType>, BlockPos>> ret = new ArrayList<>();

PoiAccess.findNearestPoiPositions(
Expand Down

0 comments on commit f6541b0

Please sign in to comment.