Class PureDaisyRecipe

java.lang.Object
vazkii.botania.common.crafting.PureDaisyRecipe
All Implemented Interfaces:
net.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.RecipeInput>, PureDaisyRecipe

public class PureDaisyRecipe extends Object implements PureDaisyRecipe
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final net.minecraft.world.item.crafting.RecipeSerializer<PureDaisyRecipe>
     

    Fields inherited from interface vazkii.botania.api.recipe.PureDaisyRecipe

    TYPE_ID

    Fields inherited from interface net.minecraft.world.item.crafting.Recipe

    CODEC, STREAM_CODEC
  • Constructor Summary

    Constructors
    Constructor
    Description
    PureDaisyRecipe(StateIngredient input, StateIngredient output, int time, boolean copyInputProperties, @Nullable net.minecraft.commands.CacheableFunction successFunction)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the input block state definition.
    Returns the output block state definition.
    net.minecraft.world.item.crafting.RecipeSerializer<? extends PureDaisyRecipe>
     
    Optional<net.minecraft.commands.CacheableFunction>
    Returns the optional mcfunction to execute when the conversion takes place.
    int
    Returns the number of times a source block must be ticked by the flower before it converts.
    boolean
    Returns whether any relevant block state properties of the matched block will be copied over to the converted block as the conversion takes place.
    boolean
    matches(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
    This gets called every tick, please be careful with your checks.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface vazkii.botania.api.recipe.PureDaisyRecipe

    assemble, canCraftInDimensions, getResultItem, getType, isSpecial, matches

    Methods inherited from interface net.minecraft.world.item.crafting.Recipe

    getGroup, getIngredients, getRemainingItems, getToastSymbol, isIncomplete, showNotification
  • Field Details

    • DEFAULT_TIME

      public static final int DEFAULT_TIME
      See Also:
    • SERIALIZER

      public static final net.minecraft.world.item.crafting.RecipeSerializer<PureDaisyRecipe> SERIALIZER
  • Constructor Details

    • PureDaisyRecipe

      public PureDaisyRecipe(StateIngredient input, StateIngredient output, int time, boolean copyInputProperties, @Nullable @Nullable net.minecraft.commands.CacheableFunction successFunction)
  • Method Details

    • matches

      public boolean matches(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
      Description copied from interface: PureDaisyRecipe
      This gets called every tick, please be careful with your checks.
      Specified by:
      matches in interface PureDaisyRecipe
    • getInput

      public StateIngredient getInput()
      Description copied from interface: PureDaisyRecipe
      Returns the input block state definition.
      Specified by:
      getInput in interface PureDaisyRecipe
    • getOutput

      public StateIngredient getOutput()
      Description copied from interface: PureDaisyRecipe
      Returns the output block state definition. If it matches multiple block states, one of those it picked at random with equal weights when the conversion takes place.
      Specified by:
      getOutput in interface PureDaisyRecipe
    • isCopyInputProperties

      public boolean isCopyInputProperties()
      Description copied from interface: PureDaisyRecipe
      Returns whether any relevant block state properties of the matched block will be copied over to the converted block as the conversion takes place. (Used to e.g. keep the rotation of converted logs.)
      Specified by:
      isCopyInputProperties in interface PureDaisyRecipe
    • getSuccessFunction

      public Optional<net.minecraft.commands.CacheableFunction> getSuccessFunction()
      Description copied from interface: PureDaisyRecipe
      Returns the optional mcfunction to execute when the conversion takes place. (Might not be available on client-side mirrors of the recipe definition.)
      Specified by:
      getSuccessFunction in interface PureDaisyRecipe
    • getTime

      public int getTime()
      Description copied from interface: PureDaisyRecipe
      Returns the number of times a source block must be ticked by the flower before it converts. Note that the Pure Daisy ticks its surrounding blocks in a round-robin way, one at a time.
      Specified by:
      getTime in interface PureDaisyRecipe
    • getSerializer

      public net.minecraft.world.item.crafting.RecipeSerializer<? extends PureDaisyRecipe> getSerializer()
      Specified by:
      getSerializer in interface net.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.RecipeInput>