Quark Oddities

Quark Oddities

22M Downloads

[NEED HELP] 1.14 - Breaking a shulker box with a pickarang while flying with an elytra really fast duplicates the shulker box.

Farcr opened this issue ยท 6 comments

commented

I assume it has to do with the player's speed? Anyway, it's quite easy to reproduce. Grab an elytra, fly really quickly and throw a pickarang on it.
Now you have two shulker boxes.
Latest version.

commented

what the fuck how does this happen

commented

Do you get two shulker boxes in your inventory or one in your inventory and the other still placed? Knowing that could help pin the issue down

commented

Both end up in the inventory.

I also tried reproducing this with a high level speed potion and nothing happened. Also seems fine when flying with the elytra at low speeds.

commented

Someone on Twitter suggested doing it while in a state that modifies your hitbox to be small like swimming or being in a 1-block tall space, could you get enough speed in those conditions to test it?

commented

Maybe it also has something to do with there also being an entity? I don't know how shulker box work, so yeah, ill have to research that.

commented

This is not limited to shulker boxes. The item gets duped when the vanilla pickup is triggered in the same tick before the pickarang pickup, because there's an item.isAlive() check missing here.
Maybe this only happens with the elytra because of a combination of speed and the rotated bounding box.

Adding the check I mentioned above should fix the dupe, however I'm not quite sure if those loops are needed at all, since both items and xp should be already included in getPassengers() anyway (added here).

commented

Well spotted @saibotu, I was focused on the OP being seen with a shulker box so I thought it had something to do with that. Thank you.