ContentTweaker

ContentTweaker

27M Downloads

[Request/Question] Need a method to retrieve specific IItemStack from registered materials

wormzjl opened this issue ยท 5 comments

commented

When testing, I have observed that removing and readding material definition scripts could cause a change in item meta, which means using expressions like <contenttweaker:material_part:meta> will break existing scripts if something goes wrong.

This makes things complicated when using them in crafting recipes, one can use oredict entries as ingredients, but not as products.

The only method I've found so far is to use firstItem in crafttweaker.oredict.IOreDictEntry, but it's not guaranteed to return a item from CoT. So I wonder if there is such method available, if not, is it possible to add one?

commented

materialpart:copper:gear also meta shouldn't cant but its already a thing

commented

Oh thank you!

commented

It seems that this does not work for generated ore blocks.
With following script the recipe is invalid:
mods.magneticraft.Grinder.addRecipe(<materialpart:iron_ore:ore>, <materialpart:iron_ore:ore_high>, <materialpart:iron_ore:ore_low>, 1.0, 100, false);
image

commented

You're missing the variant for ores. You should come into Discord for further assistance! Issues aren't for script support.