Closed HyperSoop closed 2 years ago
Air is a bit of an outlier - it can be represented by ItemStack.EMPTY
or simply null
(null is the absence of an item), depending on what part of Minecraft you ask. It also can't really have nbt.
That's actually what inspired the /get
command, and is the intended way to create new items.
In fact, the ability to convert an item into air via the Item ID field was unintended, and could lead to 'nbt loss' for that item, if you don't convert it back - I should probably add in a warning when saving an air item.
Considering allowing /nbt on an empty slot would be different behavior compared to all the other commands, do you think I should:
Air is a bit of an outlier - it can be represented by
ItemStack.EMPTY
or simplynull
(null is the absence of an item), depending on what part of Minecraft you ask. It also can't really have nbt. That's actually what inspired the/get
command, and is the intended way to create new items. In fact, the ability to convert an item into air via the Item ID field was unintended, and could lead to 'nbt loss' for that item, if you don't convert it back - I should probably add in a warning when saving an air item.Considering allowing /nbt on an empty slot would be different behavior compared to all the other commands, do you think I should:
* Add a config option to allow /nbt on air * Allow /nbt on air (no config) * Don't change anything
I think there could be a config option for this, enabled by default.
Yesterday I started to implement this, but I ran into some glitches. While I believe I have everything fixed, working with air is always going to be a bit dangerous. So here's what I ended up deciding to do:
/nbt new <item>
, which is the equivalent of /nbt
followed by changing the type/nbt
with both hands empty will edit air in the main handHopefully that is a good compromise! The update should be out very soon.
I've just released v1.8.0, which includes the above features!
It makes little to no sence to prohibit editing air with /nbt. It's an item like any other, and can be made into another item through the Item ID field.