Areas (Forge)

Areas (Forge)

890k Downloads

Player's inventory is deleted on death if player heads are active

mtlballer opened this issue ยท 4 comments

commented

Information

Minecraft version: 1.19.0
Modloader: Forge
Forge version: 41.1.0
Environment: Singleplayer / Multiplayer - Both

Mod name: Just Player Heads
Mod version: 1.19.0-2.2

Description

Either on death or trying to execute the /jph commands gives an:
index 1 out of bounds for length 1 error.
If this happens during death the player's inventory gets deleted(even items that cannot be lost through normal means)

Crash report

No crash report

commented

Can you please post the full exception from the server log?

See also #1470

commented

I'm afraid I am not the server owner, however I can post the log from SP. As I said it is easily reproduced in both and the server owner has fixed the issue by disabling player head drops in the config for the time being.

Here is the relevant portion of the client log:

[18:37:04] [Server thread/ERROR] [ne.mi.ev.EventBus/EVENTBUS]: Exception caught during firing event: Index 1 out of bounds for length 1
Index: 6
Listeners:
0: HIGH
1: ASM: class dev.architectury.event.forge.EventHandlerImplCommon event(Lnet/minecraftforge/event/entity/living/LivingDeathEvent;)V
2: NORMAL
3: ASM: com.rolfmao.upgradednetherite.handlers.SoulboundEventHandler@f0dd195 onLivingDeathEvent(Lnet/minecraftforge/event/entity/living/LivingDeathEvent;)V
4: ASM: class com.rolfmao.upgradednetherite.handlers.WeaponEventHandler onLivingDeath(Lnet/minecraftforge/event/entity/living/LivingDeathEvent;)V
5: ASM: class com.mlib.gamemodifiers.contexts.OnDeathContext onDamaged(Lnet/minecraftforge/event/entity/living/LivingDeathEvent;)V
6: ASM: com.natamus.justplayerheads.events.PlayerEvent@7f86deca entityDeath(Lnet/minecraftforge/event/entity/living/LivingDeathEvent;)V
java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
at TRANSFORMER/[email protected]/com.natamus.collective.functions.HeadFunctions.getPlayerHead(HeadFunctions.java:24)
at TRANSFORMER/[email protected]/com.natamus.justplayerheads.events.PlayerEvent.entityDeath(PlayerEvent.java:57)
at TRANSFORMER/[email protected]/com.natamus.justplayerheads.events.PlayerEvent_entityDeath_LivingDeathEvent.invoke(.dynamic)
at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:93)
at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.post(EventBus.java:302)
at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.post(EventBus.java:283)
at TRANSFORMER/[email protected]/net.minecraftforge.common.ForgeHooks.onLivingDeath(ForgeHooks.java:298)
at TRANSFORMER/[email protected]/net.minecraft.server.level.ServerPlayer.m_6667
(ServerPlayer.java:552)
at TRANSFORMER/[email protected]/net.minecraft.world.entity.LivingEntity.m_6469
(LivingEntity.java:1155)
at TRANSFORMER/[email protected]/net.minecraft.world.entity.player.Player.m_6469_(Player.java:861)
at TRANSFORMER/[email protected]/net.minecraft.server.level.ServerPlayer.m_6469_(ServerPlayer.java:673)
at TRANSFORMER/[email protected]/net.minecraft.world.entity.LivingEntity.m_142535_(LivingEntity.java:1485)
at TRANSFORMER/[email protected]/net.minecraft.world.entity.player.Player.m_142535_(Player.java:1539)
at TRANSFORMER/[email protected]/net.minecraft.world.level.block.Block.m_142072_(Block.java:388)
at TRANSFORMER/[email protected]/net.minecraft.world.entity.Entity.m_7840_(Entity.java:1015)
at TRANSFORMER/[email protected]/net.minecraft.world.entity.LivingEntity.m_7840_(LivingEntity.java:302)
at TRANSFORMER/[email protected]/net.minecraft.server.level.ServerPlayer.m_8972_(ServerPlayer.java:945)
at TRANSFORMER/[email protected]/net.minecraft.server.network.ServerGamePacketListenerImpl.m_7185_(ServerGamePacketListenerImpl.java:894)
at TRANSFORMER/[email protected]/net.minecraft.network.protocol.game.ServerboundMovePlayerPacket.m_5797_(ServerboundMovePlayerPacket.java:114)
at TRANSFORMER/[email protected]/net.minecraft.network.protocol.game.ServerboundMovePlayerPacket$Pos.m_5797_(ServerboundMovePlayerPacket.java:42)
at TRANSFORMER/[email protected]/net.minecraft.network.protocol.PacketUtils.lambda$checkThreadAndEnqueue$0(PacketUtils.java:40)
at TRANSFORMER/net.optifine/net.optifine.util.PacketRunnable.run(PacketRunnable.java:28)
at TRANSFORMER/[email protected]/net.minecraft.server.TickTask.run(TickTask.java:18)
at TRANSFORMER/[email protected]/net.minecraft.util.thread.BlockableEventLoop.m_6367_(BlockableEventLoop.java:198)
at TRANSFORMER/[email protected]/net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(ReentrantBlockableEventLoop.java:23)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:763)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:158)
at TRANSFORMER/[email protected]/net.minecraft.util.thread.BlockableEventLoop.m_7245_(BlockableEventLoop.java:163)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_129961_(MinecraftServer.java:746)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_7245_(MinecraftServer.java:740)
at TRANSFORMER/[email protected]/net.minecraft.util.thread.BlockableEventLoop.m_18701_(BlockableEventLoop.java:176)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_130012_(MinecraftServer.java:726)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:658)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_177918_(MinecraftServer.java:245)
at java.base/java.lang.Thread.run(Thread.java:833)

