Crash while dying with Bauble in Curios slot with Corpse Complex
SlashLife opened this issue · 1 comments
Environment (CurseForge):
- Minecraft 1.16.4
- forge-35.1.36
- Botania 1.16.4-410
- Corpse Complex 1.16.4-4.0.0.3
- Curios API (Forge) 1.16.4-4.0.3.3
- Patchouli 1.16.4-48
Configuration:
- serverconfig/corpsecomplex-server.toml
[inventory.curios]
Set: curioKeepChance = 1.0 - Default configurations otherwise
Steps to reproduce:
- Create new world (with cheats on)
- Quit world
- Open server config for the world and make the above configuration change
- Rejoin the world
- Spawn and equip Manaseer Monocle in Curios Charm slot
- Die (e.g. by bathing in lava)
Expected behavior:
Death screen and the Manaseer Monocle in the Charm slot after respawn.
Actual behavior:
CTD; after restarting Minecraft and rejoining the world: Expected behavior (Death screen and the Manaseer Monocle in the Charm slot after respawn.)
Assumption (not checked): Corpse Complex replaces the item in the slot with an AirItem to prevent a dupe from dropping; Botania then does not check the type before casting it to ItemBauble (see exception and code location below).
Backtrace:
Encountered an unexpected exception
net.minecraft.crash.ReportedException: Ticking player
at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:137)
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:864)
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:786)
at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:78)
at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:641)
at net.minecraft.server.MinecraftServer.lambda$startServer$0(MinecraftServer.java:232)
at net.minecraft.server.MinecraftServer$$Lambda$5931/580979569.run(Unknown Source)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassCastException: net.minecraft.item.AirItem cannot be cast to vazkii.botania.common.item.equipment.bauble.ItemBauble
at vazkii.botania.common.integration.curios.CurioIntegration$Wrapper.getItem(CurioIntegration.java:110)
at vazkii.botania.common.integration.curios.CurioIntegration$Wrapper.getAttributeModifiers(CurioIntegration.java:135)
at top.theillusivec4.curios.common.CuriosHelper.lambda$getAttributeModifiers$4(CuriosHelper.java:154)
at top.theillusivec4.curios.common.CuriosHelper$$Lambda$6791/1944081600.apply(Unknown Source)
at net.minecraftforge.common.util.LazyOptional.map(LazyOptional.java:206)
at top.theillusivec4.curios.common.CuriosHelper.getAttributeModifiers(CuriosHelper.java:154)
at top.theillusivec4.curios.common.event.CuriosEventHandler.lambda$tick$23(CuriosEventHandler.java:423)
at top.theillusivec4.curios.common.event.CuriosEventHandler$$Lambda$6238/1595255702.accept(Unknown Source)
at net.minecraftforge.common.util.LazyOptional.ifPresent(LazyOptional.java:161)
at top.theillusivec4.curios.common.event.CuriosEventHandler.tick(CuriosEventHandler.java:378)
at net.minecraftforge.eventbus.ASMEventHandler_70_CuriosEventHandler_tick_LivingUpdateEvent.invoke(.dynamic)
at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85)
at net.minecraftforge.eventbus.EventBus.post(EventBus.java:297)
at net.minecraftforge.common.ForgeHooks.onLivingUpdate(ForgeHooks.java:320)
at net.minecraft.entity.LivingEntity.func_70071_h_(LivingEntity.java:2112)
at net.minecraft.entity.player.PlayerEntity.func_70071_h_(PlayerEntity.java:223)
at net.minecraft.entity.player.ServerPlayerEntity.func_71127_g(ServerPlayerEntity.java:404)
at net.minecraft.network.play.ServerPlayNetHandler.func_73660_a(ServerPlayNetHandler.java:207)
at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:226)
at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:134)