Item Stages

Item Stages

20M Downloads

Items with NBT data are not properly staged

xkforce opened this issue ยท 3 comments

commented

Anything with nbt data can't be hidden by either mod staging or item staging.

commented

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.

commented

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"}));
commented

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:
liquid:canolaoil, Canola Oil
liquid:crystaloil, Crystallized Oil
liquid:empoweredoil, Empowered Oil
liquid:lava, Lava
liquid:refinedcanolaoil, Refined Canola Oil
liquid:water, Water

So I added the following lines to the staging zenscript file:
mods.ItemStages.stageLiquid("one", liquid:canolaoil);
mods.ItemStages.stageLiquid("one", liquid:crystaloil);
mods.ItemStages.stageLiquid("one", liquid:empoweredoil);
mods.ItemStages.stageLiquid("one", liquid:refinedcanolaoil);

Which doesn't appear to hide those liquids. but adding the liquid block itself to an ore dictionary hides the liquid block but adding the forge liquid buckets the same way doesn't. I actually haven't found a way to hide the forge buckets for those liquids. There are also two blocks that are being staged but not hidden: actuallyadditions:block_inputter_advanced and actuallyadditions:block_inputter

Forestry and Binnie's mods are having issues as well although most of that looks like interference from another mod.