Quark Oddities

Quark Oddities

22M Downloads

[1.16] Items deleted when moving dropper next to hopper

MrEldritch opened this issue ยท 4 comments

commented

I was attempting to design a redstone contraption when I ran into an item deletion bug with moving TileEntities - when a dropper is moved by a sticky piston pulsed rapidly enough leave the dropper behind, into a position where the dropper may be filled by an adjacent hopper containing items, then the first item that hopper transfers will be deleted rather than ending up in the dropper. (Subsequent items will transfer as normal)

As far as I can tell from my testing, this only occurs with sticky pistons (a regular piston, given the exact same pulse length, will not delete any items), only occurs when the sticky piston is given a fast enough pulse to leave the dropper behind when it retracts, and only occurs when the block being moved is a dropper or dispenser; hoppers or chests do not appear to have this problem. The bug seems to occur regardless of location or orientation.

To reproduce, build the following minimal example contraption, place N items in the hopper, and flick the lever; once the hopper has emptied itself into the dropper, observe that the dropper contains only N-1 items, with the missing item being whatever the hopper would have transferred first. (Note that the piston needs to be sticky)
2020-07-30_21 05 30

I originally observed this behavior in 1.15.2 with Quark r239, but upon starting a fresh Minecraft 1.16.1 instance with the latest Forge, AutoRegLib, and Quark, I can confirm that this issue still exists in current versions.

As requested, here's the log: https://pastebin.com/6FH5CGdW

commented

Sounds like this might be related to the "Delayed Update List" Quark is using for droppers and dispensers by default, sticky pistons drop their block on a short pulse meaning 2 game ticks and below (or one redstone tick) which is what an observer will generate.

If this issue is hard to resolve (genuinely have no idea) I think the mod "fabric carpet" found a solution to this.

commented

I think this is a dupe of an older issue.

commented

Hm, doesn't seem like it.

commented

What's going on is that the tile entity is being inserted into by the hopper and subsequently gets overriden by the delayed update. The reason for the Delayed Update List can be seen here #316. It was addressing a bug with the tile entity being cleared for droppers and dispensers when pushed into a powered state.

I tried removing the dispeners and drops from the list and pushing into a redstone block and they don't seem to clear the inventories anymore like in 1.12, so maybe they can safely be removed from the list by default?

Here's a video without them being in the list.

2021-01-23_22h14m17s878.mp4