Interface Ageable
- All Superinterfaces:
BlockData
A block state carrying the
age property: the growth stage of crops and similar blocks.
Block states are immutable: with... methods return another state and leave this one
untouched.
- Since:
- 0.1.0
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault intgetAge()Returns the current growth stage, from0togetMaximumAge().default intReturns the last growth stage of this block.default AgeablewithAge(int age) Returns the same block with anotheragevalue.
-
Method Details
-
getAge
default int getAge()Returns the current growth stage, from0togetMaximumAge().- Returns:
- the current growth stage, from
0togetMaximumAge() - Since:
- 0.1.0
-
withAge
Returns the same block with anotheragevalue.- Parameters:
age- the growth stage- Returns:
- the same block with another
agevalue - Since:
- 0.1.0
-
getMaximumAge
default int getMaximumAge()Returns the last growth stage of this block.- Returns:
- the last growth stage of this block
- Throws:
IllegalStateException- if the block type declares noageproperty- Since:
- 0.1.0
-