Package vazkii.botania.common.crafting
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
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final net.minecraft.world.item.crafting.RecipeSerializer<PureDaisyRecipe> Fields inherited from interface vazkii.botania.api.recipe.PureDaisyRecipe
TYPE_IDFields inherited from interface net.minecraft.world.item.crafting.Recipe
CODEC, STREAM_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionPureDaisyRecipe(StateIngredient input, StateIngredient output, int time, boolean copyInputProperties, @Nullable net.minecraft.commands.CacheableFunction successFunction) -
Method Summary
Modifier and TypeMethodDescriptiongetInput()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.intgetTime()Returns the number of times a source block must be ticked by the flower before it converts.booleanReturns whether any relevant block state properties of the matched block will be copied over to the converted block as the conversion takes place.booleanmatches(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, waitMethods inherited from interface vazkii.botania.api.recipe.PureDaisyRecipe
assemble, canCraftInDimensions, getResultItem, getType, isSpecial, matchesMethods 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
-
-
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:PureDaisyRecipeThis gets called every tick, please be careful with your checks.- Specified by:
matchesin interfacePureDaisyRecipe
-
getInput
Description copied from interface:PureDaisyRecipeReturns the input block state definition.- Specified by:
getInputin interfacePureDaisyRecipe
-
getOutput
Description copied from interface:PureDaisyRecipeReturns 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:
getOutputin interfacePureDaisyRecipe
-
isCopyInputProperties
public boolean isCopyInputProperties()Description copied from interface:PureDaisyRecipeReturns 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:
isCopyInputPropertiesin interfacePureDaisyRecipe
-
getSuccessFunction
Description copied from interface:PureDaisyRecipeReturns the optional mcfunction to execute when the conversion takes place. (Might not be available on client-side mirrors of the recipe definition.)- Specified by:
getSuccessFunctionin interfacePureDaisyRecipe
-
getTime
public int getTime()Description copied from interface:PureDaisyRecipeReturns 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:
getTimein interfacePureDaisyRecipe
-
getSerializer
public net.minecraft.world.item.crafting.RecipeSerializer<? extends PureDaisyRecipe> getSerializer()- Specified by:
getSerializerin interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.RecipeInput>
-