Treat valid server-generated Unbreakable byte values (0 or 1) as safe on outbound item packets.
Treat valid server-generated HideFlags integer masks (0x00 through 0x7F) as safe on outbound item packets.
Preserve the existing checks for player-to-server creative inventory packets and all other NBT tags.
Why
TheHerobrine-OG creates legitimate kit and GUI items using Bukkit item metadata, including unbreakable equipment and hidden item flags. Panilla-OG previously rejected these tags unconditionally, causing PacketPlayOutSetSlot and PacketPlayOutWindowItems packets to be dropped and the metadata to be stripped from player inventories.
Security impact
This is deliberately narrower than adding the tags to the global NBT whitelist. The exemption applies only to outbound, server-generated item packets and verifies both the NBT type and allowed vanilla value range. Client-supplied creative NBT remains subject to the existing Panilla checks.
Validation
Confirmed the branch is one commit ahead of master with only NbtChecks.java changed.
Reviewed the 1.19.4 packet path used by PacketPlayOutSetSlot and PacketPlayOutWindowItems.
A full Gradle build could not be run in this environment because the GitHub CLI and repository checkout are unavailable; the change is confined to the API module and uses existing INbtTagCompound/NbtDataType methods.
## What changed
- Treat valid server-generated `Unbreakable` byte values (`0` or `1`) as safe on outbound item packets.
- Treat valid server-generated `HideFlags` integer masks (`0x00` through `0x7F`) as safe on outbound item packets.
- Preserve the existing checks for player-to-server creative inventory packets and all other NBT tags.
## Why
TheHerobrine-OG creates legitimate kit and GUI items using Bukkit item metadata, including unbreakable equipment and hidden item flags. Panilla-OG previously rejected these tags unconditionally, causing `PacketPlayOutSetSlot` and `PacketPlayOutWindowItems` packets to be dropped and the metadata to be stripped from player inventories.
## Security impact
This is deliberately narrower than adding the tags to the global NBT whitelist. The exemption applies only to outbound, server-generated item packets and verifies both the NBT type and allowed vanilla value range. Client-supplied creative NBT remains subject to the existing Panilla checks.
## Validation
- Confirmed the branch is one commit ahead of `master` with only `NbtChecks.java` changed.
- Reviewed the 1.19.4 packet path used by `PacketPlayOutSetSlot` and `PacketPlayOutWindowItems`.
- A full Gradle build could not be run in this environment because the GitHub CLI and repository checkout are unavailable; the change is confined to the API module and uses existing `INbtTagCompound`/`NbtDataType` methods.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What changed
Unbreakablebyte values (0or1) as safe on outbound item packets.HideFlagsinteger masks (0x00through0x7F) as safe on outbound item packets.Why
TheHerobrine-OG creates legitimate kit and GUI items using Bukkit item metadata, including unbreakable equipment and hidden item flags. Panilla-OG previously rejected these tags unconditionally, causing
PacketPlayOutSetSlotandPacketPlayOutWindowItemspackets to be dropped and the metadata to be stripped from player inventories.Security impact
This is deliberately narrower than adding the tags to the global NBT whitelist. The exemption applies only to outbound, server-generated item packets and verifies both the NBT type and allowed vanilla value range. Client-supplied creative NBT remains subject to the existing Panilla checks.
Validation
masterwith onlyNbtChecks.javachanged.PacketPlayOutSetSlotandPacketPlayOutWindowItems.INbtTagCompound/NbtDataTypemethods.