Interface Levelled
- All Superinterfaces:
BlockData
A block state carrying the
level property: the fill level of fluids, cauldrons 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 intgetLevel()Returns the current level, from0togetMaximumLevel().default intReturns the highest level of this block.default LevelledwithLevel(int level) Returns the same block with anotherlevelvalue.
-
Method Details
-
getLevel
default int getLevel()Returns the current level, from0togetMaximumLevel().- Returns:
- the current level, from
0togetMaximumLevel() - Since:
- 0.1.0
-
withLevel
Returns the same block with anotherlevelvalue.- Parameters:
level- the level- Returns:
- the same block with another
levelvalue - Since:
- 0.1.0
-
getMaximumLevel
default int getMaximumLevel()Returns the highest level of this block.- Returns:
- the highest level of this block
- Throws:
IllegalStateException- if the block type declares nolevelproperty- Since:
- 0.1.0
-