emilyploszaj / emi

A featureful and accessible item and recipe viewer
MIT License
220 stars 45 forks source link

EMI error registering brewing recipes with newer NeoForge #590

Closed pupnewfster closed 4 days ago

pupnewfster commented 1 week ago

Version: 1.21 - 1.1.7 NeoForge version: 21.0.31-beta (though I think this is the case in 21.0.26-beta and up)

When we cleaned up some ATs in https://github.com/neoforged/NeoForge/commit/09ab1211e5a5ffa2dfacc9dfe1263d00d58b04b1 it seems that one EMI was using got removed. Given it is a record, you can just switch to querying the method rather than the internal field of the potion mix.

java.lang.IllegalAccessError: class dev.emi.emi.platform.neoforge.EmiAgnosNeoForge tried to access private field net.minecraft.world.item.alchemy.PotionBrewing$Mix.ingredient (dev.emi.emi.platform.neoforge.EmiAgnosNeoForge is in module emi@1.1.7+1.21+neoforge of loader 'TRANSFORMER' @580fd26b; net.minecraft.world.item.alchemy.PotionBrewing$Mix is in module minecraft@1.21 of loader 'TRANSFORMER' @580fd26b)
    at TRANSFORMER/emi@1.1.7+1.21+neoforge/dev.emi.emi.platform.neoforge.EmiAgnosNeoForge.addBrewingRecipesAgnos(EmiAgnosNeoForge.java:149)
    at TRANSFORMER/emi@1.1.7+1.21+neoforge/dev.emi.emi.platform.EmiAgnos.addBrewingRecipes(EmiAgnos.java:90)
    at TRANSFORMER/emi@1.1.7+1.21+neoforge/dev.emi.emi.VanillaPlugin.lambda$register$29(VanillaPlugin.java:463)
    at TRANSFORMER/emi@1.1.7+1.21+neoforge/dev.emi.emi.VanillaPlugin.safely(VanillaPlugin.java:829)
    at TRANSFORMER/emi@1.1.7+1.21+neoforge/dev.emi.emi.VanillaPlugin.register(VanillaPlugin.java:463)
    at TRANSFORMER/emi@1.1.7+1.21+neoforge/dev.emi.emi.runtime.EmiReloadManager$ReloadWorker.run(EmiReloadManager.java:185)
    at java.base/java.lang.Thread.run(Thread.java:1583)
emilyploszaj commented 4 days ago

Fixed in 1.1.8