Skip to content

Commit 0fc0793

Browse files
committed
Fix load condition compilations.
1 parent 495f9ef commit 0fc0793

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Common/src/main/java/net/darkhax/bookshelf/mixin/packs/resources/MixinSimpleJsonResourceReloadListener.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import com.google.gson.JsonObject;
55
import net.darkhax.bookshelf.api.data.conditions.ILoadCondition;
66
import net.darkhax.bookshelf.api.data.conditions.ILoadConditionSerializer;
7+
import net.darkhax.bookshelf.api.data.conditions.LoadConditions;
78
import net.minecraft.resources.ResourceLocation;
89
import net.minecraft.server.packs.resources.ResourceManager;
910
import net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener;
@@ -21,6 +22,6 @@ public class MixinSimpleJsonResourceReloadListener {
2122
@Inject(method = "prepare(Lnet/minecraft/server/packs/resources/ResourceManager;Lnet/minecraft/util/profiling/ProfilerFiller;)Ljava/util/Map;", at = @At("RETURN"))
2223
private void prepare(ResourceManager manager, ProfilerFiller profiler, CallbackInfoReturnable<Map<ResourceLocation, JsonElement>> cbi) {
2324

24-
cbi.getReturnValue().entrySet().removeIf(entry -> entry.getValue() instanceof JsonObject obj && !ILoadConditionSerializer.canLoad(obj));
25+
cbi.getReturnValue().entrySet().removeIf(entry -> entry.getValue() instanceof JsonObject obj && !LoadConditions.canLoad(obj));
2526
}
2627
}

0 commit comments

Comments
 (0)