Just Enough Items (JEI)

Just Enough Items (JEI)

387M Downloads

[Bug]: On Fabric servers, tags are not synced before plugins are loaded

TropheusJ opened this issue ยท 6 comments

commented

Steps to Reproduce the Bug

  1. Set up a fabric server with Create, and a client with Create and JEI
  2. immediately join server from client. Do not enter singleplayer first.
  3. Open inventory, notice the Manual Item Application category is missing.
    For reference:
    image

Expected Behavior

Tags should be loaded before plugin setup, like on Forge.

Actual Behavior

Create on both Forge and Fabric displays log stripping recipes in the Manual Item Application category. It does this by iterating the minecraft:logs tag and simulating stripping. In singleplayer, it works fine:
image
However, on a server, the tag is not found. This throws an error, so the category ends up missing.

[22:04:17] [Render thread/ERROR] (PluginCaller) Caught an error from mod plugin: class com.simibubi.create.compat.jei.CreateJEI create:jei_plugin
 java.util.NoSuchElementException: No value present
	at java.util.Optional.get(Optional.java:143) ~[?:?]
	at com.simibubi.create.foundation.data.recipe.LogStrippingFakeRecipes.createRecipes(LogStrippingFakeRecipes.java:40) ~[main/:?]
	at com.simibubi.create.compat.jei.CreateJEI$CategoryBuilder.lambda$addRecipes$2(CreateJEI.java:415) ~[main/:?]
	at com.simibubi.create.compat.jei.CreateJEI$CategoryBuilder.lambda$build$20(CreateJEI.java:524) ~[main/:?]
	at com.simibubi.create.compat.jei.category.CreateRecipeCategory.registerRecipes(CreateRecipeCategory.java:82) ~[main/:?]
	at com.simibubi.create.compat.jei.CreateJEI.lambda$registerRecipes$23(CreateJEI.java:340) ~[main/:?]
	at java.util.ArrayList.forEach(ArrayList.java:1511) ~[?:?]
	at com.simibubi.create.compat.jei.CreateJEI.registerRecipes(CreateJEI.java:340) ~[main/:?]
	at mezz.jei.library.load.PluginLoader.lambda$createRecipeManager$10(PluginLoader.java:140) ~[jei-1.19.2-fabric-11.5.0.297.jar:?]
	at mezz.jei.library.load.PluginCaller.callOnPlugins(PluginCaller.java:25) ~[jei-1.19.2-fabric-11.5.0.297.jar:?]
	at mezz.jei.library.load.PluginLoader.createRecipeManager(PluginLoader.java:140) ~[jei-1.19.2-fabric-11.5.0.297.jar:?]
	at mezz.jei.library.startup.JeiStarter.start(JeiStarter.java:110) ~[jei-1.19.2-fabric-11.5.0.297.jar:?]
	at mezz.jei.fabric.startup.ClientLifecycleHandler.startJei(ClientLifecycleHandler.java:83) ~[jei-1.19.2-fabric-11.5.0.297.jar:?]
	at mezz.jei.fabric.startup.ClientLifecycleHandler.lambda$registerEvents$1(ClientLifecycleHandler.java:57) ~[jei-1.19.2-fabric-11.5.0.297.jar:?]
	at mezz.jei.fabric.events.JeiLifecycleEvents.lambda$static$4(JeiLifecycleEvents.java:28) ~[jei-1.19.2-fabric-11.5.0.297.jar:?]
	at net.minecraft.client.multiplayer.ClientPacketListener.handler$bec000$handleUpdateRecipes(ClientPacketListener.java:5972) ~[[email protected]:?]
	at net.minecraft.client.multiplayer.ClientPacketListener.handleUpdateRecipes(ClientPacketListener.java:1310) ~[[email protected]:?]
	at net.minecraft.network.protocol.game.ClientboundUpdateRecipesPacket.handle(ClientboundUpdateRecipesPacket.java:32) ~[[email protected]:?]
	at net.minecraft.network.protocol.game.ClientboundUpdateRecipesPacket.handle(ClientboundUpdateRecipesPacket.java:14) ~[[email protected]:?]
	at net.minecraft.network.protocol.PacketUtils.m_qlqatrtx(PacketUtils.java:22) ~[[email protected]:?]
	at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:157) [[email protected]:?]
	at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:23) [[email protected]:?]
	at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:131) [[email protected]:?]
	at net.minecraft.util.thread.BlockableEventLoop.runAllTasks(BlockableEventLoop.java:116) [[email protected]:?]
	at net.minecraft.client.Minecraft.runTick(Minecraft.java:1129) [[email protected]:?]
	at net.minecraft.client.Minecraft.run(Minecraft.java:768) [[email protected]:?]
	at net.minecraft.client.main.Main.run(Main.java:244) [[email protected]:?]
	at net.minecraft.client.main.Main.main(Main.java:51) [[email protected]:?]
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:461) [fabric-loader-0.14.11.jar:?]
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) [fabric-loader-0.14.11.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) [fabric-loader-0.14.11.jar:?]
	at net.fabricmc.devlaunchinjector.Main.main(Main.java:86) [dev-launch-injector-0.2.1+build.8.jar:?]

On Forge, it works fine in both scenarios. Confirmed with a println:

[21:05:23] [Render thread/INFO] [me.je.co.lo.PluginCaller/]: Registering recipes: create:jei_plugin ...
item in log tag: minecraft:dark_oak_log
item in log tag: minecraft:dark_oak_wood
item in log tag: minecraft:stripped_dark_oak_log
...

Fabric iteration:

Registry.ITEM.getTag(ItemTags.LOGS).get().forEach(...)

Forge iteration:

ITagManager<Item> tags = ForgeRegistries.ITEMS.tags();
tags.getTag(ItemTags.LOGS).forEach(...);

Using JEI 11.5.0.297 on fabric and 11.2.0.254 on forge.

Mod Pack URL (Optional)

No response

Mod Pack Version (Optional)

No response

Extra Notes (Optional)

All my testing was done from within development environments.
I think this is likely due to the same weird behavior that resulted in this mixin EMI uses.

latest.log

fabric log: https://mclo.gs/TV1ARNm

commented

This has been automatically marked as stale because it has not had recent activity, and will be closed if no further activity occurs. If this was overlooked, forgotten, or should remain open for any other reason, please reply here to call attention to it and remove the stale status. Thank you for your contributions.

commented

i haven't checked to see if this issue has been fixed in a while, but i assume it hasn't. this is a pretty significant issue that makes it really hard to craft stuff with the create mod because the complex recipes (ex. from new blocks like the auto crafter w/ large recipes) don't show up in the jei menu.

commented

This has been automatically marked as stale because it has not had recent activity, and will be closed if no further activity occurs. If this was overlooked, forgotten, or should remain open for any other reason, please reply here to call attention to it and remove the stale status. Thank you for your contributions.

commented

again, no new updates because i stopped using the mod due to this annoying bug. according to the referenced create issue, many people are also having this problem. i would appreciate it if it could be looked into.

commented

This has been automatically marked as stale because it has not had recent activity, and will be closed if no further activity occurs. If this was overlooked, forgotten, or should remain open for any other reason, please reply here to call attention to it and remove the stale status. Thank you for your contributions.

commented

This has been automatically closed because it has not had recent activity. Please feel free to update or reopen it.