team-abnormals / caverns-and-chasms

Other
11 stars 8 forks source link

[1.19.2-1.0.0] Crash : AbstractMethodError when Lightning Rod changes weathering state - Possible conflict with Friends and Foes #35

Open TigerWalts opened 6 months ago

TigerWalts commented 6 months ago

Caverns & Chasms: 1.19.2-1.0.0 Forge: 43.3.8 Friends & Foes: 1.19.2-2.0.9


Server crash when a lightning rod changes its weathering state.

Crash was observed when a structure added by Friends and Foes intended to demonstrate the Copper Golem was placed in the world. When the rod's weathering state changes, the server crashes.

Waxing or scraping the rod does not trigger a crash.

Lightning resetting the weathered state has not been checked.

Both mods add mixins that allow the lighting rod to weather/oxidize. There may be a conflict


Crash Report: https://mclo.gs/1QQjmd5

java.lang.AbstractMethodError: Receiver class net.minecraft.world.level.block.LightningRodBlock does not define or inherit an implementation of the resolved method 'abstract java.util.Optional m_142123_(net.minecraft.world.level.block.state.BlockState)' of interface net.minecraft.world.level.block.ChangeOverTimeBlock.
    at net.minecraft.world.level.block.ChangeOverTimeBlock.m_220952_(ChangeOverTimeBlock.java:70) ~[server-1.19.2-20220805.130853-srg.jar%23543!/:?] {re:classloading,re:mixin}
    at net.minecraft.world.level.block.ChangeOverTimeBlock.m_220947_(ChangeOverTimeBlock.java:24) ~[server-1.19.2-20220805.130853-srg.jar%23543!/:?] {re:classloading,re:mixin}
    at net.minecraft.world.level.block.LightningRodBlock.m_213898_(LightningRodBlock.java:548) ~[server-1.19.2-20220805.130853-srg.jar%23543!/:?] {re:mixin,re:classloading,pl:mixin:APP:caverns_and_chasms.mixins.json:LightningRodBlockMixin,pl:mixin:APP:friendsandfoes-common.mixins.json:LightningRodBlockDegradableMixin,pl:mixin:APP:friendsandfoes-common.mixins.json:LightningRodBlockMixin,pl:mixin:APP:friendsandfoes-common.mixins.json:LightningRodBlockOxidizableMixin,pl:mixin:A}
    at net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.m_222972_(BlockBehaviour.java:698) ~[server-1.19.2-20220805.130853-srg.jar%23543!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:forgeendertech:coremod,re:classloading,pl:accesstransformer:B,xf:fml:forgeendertech:coremod,pl:mixin:APP:modernfix-common.mixins.json:bugfix.chunk_deadlock.BlockStateBaseMixin,pl:mixin:APP:modernfix-common.mixins.json:perf.reduce_blockstate_cache_rebuilds.BlockStateBaseMixin,pl:mixin:APP:arc-common.mixins.json:MixinBlockStateBase,pl:mixin:APP:byg.mixins.json:common.block.MixinBlockBehaviourBlockStateBase,pl:mixin:APP:fruitsdelight.mixins.json:BlockStateBaseMixin,pl:mixin:APP:twigs.mixins.json:BlockStateBaseMixin,pl:mixin:APP:ferritecore.blockstatecache.mixin.json:BlockStateBaseMixin,pl:mixin:APP:valhelsia_core.mixins.json:BlockStateBaseMixin,pl:mixin:A}
    at net.minecraft.server.level.ServerLevel.m_8714_(ServerLevel.java:446) ~[server-1.19.2-20220805.130853-srg.jar%23543!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:forgeendertech:coremod,xf:fml:sereneseasons:temperature_transformer,re:classloading,pl:accesstransformer:B,xf:fml:forgeendertech:coremod,xf:fml:sereneseasons:temperature_transformer,pl:mixin:APP:cupboard.mixins.json:ServerAddEntityMixin,pl:mixin:APP:betterendisland.mixins.json:ServerLevelMixin,pl:mixin:APP:modernfix-common.mixins.json:perf.cache_strongholds.ServerLevelMixin,pl:mixin:APP:modernfix-common.mixins.json:bugfix.chunk_deadlock.ServerLevelMixin,pl:mixin:APP:leavesbegone.common.mixins.json:ServerLevelMixin,pl:mixin:APP:supplementaries-common.mixins.json:ServerLevelMixin,pl:mixin:APP:endergetic.mixins.json:ServerLevelMixin,pl:mixin:APP:corgilib.mixins.json:MixinServerLevel,pl:mixin:APP:byg.mixins.json:common.world.MixinServerLevel,pl:mixin:APP:aether.mixins.json:common.accessor.ServerLevelAccessor,pl:mixin:APP:forge-mca.mixin.json:MixinServerWorld,pl:mixin:APP:betterdeserttemples.mixins.json:ServerLevelMixin,pl:mixin:APP:blueprint.mixins.json:ServerLevelMixin,pl:mixin:APP:friendsandfoes-common.mixins.json:ServerWorldAccessor,pl:mixin:APP:friendsandfoes-common.mixins.json:ServerWorldMixin,pl:mixin:APP:atmospheric.mixins.json:ServerLevelMixin,pl:mixin:APP:ars_elemental.mixins.json:ServerLevelMixin,pl:mixin:APP:create.mixins.json:accessor.ServerLevelAccessor,pl:mixin:APP:betterendisland.mixins.json:EndergeticExpansionMixins,pl:mixin:A}
Faboslav commented 6 months ago

Hello there, i am not sure what exactly is wrong, but there is a high chance, that your @Override on mentioned mixins is ruining the compatibility, you should always "inject" into the original methods instead.

bageldotjpg commented 6 months ago

Hello there, i am not sure what exactly is wrong, but there is a high chance, that your @Override on mentioned mixins is ruining the compatibility, you should always "inject" into the original methods instead.

With commit ce59ec1a85aa2b761195633daeec82e4c1324f24 I've done just about all I can to make sure the mixins are compatible on my end, seeing as the issue lies with the ticking and not the @Override methods - they are not affecting the compatibility. I believe the issue lies somewhere on Friends and Foes' end, seeing as the issue persists despite changing my tick-based mixins to inject. I can't really understand the Friends and Foes mixins though, as they are very oddly set up and I can not tell exactly what t hey are doing.

Faboslav commented 5 months ago

I tried to check things again, but i still have no idea how to resolve this, so everything is compatible, on fabric side i am able to scrape all custom oxidation related things with the help of mixins and use the vanilla ones, on forge side, its possible too with ASM, as some of the mixins are not possible, but i cant do that kind of refactor due to my limited technical knowledge on ASM.

Faboslav commented 4 months ago

I still dont know where is the problem (and if its on my side), but I managed to rework the whole thing, with next major release, my mod will be using purely vanilla oxidatiton(weathering) and waxables, hopefully that will help.