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

Containers not dropping the correct quantity of items #1079

Closed
vectrixdevelops opened this issue Dec 17, 2016 · 8 comments
Closed

Containers not dropping the correct quantity of items #1079

vectrixdevelops opened this issue Dec 17, 2016 · 8 comments
Labels
status: accepted a confirmation that this is either an issue caused by us or something that should be added type: bug Something isn't working

Comments

@vectrixdevelops
Copy link
Contributor

vectrixdevelops commented Dec 17, 2016

Referring to this post, https://forums.spongepowered.org/t/chest-item-drop-bug/16224

When destroying a chest with items inside sometimes it does not drop the full stack and sometimes even nothing at all.

@gabizou (gravityfox wanted a tag for you)

EDIT: Happens to furnaces too.

SpongeVanilla-1.11-6.0.0-BETA-187

@ziceptor
Copy link

I confirm that I have the same error.

forge-1.11-13.19.1.2195-universal.jar
spongeforge-1.11-2195-6.0.0-BETA-2001.jar

@vectrixdevelops
Copy link
Contributor Author

@ziceptor
Copy link

This happens with furnaces, dispensers, etc.

forge-1.11-13.19.1.2195-universal.jar
spongeforge-1.11-2195-6.0.0-BETA-2004.jar

@ziceptor
Copy link

@Zerthick
Copy link

I can confirm this also occurs for chests on spongevanilla-1.10.2-5.1.0-BETA-366

@Faithcaio
Copy link
Contributor

Faithcaio commented Dec 26, 2016

Not quite sure how to solve it yet, but this is what I could figure out:

A registered DropItemEvent.Destruct Listener will get called twice.

After breaking the chest the entities are created and added to a list to pass onto events etc.

The error happens in the if block starting at PacketFunction:432 (state == INTERACTION)
First the items are spawned at:
PacketFunction:435 -> TrackingUtil.processBlockCaptures -> performBlockAdditions -> spawnEntitiesForBlockDrops
and then a second time at:
PacketFunction:564 -> processSpawnedEntities -> processEntities

Bug was probably introduced with 848f545

@XakepSDK
Copy link
Contributor

XakepSDK commented Jan 4, 2017

spongeforge-1.11.2-2201-6.0.0-BETA-2018.jar
forge-1.11.2-13.20.0.2201-universal.jar
has same error.

@stephan-gh stephan-gh added status: accepted a confirmation that this is either an issue caused by us or something that should be added type: bug Something isn't working labels Jan 21, 2017
@parlough
Copy link
Contributor

parlough commented Feb 5, 2017

I thought this was caused by my plugin originally, but when I saw this issue and I got more reports I tested it further and it seems to occur to all containers. You will rarely, if ever, see the original amount of the item drop. Generally a random amount of the original stack is dropped or nothing at all, there is no rhyme or reason to it.

Here is a small video if it occurring with a chest and furnace with the latest SpongeVanilla build(Sorry for the loud volume, turn down or mute the video): https://www.youtube.com/watch?v=RHS9rxLYDVk

I am not really sure how to approach the issue but if anyone needs help testing solutions feel free to get in contact.

@vectrixdevelops vectrixdevelops changed the title Chest dropping items has issues Containers not dropping the correct quantity of items Feb 5, 2017
Aaron1011 added a commit that referenced this issue Feb 7, 2017
Closes #1079

The pre merge check was backwards, and the proper number of EntityItems
were not being created
Aaron1011 added a commit that referenced this issue Feb 7, 2017
Closes #1079

The pre merge check was backwards, and the proper number of EntityItems
were not being created
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepted a confirmation that this is either an issue caused by us or something that should be added type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants