no such member in crafttweaker.item.IItemStack: firstItem
JarJar541 opened this issue ยท 1 comments
after trying to work out custom crafting, I keep getting this error, the error is No such member in crafttweaker.item.IItemStack: firstItem, I am very confused and any help will be appreciated. Here is my code:
import crafttweaker.item.IItemStack;
import crafttweaker.item.IIngredient;
val items = [
minecraft:wooden_door
] as IItemStack[];
for item in items
{
item.addTooltip("Hello World");
recipes.remove(item);
}
var seeds = minecraft:pumpkin_seeds;
recipes.addShaped("pumpkinExample1", minecraft:pumpkin.firstItem, [
[seeds, seeds, seeds],
[null, null, null],
[null, null, null]
]);
recipes.addShapedMirrored("pumpkinExample2", minecraft:pumpkin.firstItem * 2, [
[null, null, seeds],
[null, seeds, null],
[seeds, null, null]
]);
recipes.addShapeless("pumpkinExample3", minecraft:pumpkin.firstItem * 3, [seeds, seeds, seeds]);
So firstly, please don't just put your script in a github issue, github strips markdown formatting, so the script changes.
Secondly this is more a question for the discord https://discord.blamejared.com
And lastly why are you trying to use .firstItem
on an IItemStack? only IOreDictEntry has a firstItem
, if you have a stack, just use the stack