Darkhax-Minecraft / ItemStages

Allows items to be put into stages.
GNU Lesser General Public License v2.1
7 stars 18 forks source link

[Bug] Items added to JEI cannot be hidden. #52

Closed UnlimatedStone9 closed 5 years ago

UnlimatedStone9 commented 5 years ago

I've used CraftTweaker to show a specific item in JEI, then set its stage, for some reason the item does not get hidden by ItemStages in JEI thereafter.

Adding the item to JEI was done above the item stages script too, as follows:

mods.jei.JEI.addItem(.withTag({textureBlock: {id: "tfc:wood/log/kapok", Count: 1 as byte, Damage: 0 as short}}));

mods.ItemStages.addItemStage("craftingachoppingblock_kapok_log", .withTag({textureBlock: {id: "tfc:wood/log/kapok", Count: 1 as byte, Damage: 0 as short}}));

UnlimatedStone9 commented 5 years ago

Hm, I noticed the item doesn't get dropped either, perhaps I've done something wrong. Okay, doesn't seem like it's my fault, my best guess is that you can't add a stage to something that requires specific NBT data, that's not entirely great.

Darkhax commented 5 years ago

If the item is not dropping it means your NBT is not valid to match that item. Some items will have different NBT on the client or server. The mod includes a test for verifying NBT works, for example

mods.ItemStages.addItemStage("one", <minecraft:enchanted_book>.withTag({StoredEnchantments: [{lvl: 5 as short}]}));

So the NBT feature is working as intended.