Class Fertilizer
java.lang.Object
net.darkhax.botanypots.common.api.data.recipes.BotanyPotRecipe
net.darkhax.botanypots.common.api.data.recipes.fertilizer.Fertilizer
- All Implemented Interfaces:
net.minecraft.world.item.crafting.Recipe<BotanyPotContext>
- Direct Known Subclasses:
BasicFertilizer
Represents a fertilizer interaction with a crop.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.darkhax.bookshelf.common.api.function.SidedReloadableCache<RecipeCache<Fertilizer>> static final net.darkhax.bookshelf.common.api.function.SidedReloadableCache<Map<net.minecraft.resources.ResourceLocation, net.minecraft.world.item.crafting.RecipeHolder<Fertilizer>>> static final Supplier<net.minecraft.world.item.crafting.RecipeType<Fertilizer>> Fields inherited from interface net.minecraft.world.item.crafting.Recipe
CODEC, STREAM_CODEC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidapply(@NotNull BotanyPotContext context, @NotNull net.minecraft.world.level.Level level) Applies the fertilizer to the crop.static @Nullable net.minecraft.world.item.crafting.RecipeHolder<Fertilizer> getFertilizer(net.minecraft.world.level.Level level, BotanyPotContext context, net.minecraft.world.item.ItemStack stack) @NotNull net.minecraft.world.item.crafting.RecipeType<?> getType()Methods inherited from class net.darkhax.botanypots.common.api.data.recipes.BotanyPotRecipe
assemble, canCraftInDimensions, couldMatch, getResultItem, hoverTooltip, isSpecial, recipeCodec, recipeStream, showNotificationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.item.crafting.Recipe
getGroup, getIngredients, getRemainingItems, getSerializer, getToastSymbol, isIncomplete, matches
-
Field Details
-
TYPE
-
RECIPES
public static final net.darkhax.bookshelf.common.api.function.SidedReloadableCache<Map<net.minecraft.resources.ResourceLocation,net.minecraft.world.item.crafting.RecipeHolder<Fertilizer>>> RECIPES -
CACHE
public static final net.darkhax.bookshelf.common.api.function.SidedReloadableCache<RecipeCache<Fertilizer>> CACHE
-
-
Constructor Details
-
Fertilizer
public Fertilizer()
-
-
Method Details
-
apply
public abstract void apply(@NotNull @NotNull BotanyPotContext context, @NotNull @NotNull net.minecraft.world.level.Level level) Applies the fertilizer to the crop.- Parameters:
context- The context that the fertilizer is being used in.level- The current game level.
-
getType
@NotNull public @NotNull net.minecraft.world.item.crafting.RecipeType<?> getType() -
getFertilizer
@Nullable public static @Nullable net.minecraft.world.item.crafting.RecipeHolder<Fertilizer> getFertilizer(net.minecraft.world.level.Level level, BotanyPotContext context, net.minecraft.world.item.ItemStack stack)
-