Skip to content

Fix client crash when a pressing item stack becomes empty - #10885

Open
CIR-Server wants to merge 1 commit into
Creators-of-Create:mc1.21.1/devfrom
CIR-Server:fix/empty-particle-stack
Open

CIR-Server wants to merge 1 commit into
Creators-of-Create:mc1.21.1/devfrom
CIR-Server:fix/empty-particle-stack

Conversation

@CIR-Server

@CIR-Server CIR-Server commented Nov 16, 2026 •

Copy link
Copy Markdown

What this fixes

Fixes #10886

While a pressing contraption runs, an item stack kept in particleItems can be
emptied by the processing. Such empty stacks are still written into the client
packet (count: 0), deserialize back into ItemStack.EMPTY, and are then
handed to ItemParticleOption, which throws
IllegalArgumentException: Empty stacks are not allowed and disconnects the client.

Fix

Drop empty stacks from particleItems before the client packet is written, and
again before particles are spawned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cilent disconnected when a pressing contraption holds an emptied item stack

1 participant