Class WrappingIIngredient

java.lang.Object
com.blamejared.crafttweaker.api.ingredient.type.WrappingIIngredient
All Implemented Interfaces:
CommandStringDisplayable, IIngredient

@ZenRegister public class WrappingIIngredient extends Object implements IIngredient
An IIngredient that wraps a vanilla Ingredient.
DocParam:
this <tag:items:minecraft:wool>.asIIngredient();
  • Constructor Details

    • WrappingIIngredient

      public WrappingIIngredient(net.minecraft.world.item.crafting.Ingredient ingredient, String commandString)
  • Method Details

    • isEmpty

      public boolean isEmpty()
      Description copied from interface: IIngredient
      Checks if this ingredient is empty.
      Specified by:
      isEmpty in interface IIngredient
      Returns:
      true if empty, false otherwise
    • matches

      public boolean matches(IItemStack stack, boolean ignoreDamage)
      Description copied from interface: IIngredient
      Does the given stack match the ingredient?
      Specified by:
      matches in interface IIngredient
      Parameters:
      stack - The stack to check
      ignoreDamage - Should damage be checked?
    • asVanillaIngredient

      public net.minecraft.world.item.crafting.Ingredient asVanillaIngredient()
      Description copied from interface: IIngredient
      Create a Vanilla ingredient matching this one.
      Specified by:
      asVanillaIngredient in interface IIngredient
    • getCommandString

      public String getCommandString()
      Description copied from interface: IIngredient
      Returns the BEP to get this stack
      Specified by:
      getCommandString in interface CommandStringDisplayable
      Specified by:
      getCommandString in interface IIngredient
    • getItems

      public IItemStack[] getItems()
      Specified by:
      getItems in interface IIngredient