UnsupportedOperationException on server connect
sirgermund opened this issue ยท 0 comments
If I open local world first after opening minecraft then everything works for local/server. But if I connect to server first after opening minecraft, then UnsupportedOperationException is thrown because in jeresources.fabric.ModInfo#getPackResources
it calls .toFile()
on ZipPath
.
The way I understand this behaviour is this:
- If I go to local world then during execution of PlantRegistry.getInstance() it will call constructor and skip
if (level.getServer() == null)
injeresources.util.LootTableHelper#getLootTables
, and then with created instance of PlantRegistry everything will work fine. - If I go to server then with calling the constructor of PlantRegistry in
jeresources.util.LootTableHelper#getLootTables
it will calljeresources.fabric.ModInfo#getPackResources
which will fail because of UnsupportedOperationException and ruin JER initialization.
Fabric - 0.14.10
JEI - jei-1.19.2-fabric-11.4.0.286
JER - JustEnoughResources-Fabric-1.19.2-1.1.0.179
Stacktrace:
Caught an error from mod plugin: class jeresources.jei.JEIConfig minecraft:jeresources
java.lang.UnsupportedOperationException
at jdk.zipfs/jdk.nio.zipfs.ZipPath.toFile(ZipPath.java:669)
at jeresources.fabric.ModInfo.getPackResources(ModInfo.java:23)
at jeresources.util.LootTableHelper.lambda$getLootTables$11(LootTableHelper.java:179)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at jeresources.util.LootTableHelper.getLootTables(LootTableHelper.java:179)
at jeresources.util.LootTableHelper.toDrops(LootTableHelper.java:96)
at jeresources.util.PlantHelper.getSeeds(PlantHelper.java:14)
at jeresources.entry.PlantEntry.registerGrass(PlantEntry.java:28)
at jeresources.registry.PlantRegistry.<init>(PlantRegistry.java:25)
at jeresources.registry.PlantRegistry.getInstance(PlantRegistry.java:19)
at jeresources.proxy.CommonProxy.initCompatibility(CommonProxy.java:11)
at jeresources.jei.JEIConfig.registerCategories(JEIConfig.java:98)
at mezz.jei.common.load.PluginLoader.lambda$createRecipeCategories$3(PluginLoader.java:137)
at mezz.jei.common.load.PluginCaller.callOnPlugins(PluginCaller.java:25)
at mezz.jei.common.load.PluginLoader.createRecipeCategories(PluginLoader.java:137)
at mezz.jei.common.load.PluginLoader.createRecipeManager(PluginLoader.java:164)
at mezz.jei.common.startup.JeiStarter.start(JeiStarter.java:88)
at mezz.jei.fabric.startup.ClientLifecycleHandler.startJei(ClientLifecycleHandler.java:96)
at mezz.jei.fabric.startup.ClientLifecycleHandler.lambda$registerEvents$1(ClientLifecycleHandler.java:70)
at mezz.jei.fabric.events.JeiLifecycleEvents.lambda$static$4(JeiLifecycleEvents.java:28)
at net.minecraft.class_634.handler$zjh000$handleUpdateRecipes(class_634.java:3972)
at net.minecraft.class_634.method_11106(class_634.java:1310)
at net.minecraft.class_2788.method_11997(class_2788.java:32)
at net.minecraft.class_2788.method_11054(class_2788.java:14)
at net.minecraft.class_2600.method_11072(class_2600.java:22)
at net.minecraft.class_1255.method_18859(class_1255.java:157)
at net.minecraft.class_4093.method_18859(class_4093.java:23)
at net.minecraft.class_1255.method_16075(class_1255.java:131)
at net.minecraft.class_1255.method_5383(class_1255.java:116)
at net.minecraft.class_310.method_1523(class_310.java:1129)
at net.minecraft.class_310.method_1514(class_310.java:768)
at net.minecraft.client.main.Main.method_44604(Main.java:244)
at net.minecraft.client.main.Main.main(Main.java:51)
at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:461)
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)