[Bug]: Comforts annotates `CreativeModTab.makeIcon` as `OnlyIn(Dist.CLIENT)` despite the vanilla method being present on both sides.
alcatrazEscapee opened this issue ยท 0 comments
Minecraft Version
1.18.2
What happened?
As seen here:
Comforts is annotating a vanilla method as @OnlyIn(Dist.CLIENT)
, which causes it to be not present in dedicated server, despite the vanilla method not being annotated as such. In particular, vanilla stopped side-specific method stripping like this since 1.17.
This has the effect of stripping out the method implementation in a dedicated server, meaning any other mod which calls makeIcon()
has the potential to cause a crash.
How do you trigger this bug?
This can be triggered via any code that calls CreativeModeTab.makeIcon()
on a dedicated server, for any creative tab. As it will error with an AbstractMethodError
due to the required implementation not being present on server.
Loader
Forge
Loader Version
40.2.1
API Version
No response
Mod Version
forge-1.18.2-5.0.0.3
Relevant Log Outputs
The following is an example crash I was having which is due to this issue. In particular, TerraFirmaCraft has some code which calls CreativeModeTab.makeIcon
on a dedicated server, which will crash due to an AbstractMethodError
when Comforts is present.