Interface BonemealableGrowthType
- All Superinterfaces:
GrowthType
Variant of
GrowthType that uses a default implementation for growing.
The default implementation will check for an instance of BonemealableBlock,
and otherwise check for any of the built-in age properties.-
Field Summary
Fields inherited from interface GrowthType
CODEC -
Method Summary
Modifier and TypeMethodDescriptiondefault booleancanGrow(GrowthContext context) default voidgrow(GrowthContext context) Grows the plant, if possible.default booleanhasNonFullAge(GrowthContext context) default voidincreaseAge(GrowthContext context) Helper method for increasing a plant's age property (if it has one) by one.Methods inherited from interface GrowthType
canHarvest, codec, harvest
-
Method Details
-
canGrow
- Specified by:
canGrowin interfaceGrowthType- Parameters:
context- TheGrowthContextto use.- Returns:
- Whether the plant can currently be grown or not.
-
grow
Description copied from interface:GrowthTypeGrows the plant, if possible.- Specified by:
growin interfaceGrowthType- Parameters:
context- TheGrowthContextto use.
-
hasNonFullAge
- Parameters:
context- TheGrowthContextto use.- Returns:
- Whether the plant has an age property that is not full, i.e., can still grow.
-
increaseAge
Helper method for increasing a plant's age property (if it has one) by one.- Parameters:
context- TheGrowthContextto use.
-