retrooper / packetevents

Precision meets performance—a powerful tool for mastering Minecraft packet manipulation with speed and finesse.
GNU General Public License v3.0
555 stars 150 forks source link

Remove amount check from isEmpty #1062

Closed Beaness closed 3 days ago

Beaness commented 3 days ago

This allows negative item sizes to be sent through packetevents At the moment ItemStacks with a negative or zero amount can not be serialized through packetevents. This breaks compatibility for plugins expecting isEmpty to return true if the amount is zero or below

booky10 commented 3 days ago

At the moment ItemStacks with a negative or zero amount can not be serialized through packetevents.

This is intentional, this would break with Minecraft 1.20.5+

Vanilla also marks items as empty, if the count is <= 0 (even for versions before 1.20.5)