Interface ISpellIngredient


public interface ISpellIngredient
Interface representing an ingredient for spell crafting.
  • Field Details

  • Method Details

    • getType

      Returns:
      The id of this type.
    • getCount

      int getCount()
      Returns:
      The count of this type.
    • getTooltip

      List<net.minecraft.network.chat.Component> getTooltip()
      Returns:
      The tooltip of this type.
    • canCombine

      boolean canCombine(ISpellIngredient other)
      Parameters:
      other - The other ingredient to check.
      Returns:
      If this ingredient can combine with the other given ingredient.
    • combine

      @Nullable @Nullable ISpellIngredient combine(ISpellIngredient other)
      Parameters:
      other - The other ingredient to combine this one with.
      Returns:
      This ingredient, combined with the other one.
    • consume

      @Nullable @Nullable ISpellIngredient consume(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos)
      Consumes this ingredient.
      Parameters:
      level - The level in which this ingredient is consumed.
      pos - The position at which this ingredient is consumed.
      Returns:
      The leftover of the consumption.