Continuation of Cannot invoke because "curse" is null
erisu opened this issue ยท 5 comments
This error is similar or exactly the same to #109 but from a different invoke.
I dont believe its a regression because the fixes from 231a729 still exists in 1.18 branch and appears to be in biomemakeover-FORGE-1.18.2-1.4.23.jar
.
Stack Trace
java.lang.NullPointerException: Cannot invoke "net.minecraft.world.item.enchantment.Enchantment.m_6081_(net.minecraft.world.item.ItemStack)" because "curse" is null
at party.lemons.biomemakeover.block.blockentity.AltarBlockEntity.curseItemStack(AltarBlockEntity.java:275) ~[biomemakeover-FORGE-1.18.2-1.4.23.jar%2360!/:?] {re:classloading}
at party.lemons.biomemakeover.block.blockentity.AltarBlockEntity.tick(AltarBlockEntity.java:123) ~[biomemakeover-FORGE-1.18.2-1.4.23.jar%2360!/:?] {re:classloading}
at party.lemons.biomemakeover.block.blockentity.AltarBlockEntity.lambda$getTicker$2(AltarBlockEntity.java:412) ~[biomemakeover-FORGE-1.18.2-1.4.23.jar%2360!/:?] {re:classloading}
at net.minecraft.world.level.chunk.LevelChunk$BoundTickingBlockEntity.m_142224_(LevelChunk.java:673) ~[server-1.18.2-20220404.173914-srg.jar%23256!/:?] {re:classloading}
at net.minecraft.world.level.chunk.LevelChunk$RebindableTickingBlockEntityWrapper.m_142224_(LevelChunk.java:766) ~[server-1.18.2-20220404.173914-srg.jar%23256!/:?] {re:classloading}
at net.minecraft.world.level.Level.m_46463_(Level.java:475) ~[server-1.18.2-20220404.173914-srg.jar%23256!/:?] {re:computing_frames,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:biomemakeover-common.mixins.json:multipart.LevelMixin,pl:mixin:APP:enhancedcelestials.mixins.json:MixinWorld,pl:mixin:APP:radium.mixins.json:alloc.chunk_random.WorldMixin,pl:mixin:APP:radium.mixins.json:world.block_entity_retrieval.WorldMixin,pl:mixin:APP:radium.mixins.json:world.chunk_access.WorldMixin,pl:mixin:APP:radium.mixins.json:world.inline_block_access.WorldMixin,pl:mixin:APP:radium.mixins.json:world.inline_height.WorldMixin,pl:mixin:APP:sereneseasons.mixins.json:MixinLevel,pl:mixin:A}
at net.minecraft.server.level.ServerLevel.m_8793_(ServerLevel.java:327) ~[server-1.18.2-20220404.173914-srg.jar%23256!/:?] {re:mixin,pl:accesstransformer:B,xf:fml:sereneseasons:temperature_transformer,re:classloading,pl:accesstransformer:B,xf:fml:sereneseasons:temperature_transformer,pl:mixin:APP:biomemakeover-common.mixins.json:multipart.ServerLevelMixin,pl:mixin:APP:blueprint.mixins.json:ServerLevelMixin,pl:mixin:APP:crafttweaker.mixins.json:common.transform.world.level.MixinServerLevel,pl:mixin:APP:enhancedcelestials.mixins.json:MixinServerWorld,pl:mixin:APP:friendsandfoes-common.mixins.json:ServerWorldAccessor,pl:mixin:APP:immersive_weathering.mixins.json:ServerLevellMixin,pl:mixin:APP:immersive_weathering.mixins.json:ServerLevelSnowMixin,pl:mixin:APP:byg.mixins.json:common.world.MixinServerLevel,pl:mixin:APP:radium.mixins.json:ai.nearby_entity_tracking.ServerWorldAccessor,pl:mixin:APP:radium.mixins.json:alloc.chunk_random.ServerWorldMixin,pl:mixin:APP:radium.mixins.json:chunk.entity_class_groups.ServerWorldAccessor,pl:mixin:APP:radium.mixins.json:entity.inactive_navigations.ServerWorldMixin,pl:mixin:APP:radium.mixins.json:profiler.ServerWorldMixin,pl:mixin:APP:supplementaries.mixins.json:ServerLevelMixin,pl:mixin:APP:wandering_trapper.mixins.json:ServerLevelMixin,pl:mixin:A}
at net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:902) ~[server-1.18.2-20220404.173914-srg.jar%23256!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:crafttweaker.mixins.json:common.access.server.AccessMinecraftServer,pl:mixin:APP:mixin.excavated_variants.json:IMinecraftServerMixin,pl:mixin:APP:byg.mixins.json:access.MinecraftServerAccess,pl:mixin:APP:byg.mixins.json:server.MixinMinecraftServer,pl:mixin:APP:paxi.mixins.json:MixinMinecraftServer,pl:mixin:A}
at net.minecraft.server.dedicated.DedicatedServer.m_5703_(DedicatedServer.java:326) ~[server-1.18.2-20220404.173914-srg.jar%23256!/:?] {re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}
at net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:842) ~[server-1.18.2-20220404.173914-srg.jar%23256!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:crafttweaker.mixins.json:common.access.server.AccessMinecraftServer,pl:mixin:APP:mixin.excavated_variants.json:IMinecraftServerMixin,pl:mixin:APP:byg.mixins.json:access.MinecraftServerAccess,pl:mixin:APP:byg.mixins.json:server.MixinMinecraftServer,pl:mixin:APP:paxi.mixins.json:MixinMinecraftServer,pl:mixin:A}
at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:685) ~[server-1.18.2-20220404.173914-srg.jar%23256!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:crafttweaker.mixins.json:common.access.server.AccessMinecraftServer,pl:mixin:APP:mixin.excavated_variants.json:IMinecraftServerMixin,pl:mixin:APP:byg.mixins.json:access.MinecraftServerAccess,pl:mixin:APP:byg.mixins.json:server.MixinMinecraftServer,pl:mixin:APP:paxi.mixins.json:MixinMinecraftServer,pl:mixin:A}
at net.minecraft.server.MinecraftServer.m_177918_(MinecraftServer.java:261) ~[server-1.18.2-20220404.173914-srg.jar%23256!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:crafttweaker.mixins.json:common.access.server.AccessMinecraftServer,pl:mixin:APP:mixin.excavated_variants.json:IMinecraftServerMixin,pl:mixin:APP:byg.mixins.json:access.MinecraftServerAccess,pl:mixin:APP:byg.mixins.json:server.MixinMinecraftServer,pl:mixin:APP:paxi.mixins.json:MixinMinecraftServer,pl:mixin:A}
at java.lang.Thread.run(Thread.java:833) [?:?] {re:mixin}
I think I can see what code is causing the crash, but I'm curious what conditions trigger it. Do you have a full log? Do you have any mods that might be messing with enchantments? What item was being cursed?
Do you have a full log?
https://gist.github.com/erisu/45ae142eb900d11bd237d3790854c76d
Do you have any mods that might be messing with enchantments?
I believe no mods were messing with enchantments. At least no one mentioned about it.
What item was being cursed?
I asked the person who first experienced this issue and here is what I was told:
- Ancient Tome w/ Punch 1
- It was placed it in the alter, which was working, but when it was done it would crash the server and make the chunck area broken.
That makes sense - it couldn't find any valid curses to put on the tome as it's not an item that usually receives curses.
This is supposed to be caught and mitigated, but I've noticed a flaw in that code.
Thanks for the report - I'll get a fix out shortly.