Duplication Backpack Glitch on Server
XItzCrazy opened this issue ยท 1 comments
Describe the bug
in a mohist server when you place a backpack on the ground and it breaks when you try to move it to the inventory the backpack duplicates itself with all the objects inside, furthermore, a long error appears in the console every time a positioned backpack breaks.
Error in console:
> [18:07:06 ERROR]: Exception caught during firing event: The blockState must be placed to call this method
> Index: 3
> Listeners:
> 0: HIGH
> 1: ASM: class me.shedaniel.architectury.event.forge.EventHandlerImplCommon event(Lnet/minecraftforge/event/world/BlockEvent$EntityPlaceEvent;)V
> 2: NORMAL
> 3: ASM: com.mohistmc.eventhandler.dispatcher.BlockEventDispatcher@24770e8a onMultiPlace(Lnet/minecraftforge/event/world/BlockEvent$EntityMultiPlaceEvent;)V
> 4: ASM: com.mohistmc.eventhandler.dispatcher.BlockEventDispatcher@24770e8a onBlockPlace(Lnet/minecraftforge/event/world/BlockEvent$EntityPlaceEvent;)V
> 5: ASM: vazkii.quark.content.tools.module.SkullPikesModule@525cb096 onPlaceBlock(Lnet/minecraftforge/event/world/BlockEvent$EntityPlaceEvent;)V
> 6: ASM: com.pixelmonmod.pixelmon.quests.listeners.BlockListeners@10e10934 onBlockPlace(Lnet/minecraftforge/event/world/BlockEvent$EntityPlaceEvent;)V
> java.lang.IllegalStateException: The blockState must be placed to call this method
> at org.bukkit.craftbukkit.v1_16_R3.block.CraftBlockState.requirePlaced(CraftBlockState.java:289)
> at org.bukkit.craftbukkit.v1_16_R3.block.CraftBlockState.getBlock(CraftBlockState.java:155)
> at org.bukkit.craftbukkit.v1_16_R3.block.CraftBlockState.getBlock(CraftBlockState.java:22)
> at org.bukkit.event.block.BlockMultiPlaceEvent.<init>(BlockMultiPlaceEvent.java:22)
> at com.mohistmc.eventhandler.dispatcher.BlockEventDispatcher.onMultiPlace(BlockEventDispatcher.java:111)
> at net.minecraftforge.eventbus.ASMEventHandler_114_BlockEventDispatcher_onMultiPlace_EntityMultiPlaceEvent.invoke(.dynamic)
> at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85)
> at net.minecraftforge.eventbus.EventBus.post(EventBus.java:304)
> at net.minecraftforge.eventbus.EventBus.post(EventBus.java:284)
> at net.minecraftforge.event.ForgeEventFactory.onMultiBlockPlace(ForgeEventFactory.java:149)
> at net.minecraftforge.common.ForgeHooks.onPlaceItemIntoWorld(ForgeHooks.java:675)
> at net.minecraft.item.ItemStack.func_196084_a(ItemStack.java:208)
> at net.minecraft.server.management.PlayerInteractionManager.func_219441_a(PlayerInteractionManager.java:470)
> at net.minecraft.network.play.ServerPlayNetHandler.func_184337_a(ServerPlayNetHandler.java:1411)
> at net.minecraft.network.play.client.CPlayerTryUseItemOnBlockPacket.func_148833_a(CPlayerTryUseItemOnBlockPacket.java:38)
> at net.minecraft.network.play.client.CPlayerTryUseItemOnBlockPacket.func_148833_a(CPlayerTryUseItemOnBlockPacket.java:12)
> at net.minecraft.network.PacketThreadUtil.func_225383_a(PacketThreadUtil.java:22)
> at net.minecraft.util.concurrent.TickDelayedTask.run(SourceFile:18)
> at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213166_h(ThreadTaskExecutor.java:153)
> at net.minecraft.util.concurrent.RecursiveEventLoop.func_213166_h(SourceFile:23)
> at net.minecraft.server.MinecraftServer.func_213166_h(MinecraftServer.java:936)
> at net.minecraft.server.MinecraftServer.func_213166_h(MinecraftServer.java:174)
> at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213168_p(ThreadTaskExecutor.java:126)
> at net.minecraft.server.MinecraftServer.func_213205_aW(MinecraftServer.java:919)
> at net.minecraft.server.MinecraftServer.func_213168_p(MinecraftServer.java:913)
> at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213161_c(ThreadTaskExecutor.java:136)
> at net.minecraft.server.MinecraftServer.func_213202_o(MinecraftServer.java:899)
> at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:819)
> at net.minecraft.server.MinecraftServer.func_240783_a_(MinecraftServer.java:267)
> at java.base/java.lang.Thread.run(Thread.java:829)
> [18:07:06 FATAL]: Error executing task on Server
> [18:07:06 WARN]: java.lang.IllegalStateException: The blockState must be placed to call this method
> [18:07:06 WARN]: at org.bukkit.craftbukkit.v1_16_R3.block.CraftBlockState.requirePlaced(CraftBlockState.java:289)
> [18:07:06 WARN]: at org.bukkit.craftbukkit.v1_16_R3.block.CraftBlockState.getBlock(CraftBlockState.java:155)
> [18:07:06 WARN]: at org.bukkit.craftbukkit.v1_16_R3.block.CraftBlockState.getBlock(CraftBlockState.java:22)
> [18:07:06 WARN]: at org.bukkit.event.block.BlockMultiPlaceEvent.<init>(BlockMultiPlaceEvent.java:22)
> [18:07:06 WARN]: at com.mohistmc.eventhandler.dispatcher.BlockEventDispatcher.onMultiPlace(BlockEventDispatcher.java:111)
> [18:07:06 WARN]: at net.minecraftforge.eventbus.ASMEventHandler_114_BlockEventDispatcher_onMultiPlace_EntityMultiPlaceEvent.invoke(.dynamic)
> [18:07:06 WARN]: at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85)
> [18:07:06 WARN]: at net.minecraftforge.eventbus.EventBus.post(EventBus.java:304)
> [18:07:06 WARN]: at net.minecraftforge.eventbus.EventBus.post(EventBus.java:284)
> [18:07:06 WARN]: at net.minecraftforge.event.ForgeEventFactory.onMultiBlockPlace(ForgeEventFactory.java:149)
> [18:07:06 WARN]: at net.minecraftforge.common.ForgeHooks.onPlaceItemIntoWorld(ForgeHooks.java:675)
> [18:07:06 WARN]: at net.minecraft.item.ItemStack.func_196084_a(ItemStack.java:208)
> [18:07:06 WARN]: at net.minecraft.server.management.PlayerInteractionManager.func_219441_a(PlayerInteractionManager.java:470)
> [18:07:06 WARN]: at net.minecraft.network.play.ServerPlayNetHandler.func_184337_a(ServerPlayNetHandler.java:1411)
> [18:07:06 WARN]: at net.minecraft.network.play.client.CPlayerTryUseItemOnBlockPacket.func_148833_a(CPlayerTryUseItemOnBlockPacket.java:38)
> [18:07:06 WARN]: at net.minecraft.network.play.client.CPlayerTryUseItemOnBlockPacket.func_148833_a(CPlayerTryUseItemOnBlockPacket.java:12)
> [18:07:06 WARN]: at net.minecraft.network.PacketThreadUtil.func_225383_a(PacketThreadUtil.java:22)
> [18:07:06 WARN]: at net.minecraft.util.concurrent.TickDelayedTask.run(SourceFile:18)
> [18:07:06 WARN]: at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213166_h(ThreadTaskExecutor.java:153)
> [18:07:06 WARN]: at net.minecraft.util.concurrent.RecursiveEventLoop.func_213166_h(SourceFile:23)
> [18:07:06 WARN]: at net.minecraft.server.MinecraftServer.func_213166_h(MinecraftServer.java:936)
> [18:07:06 WARN]: at net.minecraft.server.MinecraftServer.func_213166_h(MinecraftServer.java:174)
> [18:07:06 WARN]: at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213168_p(ThreadTaskExecutor.java:126)
> [18:07:06 WARN]: at net.minecraft.server.MinecraftServer.func_213205_aW(MinecraftServer.java:919)
> [18:07:06 WARN]: at net.minecraft.server.MinecraftServer.func_213168_p(MinecraftServer.java:913)
> [18:07:06 WARN]: at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213161_c(ThreadTaskExecutor.java:136)
> [18:07:06 WARN]: at net.minecraft.server.MinecraftServer.func_213202_o(MinecraftServer.java:899)
> [18:07:06 WARN]: at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:819)
> [18:07:06 WARN]: at net.minecraft.server.MinecraftServer.func_240783_a_(MinecraftServer.java:267)
> [18:07:06 WARN]: at java.base/java.lang.Thread.run(Thread.java:829)
To Reproduce
Steps to reproduce the behavior:
I'm not sure how this bug reproduces since after reboot of the server it doesn't happen, i can only reproduce what happens when the bug is there:
- Take a Backpack
- Place a Backpack
- Destroy it
- Move and click in the inventory
Expected behavior
Not duplicating.
Screenshots
https://github.com/P3pp3rF1y/SophisticatedBackpacks/assets/46717382/b7c0550a-0e91-4725-94f4-d723c52c9717
Versions
Mohist Server: 1.16.5-1184
Forge: 1.16.5-36.2.39
Sophisticated Backpacks: 1.16.5-3.15.20.755
This works correctly on regular forge server and I don't see any mention of sophisticated in that exception so you will need to direct this at mohist and ask them to fix. I am certainly not going to try to debug the code in 1.16.5 with plugins and other stuff that I even have no idea of how that can be done in dev environment.
If they actually feel there's something wrong in my code and can point at what exactly that is let me know and reopen or create an new issue for that.