Mojira Archive
MC-109569

Using /give command with high data values gives you air

Relates to:

The bug

When you give yourself an item (not air) with a data value higher than 2^16-1 = 65535 you get air instead. I would expect the command to fail instead.

Note: 2^16 is the number of values a short can have. But as the Damage tag is a signed short, this value does not make any sense in this context.

How to reproduce

Example command
/give @p dirt 1 65536

Code analysis

Based on 1.11 decompiled using MCP 9.35 rc1

Method net.minecraft.item.ItemStack.func_190926_b()

Works As Intended

Marcono1234

[Mojang] Grum (Erik Broes)

2016-11-03, 06:11 PM

2018-10-26, 01:44 AM

2016-11-04, 12:26 PM

0

2

Confirmed

air, data-value, give

Minecraft 16w44a, Minecraft 1.11

-