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.type . WrappingIIngredient;
An IIngredient that wraps a vanilla Ingredient. WrappingIIngredient
implements the following interfaces:
IIngredient
,CommandStringDisplayable
Does the ingredient contain the given ingredient? // ((ingredient as IIngredient ) in WrappingIIngredient) as bool myIIngredient in < tag : item:minecraft:wool > .asIIngredient();
Return Type:
bool
Use this in contexts where machines accept more than one item to state that fact. < tag : item:minecraft:wool > .asIIngredient(); * myInt
Return Type:
IIngredientWithAmount
< tag : item:minecraft:wool > .asIIngredient(); | myIIngredient
Return Type:
IIngredientList
This method no longer works and is deprecated, it is left in so it doesn't cause breaking changes. Please use Item Components instead. < tag : item:minecraft:wool > .asIIngredient();.addGlobalAttributeModifier(myAttribute, myResourceLocation, myDouble, myOperation, myEquipmentSlot[]);
Parameters:
value: double
Type: double
// WrappingIIngredient.addShiftTooltip(content as Component , showMessage as Component = null); < tag : item:minecraft:wool > .asIIngredient();.addShiftTooltip(myComponent, myComponent);
// WrappingIIngredient.addTooltip(content as Component ); < tag : item:minecraft:wool > .asIIngredient();.addTooltip(myComponent);
< tag : item:minecraft:wool > .asIIngredient();.anyDamage();
Return Type:
IIngredient
// WrappingIIngredient as IData < tag : item:minecraft:wool > .asIIngredient(); as IData
Return Type:
IData
Used implicitly when a machine can accept more than one item but you only provide one. < tag : item:minecraft:wool > .asIIngredient();.asIIngredientWithAmount();
Return Type:
IIngredientWithAmount
Used implicitly when a machine can accept more than one item but you only provide one. < tag : item:minecraft:wool > .asIIngredient(); as IIngredientWithAmount
Return Type:
IIngredientWithAmount
< tag : item:minecraft:wool > .asIIngredient(); as MapData
Return Type:
MapData
Sets the burn time of this ingredient, for use in the furnace and other machines // WrappingIIngredient.burnTime = (time as int);
< tag : item:minecraft:wool > .asIIngredient();.burnTime = myInt;
Parameters:
time: int
Type: int
- the new burn time
Sets the burn time of this ingredient, for use in the furnace and other machines // WrappingIIngredient.burnTime(time as int);
< tag : item:minecraft:wool > .asIIngredient();.burnTime( 500 );
Parameters:
time: int
Type: int
- the new burn time
// WrappingIIngredient.clearTooltip(leaveName as bool = false);
< tag : item:minecraft:wool > .asIIngredient();.clearTooltip(myBool);
Parameters:
leaveName: bool
(optional) Type: bool
Default Value: false
Use this if you already have the condition from another ingredient < tag : item:minecraft:wool > .asIIngredient();.condition(myIIngredientCondition);
Return Type:
IIngredient
Does the ingredient contain the given ingredient? // WrappingIIngredient.contains(ingredient as IIngredient ) as bool; < tag : item:minecraft:wool > .asIIngredient();.contains(( < item : minecraft:iron_ingot > | < item : minecraft:gold_ingot > ));
Return Type:
bool
When this ingredient stack is crafted, what will remain in the grid? Does not check if the stack matches though! Used e.g. in Crafting Table recipes. < tag : item:minecraft:wool > .asIIngredient();.getRemainingItem( < item : minecraft:iron_ingot > );
Return Type:
IItemStack
< tag : item:minecraft:wool > .asIIngredient();.modifyShiftTooltip(myITooltipFunction, myITooltipFunction);
< tag : item:minecraft:wool > .asIIngredient();.modifyTooltip(myITooltipFunction);
Use this in contexts where machines accept more than one item to state that fact. < tag : item:minecraft:wool > .asIIngredient();.mul(myInt);
Return Type:
IIngredientWithAmount
< tag : item:minecraft:wool > .asIIngredient();.onlyDamaged();
Return Type:
IIngredient
// WrappingIIngredient.onlyDamagedAtLeast(minDamage as int) as IIngredient ; < tag : item:minecraft:wool > .asIIngredient();.onlyDamagedAtLeast(myInt);
Return Type:
IIngredient
// WrappingIIngredient.onlyDamagedAtMost(maxDamage as int) as IIngredient ; < tag : item:minecraft:wool > .asIIngredient();.onlyDamagedAtMost(myInt);
Return Type:
IIngredient
// WrappingIIngredient.onlyIf(uid as string, function as function(t as IItemStack ) as bool = null) as IIngredient ; < tag : item:minecraft:wool > .asIIngredient();.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
This method no longer works and is deprecated, it is left in so it doesn't cause breaking changes. Please use Item Components instead. < tag : item:minecraft:wool > .asIIngredient();.removeGlobalAttribute(myAttribute, myEquipmentSlot[]);
This method no longer works and is deprecated, it is left in so it doesn't cause breaking changes. Please use Item Components instead. // WrappingIIngredient.removeGlobalAttributeModifier(uuid as string, slotTypes as EquipmentSlot []); < tag : item:minecraft:wool > .asIIngredient();.removeGlobalAttributeModifier(myString, myEquipmentSlot[]);
Parameters:
uuid: string
Type: string
This method no longer works and is deprecated, it is left in so it doesn't cause breaking changes. Please use Item Components instead. // WrappingIIngredient.removeGlobalAttributeModifier(uuid as UUID, slotTypes as EquipmentSlot []); < tag : item:minecraft:wool > .asIIngredient();.removeGlobalAttributeModifier(myUUID, myEquipmentSlot[]);
// WrappingIIngredient.removeTooltip(regex as string);
< tag : item:minecraft:wool > .asIIngredient();.removeTooltip(myString);
Parameters:
regex: string
Type: string
< tag : item:minecraft:wool > .asIIngredient();.reuse();
Return Type:
IIngredient
< tag : item:minecraft:wool > .asIIngredient();.transformCustom(myString, myFunction);
Return Type:
IIngredient
// WrappingIIngredient.transformDamage(amount as int = 1) as IIngredient ; < tag : item:minecraft:wool > .asIIngredient();.transformDamage(myInt);
Parameters:
amount: int
(optional) Type: int
Default Value: 1
Return Type:
IIngredient
< tag : item:minecraft:wool > .asIIngredient();.transformReplace(myIItemStack);
Return Type:
IIngredient