[SPIGOT-165] HideFlags tag not working Created: 08/Dec/14  Updated: 11/Dec/14  Resolved: 11/Dec/14

Status: Closed
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Reploid Zero Assignee: Unassigned
Resolution: Duplicate Votes: 1
Labels: None

Attachments: PNG File 2014-12-08_14.40.35.png     PNG File 2014-12-08_14.43.13.png    
Issue Links:
Duplicate
duplicates SPIGOT-152 Itemstack NBTTag is missing some options Closed

 Description   

Whenever spawning in an item with the HideFlags data, it doesn't hide any tags. Enchantments, if Unbreakable, and Attribute modifiers can still be seen. Code tested: /give @p minecraft:iron_sword 1 0 {HideFlags:7,AttributeModifiers:[

{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:2,Operation:0,UUIDLeast:894654,UUIDMost:2872}

],Unbreakable:1,ench:[

{id:16,lvl:5}

]}

In Vanilla, it results in a sword with sharpness 5, unbreakable, and adds one heart to the player when held, but none of that information readily available.

In Spigot, it is the same sword statistically, but you can see the attribute modifier, the enchantment, and can see it is unbreakable.



 Comments   
Comment by mactso [ 08/Dec/14 ]

1) Test in vanilla.
Get sword with abilities- Pressing F3+H shows 4nbt tags but still doesn't show abilities.
Abilities do work (select and deselect sword and you can see the 1 heart of health add and go away).

2)Test in vanilla spigot with /minecraft: prefix.
Get sword with abilities- Pressing F3+H shows 3nbt tags but still doesn't show abilities. The missing 4th nbt tag is probably the hideflag which is unsupported because all three abilities show on the item (sharpness, +2 health, unbreakable).

Abilities do work (select and deselect sword and you can see the 1 heart of health add and go away).

3)Test in vanilla spigot without /minecraft: prefix.
Identical results to 2).

One other difference.
The extra health starts out healed in vanilla MineCraft1.8.
The extra health starts out injured in vanilla Spigot 1.8.

Comment by Reploid Zero [ 08/Dec/14 ]

I have it set up so that it isn't overridden in command blocks. So I did test with /give and not /minecraft:give. I did test it to make sure, but doing /minecraft:give did not fix the HideFlags data tag issue.

Comment by Fabian Faßbender [ 08/Dec/14 ]

https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/pull-requests/37/overview
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/pull-requests/13/overview

Also /give is overriden in bukkit. Use /minecraft:give

Generated at Mon Apr 21 21:30:32 UTC 2025 using Jira 10.3.5#10030005-sha1:190c783f2bd6c69cd5accdb70f97e48812a78d14.