Storage Drawers: Biomes O' Plenty Pack

Storage Drawers: Biomes O' Plenty Pack

6M Downloads

[1.12.1] Coal deleted from drawer after period of time

Nargath opened this issue ยท 7 comments

commented

Mod Version: 5.2.9
Forge: 14.22.0.2459
Chameleon: 4.1.3

I have a wall of drawers, both full and half drawers. When I put either coal or cobblestone in the bottom left hand corner block (will presumably happen with other materials), then leave the base to go caving, mining or something else far enough away, all of them item is cleared out.
This is without a Storage Controller, just the drawers themselves with no network.

If its a half drawer, only the lower half is removed. Items in the top half of the first block are fine.

Possibly something to do with chunks, seeing its only when I get far away from the drawers?

commented

Is it possible to reproduce this either in a standalone world, or at least in a new set of chunks pretty far removed from anything else if you're only seeing this on an MP server?

commented

I'll create a new 1.12.1 world with just Storage Drawers and try and replicate it.

Unfortunately it seem to trigger, or at least I'm not sure of WHERE the boundary is that causes it to trip out

commented

@jaquadro I just caught TOPAddons modifying a drawer's prototype stack, setting the count to zero and effectively emptying the drawer (since the prototype stack is now considered empty). In this case, all it did was remove the item reservation from an empty, locked drawer.

Maybe it would be prudent to make the prototype stack immutable somehow, or else always return a copy.

commented

Thanks for finding that. Clearly, the API documentation has not been inspected closely.

The returned ItemStack should not be modified for any reason. Make a copy if you need to store or modify it.

It's not returning a copy for the same reason that the IItemHandler doesn't return a copy. ItemStacks are relatively expensive to copy and often the mods accessing them either read-only or need to construct their own special stacks anyway. In either case, the only place to signal this is in the documentation. Maybe I need more screamy text?

commented

Are you sure the items are gone? For me this is only visual.

commented

They're definitely gone, had it happen again to me last night.
I've had the bug where it looks like it's gone but is still accessible.
With this one, you click to get the items out, and there's nothing dispensing.

This one wasn't limited to a corner.
I'd moved 4 stacks of coal to a drawer in the middle of the wall of drawers.
Went mining and on coming back, was gone again.

commented

Added a little more emphasis to the API documentation. May or may not help.