Closed xkforce closed 5 years ago
Are you using the latest version of this mod? The following script works perfectly fine.
mods.ItemStages.addItemStage("one", <minecraft:potion>.withTag({Potion: "minecraft:strong_harming"}));
I'm using version 2.0.43. It appears that some items with nbt data are being hidden (like vanilla potions) and some aren't. Actually there are a lot of things that either aren't being staged or aren't being hidden in JEI if they are that goes beyond items with nbt data on them.
For example, actuallyadditions I can stage everything but the liquids and a couple items: ct liquids gives: Liquids:
To hide a liquid you need to use CraftTweaker's liquid bracket handler. So <liquid:water>
instead of liquid:water
. Fluids also don't have NBT.
As for the other things, JEI items are only hidden if you can provide the exact same item. It's annoying but that's how JEI works. My mod allows partial NBT to be used when staging an item, which is useful for many weird edge case items. For example this line will hide all enchantment books with level 5, even if the enchantment isn't exact. However JEI does not allow for the same flexibility.
mods.ItemStages.addItemStage("one", <minecraft:enchanted_book>.withTag({StoredEnchantments: [{lvl: 5 as short}]}));
Edit: The way most packs work around this issue, such as SevTech, has been to get the item from JEI and use the command /ct hand
which prints out the exact info for that item. This can then be used in the script as a separate entry to ensure the item has been staged.
Anything with nbt data can't be hidden by either mod staging or item staging.