Interface ReplantableGrowthType
- All Superinterfaces:
GrowthType
Variant of
GrowthType that separates the replanting logic from GrowthType.harvest(GrowthContext, boolean) out into separate methods.-
Field Summary
Fields inherited from interface GrowthType
CODEC -
Method Summary
Modifier and TypeMethodDescriptionbooleancanReplant(GrowthContext context) List<net.minecraft.world.item.ItemStack> harvest(GrowthContext context) Harvests the plant, if possible.default List<net.minecraft.world.item.ItemStack> harvest(GrowthContext context, boolean replant) Harvests the plant, if possible.voidreplant(GrowthContext context) Replants the plant, if possible.Methods inherited from interface GrowthType
canGrow, canHarvest, codec, grow
-
Method Details
-
harvest
Description copied from interface:GrowthTypeHarvests the plant, if possible.- Specified by:
harvestin interfaceGrowthType- Parameters:
context- TheGrowthContextto use.replant- Whether the plant should be replanted or not, if possible.- Returns:
- A list of
ItemStack, representing the drops of the plant.
-
harvest
Harvests the plant, if possible.- Parameters:
context- TheGrowthContextto use.- Returns:
- A list of
ItemStack, representing the drops of the plant.
-
canReplant
- Parameters:
context- TheGrowthContextto use.- Returns:
- Whether the plant can currently be replanted or not.
-
replant
Replants the plant, if possible.- Parameters:
context- TheGrowthContextto use.
-