[18:37:04] [Server thread/ERROR] [minecraft/PacketUtils]: Failed to handle packet net.minecraft.network.protocol.game.ServerboundMovePlayerPacket$Pos@50f0e6d2, suppressing error
java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
at com.natamus.collective.functions.HeadFunctions.getPlayerHead(HeadFunctions.java:24) ~[collective-1.19.0-4.30.jar%23138!/:4.30] {re:classloading}
at com.natamus.justplayerheads.events.PlayerEvent.entityDeath(PlayerEvent.java:57) ~[justplayerheads_1.19.0-2.2.jar%23158!/:1.0] {re:classloading}
at com.natamus.justplayerheads.events.PlayerEvent_entityDeath_LivingDeathEvent.invoke(.dynamic) ~[justplayerheads_1.19.0-2.2.jar%23158!/:1.0] {re:classloading,pl:eventbus:B}
at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:93) ~[eventbus-6.0.0.jar%23105!/:?] {}
at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-6.0.0.jar%23105!/:?] {}
at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-6.0.0.jar%23105!/:?] {}
at net.minecraftforge.common.ForgeHooks.onLivingDeath(ForgeHooks.java:298) ~[forge-1.19-41.1.0-universal.jar%23210!/:?] {re:classloading}
at net.minecraft.server.level.ServerPlayer.m_6667
(ServerPlayer.java:552) ~[client-1.19-20220607.102129-srg.jar%23205!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:byg.mixins.json:common.entity.MixinServerPlayer,pl:mixin:APP:krypton.mixins.json:shared.player.ServerPlayerEntityMixin,pl:mixin:A}
at net.minecraft.world.entity.LivingEntity.m_6469
(LivingEntity.java:1155) ~[client-1.19-20220607.102129-srg.jar%23205!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:caelus.mixins.json:MixinLivingEntity,pl:mixin:APP:bookshelf.common.mixins.json:entity.AccessorLivingEntity,pl:mixin:APP:curios.mixins.json:MixinLivingEntity,pl:mixin:APP:mixins.mlib.json:MixinLivingEntity,pl:mixin:APP:charmofundying.mixins.json:MixinLivingEntity,pl:mixin:A}
at net.minecraft.world.entity.player.Player.m_6469_(Player.java:861) ~[client-1.19-20220607.102129-srg.jar%23205!/:?] {re:computing_frames,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_playerentity_iswearing,xf:fml:xaerominimap:xaero_playerentity_iswearing,re:mixin,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_playerentity_iswearing,xf:fml:xaerominimap:xaero_playerentity_iswearing,re:classloading,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_playerentity_iswearing,xf:fml:xaerominimap:xaero_playerentity_iswearing,pl:mixin:APP:byg.mixins.json:common.entity.MixinPlayer,pl:mixin:A}
at net.minecraft.server.level.ServerPlayer.m_6469_(ServerPlayer.java:673) ~[client-1.19-20220607.102129-srg.jar%23205!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:byg.mixins.json:common.entity.MixinServerPlayer,pl:mixin:APP:krypton.mixins.json:shared.player.ServerPlayerEntityMixin,pl:mixin:A}
at net.minecraft.world.entity.LivingEntity.m_142535_(LivingEntity.java:1485) ~[client-1.19-20220607.102129-srg.jar%23205!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:caelus.mixins.json:MixinLivingEntity,pl:mixin:APP:bookshelf.common.mixins.json:entity.AccessorLivingEntity,pl:mixin:APP:curios.mixins.json:MixinLivingEntity,pl:mixin:APP:mixins.mlib.json:MixinLivingEntity,pl:mixin:APP:charmofundying.mixins.json:MixinLivingEntity,pl:mixin:A}
at net.minecraft.world.entity.player.Player.m_142535_(Player.java:1539) ~[client-1.19-20220607.102129-srg.jar%23205!/:?] {re:computing_frames,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_playerentity_iswearing,xf:fml:xaerominimap:xaero_playerentity_iswearing,re:mixin,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_playerentity_iswearing,xf:fml:xaerominimap:xaero_playerentity_iswearing,re:classloading,pl:accesstransformer:B,xf:fml:xaeroworldmap:xaero_wm_playerentity_iswearing,xf:fml:xaerominimap:xaero_playerentity_iswearing,pl:mixin:APP:byg.mixins.json:common.entity.MixinPlayer,pl:mixin:A}
at net.minecraft.world.level.block.Block.m_142072_(Block.java:388) ~[client-1.19-20220607.102129-srg.jar%23205!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:cfm.mixins.json:client.BlockMixin,pl:mixin:A}
at net.minecraft.world.entity.Entity.m_7840_(Entity.java:1015) ~[client-1.19-20220607.102129-srg.jar%23205!/:?] {re:computing_frames,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:bookshelf.common.mixins.json:entity.AccessorEntity,pl:mixin:A}
at net.minecraft.world.entity.LivingEntity.m_7840_(LivingEntity.java:302) ~[client-1.19-20220607.102129-srg.jar%23205!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:caelus.mixins.json:MixinLivingEntity,pl:mixin:APP:bookshelf.common.mixins.json:entity.AccessorLivingEntity,pl:mixin:APP:curios.mixins.json:MixinLivingEntity,pl:mixin:APP:mixins.mlib.json:MixinLivingEntity,pl:mixin:APP:charmofundying.mixins.json:MixinLivingEntity,pl:mixin:A}
at net.minecraft.server.level.ServerPlayer.m_8972_(ServerPlayer.java:945) ~[client-1.19-20220607.102129-srg.jar%23205!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:byg.mixins.json:common.entity.MixinServerPlayer,pl:mixin:APP:krypton.mixins.json:shared.player.ServerPlayerEntityMixin,pl:mixin:A}
at net.minecraft.server.network.ServerGamePacketListenerImpl.m_7185_(ServerGamePacketListenerImpl.java:894) ~[client-1.19-20220607.102129-srg.jar%23205!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:A}
at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket.m_5797_(ServerboundMovePlayerPacket.java:114) ~[client-1.19-20220607.102129-srg.jar%23205!/:?] {re:classloading}
at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket$Pos.m_5797_(ServerboundMovePlayerPacket.java:42) ~[client-1.19-20220607.102129-srg.jar%23205!/:?] {re:classloading}
at net.minecraft.network.protocol.PacketUtils.lambda$checkThreadAndEnqueue$0(PacketUtils.java:40) ~[client-1.19-20220607.102129-srg.jar%23205!/:?] {re:classloading,xf:OptiFine:default}
at net.optifine.util.PacketRunnable.run(PacketRunnable.java:28) ~[OptiFine_1.19_HD_U_H9.jar%23211!/:?] {re:classloading}
at net.minecraft.server.TickTask.run(TickTask.java:18) ~[client-1.19-20220607.102129-srg.jar%23205!/:?] {re:classloading}
at net.minecraft.util.thread.BlockableEventLoop.m_6367_(BlockableEventLoop.java:198) ~[client-1.19-20220607.102129-srg.jar%23205!/:?] {re:mixin,pl:accesstransformer:B,xf:OptiFine:default,re:computing_frames,pl:accesstransformer:B,xf:OptiFine:default,re:classloading,pl:accesstransformer:B,xf:OptiFine:default}
at net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(ReentrantBlockableEventLoop.java:23) ~[client-1.19-20220607.102129-srg.jar%23205!/:?] {re:mixin,re:computing_frames,re:classloading}
at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:763) ~[client-1.19-20220607.102129-srg.jar%23205!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:byg.mixins.json:access.MinecraftServerAccess,pl:mixin:APP:byg.mixins.json:server.MixinMinecraftServer,pl:mixin:A}
at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:158) ~[client-1.19-20220607.102129-srg.jar%23205!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:byg.mixins.json:access.MinecraftServerAccess,pl:mixin:APP:byg.mixins.json:server.MixinMinecraftServer,pl:mixin:A}
at net.minecraft.util.thread.BlockableEventLoop.m_7245_(BlockableEventLoop.java:163) ~[client-1.19-20220607.102129-srg.jar%23205!/:?] {re:mixin,pl:accesstransformer:B,xf:OptiFine:default,re:computing_frames,pl:accesstransformer:B,xf:OptiFine:default,re:classloading,pl:accesstransformer:B,xf:OptiFine:default}
at net.minecraft.server.MinecraftServer.m_129961_(MinecraftServer.java:746) ~[client-1.19-20220607.102129-srg.jar%23205!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:byg.mixins.json:access.MinecraftServerAccess,pl:mixin:APP:byg.mixins.json:server.MixinMinecraftServer,pl:mixin:A}
at net.minecraft.server.MinecraftServer.m_7245_(MinecraftServer.java:740) ~[client-1.19-20220607.102129-srg.jar%23205!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:byg.mixins.json:access.MinecraftServerAccess,pl:mixin:APP:byg.mixins.json:server.MixinMinecraftServer,pl:mixin:A}
at net.minecraft.util.thread.BlockableEventLoop.m_18701_(BlockableEventLoop.java:176) ~[client-1.19-20220607.102129-srg.jar%23205!/:?] {re:mixin,pl:accesstransformer:B,xf:OptiFine:default,re:computing_frames,pl:accesstransformer:B,xf:OptiFine:default,re:classloading,pl:accesstransformer:B,xf:OptiFine:default}
at net.minecraft.server.MinecraftServer.m_130012_(MinecraftServer.java:726) ~[client-1.19-20220607.102129-srg.jar%23205!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:byg.mixins.json:access.MinecraftServerAccess,pl:mixin:APP:byg.mixins.json:server.MixinMinecraftServer,pl:mixin:A}
at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:658) ~[client-1.19-20220607.102129-srg.jar%23205!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:byg.mixins.json:access.MinecraftServerAccess,pl:mixin:APP:byg.mixins.json:server.MixinMinecraftServer,pl:mixin:A}
at net.minecraft.server.MinecraftServer.m_177918_(MinecraftServer.java:245) ~[client-1.19-20220607.102129-srg.jar%23205!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:balm.mixins.json:MinecraftServerMixin,pl:mixin:APP:byg.mixins.json:access.MinecraftServerAccess,pl:mixin:APP:byg.mixins.json:server.MixinMinecraftServer,pl:mixin:A}
at java.lang.Thread.run(Thread.java:833) [?:?] {re:mixin}

commented

Does this still happen? I assume it had something to do with the API being down, giving a strange output which the mod didn't expect. But when trying it in my dev environment, it just works.

commented

I believe it was due to the API being down, which the mod did not like. Thanks for opening the issue and giving the mod a try! Everything should work again as normal, but just in case I've uploaded version 5.35 of Collective to prevent errors in the future. Apologies for the inconvenience.

https://www.curseforge.com/minecraft/mc-mods/collective/files