IIngredient
Importing the class
If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.
import crafttweaker.api.ingredient.IIngredient;Description
The CraftTweaker Ingredient class which is used to power our recipes and ItemStack matching.Implements
IIngredient
implements the following interfaces:
Operators
myIIngredient in <tag:item:minecraft:wool>Parameters:
Return Type:
bool
// (IIngredient * (amount as int)) as IIngredientWithAmount<tag:item:minecraft:wool> * myIntParameters:
amount: int Type: int
Return Type:
IIngredientWithAmount
<tag:item:minecraft:wool> | myIIngredientParameters:
other: IIngredient Type: IIngredient
Return Type:
IIngredientList
Members
Please use Item Components instead.
// IIngredient.addGlobalAttributeModifier(attribute as Attribute, id as ResourceLocation, value as double, operation as AttributeOperation, slotTypes as EquipmentSlot[]);<tag:item:minecraft:wool>.addGlobalAttributeModifier(myAttribute, myResourceLocation, myDouble, myOperation, myEquipmentSlot[]);Parameters:
id: ResourceLocation Type: ResourceLocation value: double Type: double operation: AttributeOperation Type: AttributeOperation slotTypes: EquipmentSlot[] Type: EquipmentSlot[] <tag:item:minecraft:wool>.asIIngredientWithAmount();
Return Type:
IIngredientWithAmount
// IIngredient as IIngredientWithAmount<tag:item:minecraft:wool> as IIngredientWithAmount
Return Type:
IIngredientWithAmount
<tag:item:minecraft:wool>.asVanillaIngredient();
Return Type:
Ingredient
// IIngredient as Ingredient<tag:item:minecraft:wool> as Ingredient
Return Type:
Ingredient
// IIngredient.burnTime = (time as int);<tag:item:minecraft:wool>.burnTime = myInt;Parameters:
time: int Type: int
- the new burn time // IIngredient.burnTime(time as int);<tag:item:minecraft:wool>.burnTime(500);Parameters:
time: int Type: int
- the new burn time // IIngredient.clearTooltip(leaveName as bool = false);<tag:item:minecraft:wool>.clearTooltip(myBool);Parameters:
leaveName: bool (optional) Type: bool
Default Value: false
// IIngredient.commandString as string<tag:item:minecraft:wool>.commandString
Return Type:
string
<tag:item:minecraft:wool>.condition(myIIngredientCondition);Parameters:
condition: IIngredientCondition Type: IIngredientCondition
Return Type:
IIngredient
<tag:item:minecraft:wool>.contains((<item:minecraft:iron_ingot> | <item:minecraft:gold_ingot>));Parameters:
Return Type:
bool
// IIngredient.empty as bool<tag:item:minecraft:wool>.empty
Return Type:
bool
Returns: true if empty, false otherwise
// IIngredient.empty() as bool;<tag:item:minecraft:wool>.empty();
Return Type:
bool
<tag:item:minecraft:wool>.getRemainingItem(<item:minecraft:iron_ingot>);Parameters:
Return Type:
IItemStack
<tag:item:minecraft:wool>.items
Return Type:
IItemStack[]
<tag:item:minecraft:wool>.matches(<item:minecraft:iron_ingot>);Parameters:
Return Type:
bool
// IIngredient.modifyShiftTooltip(shiftedFunction as ITooltipFunction, unshiftedFunction as ITooltipFunction = null);<tag:item:minecraft:wool>.modifyShiftTooltip(myITooltipFunction, myITooltipFunction);Parameters:
shiftedFunction: ITooltipFunction Type: ITooltipFunction <tag:item:minecraft:wool>.modifyTooltip(myITooltipFunction);Parameters:
function: ITooltipFunction Type: ITooltipFunction <tag:item:minecraft:wool>.mul(myInt);Parameters:
amount: int Type: int
Return Type:
IIngredientWithAmount
<tag:item:minecraft:wool>.onlyDamagedAtLeast(myInt);Parameters:
minDamage: int Type: int
Return Type:
IIngredient
<tag:item:minecraft:wool>.onlyDamagedAtMost(myInt);Parameters:
maxDamage: int Type: int
Return Type:
IIngredient
// IIngredient.onlyIf(uid as string, function as function(t as IItemStack) as bool = null) as IIngredient;<tag:item:minecraft:wool>.onlyIf(myString, myPredicate);Parameters:
uid: string Type: string function: function(t as IItemStack) as bool (optional) Type: function(t as IItemStack) as bool
Default Value: null
Return Type:
IIngredient
Please use Item Components instead.
<tag:item:minecraft:wool>.removeGlobalAttribute(myAttribute, myEquipmentSlot[]);Parameters:
slotTypes: EquipmentSlot[] Type: EquipmentSlot[] Please use Item Components instead.
<tag:item:minecraft:wool>.removeGlobalAttributeModifier(myString, myEquipmentSlot[]);Parameters:
uuid: string Type: string slotTypes: EquipmentSlot[] Type: EquipmentSlot[] Please use Item Components instead.
<tag:item:minecraft:wool>.removeGlobalAttributeModifier(myUUID, myEquipmentSlot[]);Parameters:
uuid: UUID Type: UUID slotTypes: EquipmentSlot[] Type: EquipmentSlot[] // IIngredient.removeTooltip(regex as string);<tag:item:minecraft:wool>.removeTooltip(myString);Parameters:
regex: string Type: string // IIngredient.transformCustom(uid as string, function as function(r as IItemStack) as IItemStack = null) as IIngredient;<tag:item:minecraft:wool>.transformCustom(myString, myFunction);Parameters:
uid: string Type: string function: function(r as IItemStack) as IItemStack (optional) Type: function(r as IItemStack) as IItemStack
Default Value: null
Return Type:
IIngredient
<tag:item:minecraft:wool>.transformDamage(myInt);Parameters:
amount: int (optional) Type: int
Default Value: 1
Return Type:
IIngredient
<tag:item:minecraft:wool>.transformReplace(myIItemStack);Parameters:
replaceWith: IItemStack Type: IItemStack
Return Type:
IIngredient