Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Item dupe] Wooden Hopper Mk2 not properly splitting stacks when overflowing #4179

Closed
Fababfan opened this issue Jun 29, 2020 · 2 comments
Closed

Comments

@Fababfan
Copy link

Fababfan commented Jun 29, 2020

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
@Fababfan
Copy link
Author

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.

@sam-kirby
Copy link
Contributor

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.

sam-kirby added a commit to DarkPacks/SevPatches that referenced this issue Jul 1, 2020
Delays copying of item nbt until the item is to be spawned, meaning that if the vanilla item entity is modified before it is removed, such as by a hopper, these changes are taken into account.

ref: DarkPacks/SevTech-Ages#4179
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants