[Item dupe] Wooden Hopper Mk2 not properly splitting stacks when overflowing
Fababfan opened this issue ยท 2 comments
Bug Description
If you have a Wooden Hopper that contains 3 full stacks of the same item and misses like a few items on the 4th and throw in another full stack of that item, it will get added in, but won't get substracted from the stack laying above, therefore duping the items that get pulled inside the hopper.
I'm not entirely sure, if it's a dupe or just a visual bug.
Did this behavior use to work in the previous version?
I don't know and don't want to reinstall the whole modpack to find it out.
Steps to Reproduce (for bugs)
Attach a wooden hopper Mk 2 to a horse press, put in 4 stacks of lapis lazuli, let the horse run for a bit, until there are some items missing in the stacks (less than 64 missing), then throw another stack of lapis on top. The hopper will show 4 full stacks, but you will receive the full stack of lapis you threw when picking it back up.
Logs
- Client/Server Log:
- Crash Log:
Client Information
- Modpack Version: Version 3.1.2 Hotfix 1
- Java Version: Version 8 Update 241 (Build 1.8.0_241-b07)
- Launcher Used: Minecraft Launcher (minecraft.net)
- Memory Allocated: 8 GB
- Server/LAN/Single Player: Singleplayer
- Optifine Installed: no
- Shaders Enabled: no
World Information
- Modpack Version world created in: Version 3.1.2 Hotfix 1
- Additional Content Installed: none
I can now confirm that it is indeed a dupe, not just a visual bug. Put 9 stacks of lapis in a horse press over time and received almost 1.5 stacks of blocks out of it.
This is possible with a lot of things that take item entities from the world, including the vanilla hopper as well.
It is a result of how realistic item drops handles replacement of vanilla drops. When you throw an item, Minecraft creates a vanilla item entity. Realistic Item Drops also creates an item loot entity of its own, only slightly delayed. This is the entity that you eventually see, and which lies flat on the ground/floats in water/etc. It does not immediately remove the vanilla item entity, as this causes numerous other issues and even more egregious dupe bugs. It instead schedules it for deletion on the next tick, when it also spawns its own item loot entity.
This results in a small window where the vanilla item entity can be interacted with. Any items removed from it are not removed from the realistic item loot entity that is spawned after except when all items are removed.
We fixed an identical issue concerning the Metal Press for 3.1.3, though I think I may have approached that issue wrong. Looking at it again, I think I can fix all cases of this issue by patching realistic item drops instead. I'll take a look at it soon.