Package org.bukkit.block.data
Interface Levelled
- All Known Subinterfaces:
Light
'level' represents the amount of fluid contained within this block, either by
itself or inside a cauldron.
In the case of water and lava blocks the levels have special meanings: a level of 0 corresponds to a source block, 1-7 regular fluid heights, and 8-15 to "falling" fluids. All falling fluids have the same behaviour, but the level corresponds to that of the block above them, equal to
May not be higher than
In the case of water and lava blocks the levels have special meanings: a level of 0 corresponds to a source block, 1-7 regular fluid heights, and 8-15 to "falling" fluids. All falling fluids have the same behaviour, but the level corresponds to that of the block above them, equal to
this.level - 8
Note that counterintuitively, an adjusted level of 1 is the highest level,
whilst 7 is the lowest.
May not be higher than
getMaximumLevel()
.-
Method Summary
Methods inherited from interface org.bukkit.block.data.BlockData
clone, copyTo, createBlockState, getAsString, getAsString, getCollisionShape, getDestroySpeed, getDestroySpeed, getLightEmission, getMapColor, getMaterial, getPistonMoveReaction, getPlacementMaterial, getSoundGroup, isFaceSturdy, isOccluding, isPreferredTool, isRandomlyTicked, isSupported, isSupported, matches, merge, mirror, requiresCorrectToolForDrops, rotate
-
Method Details
-
getLevel
int getLevel()Gets the value of the 'level' property.- Returns:
- the 'level' value
-
setLevel
void setLevel(int level) Sets the value of the 'level' property.- Parameters:
level
- the new 'level' value
-
getMaximumLevel
int getMaximumLevel()Gets the maximum allowed value of the 'level' property.- Returns:
- the maximum 'level' value
-
getMinimumLevel
int getMinimumLevel()Gets the minimum allowed value of the 'level' property.- Returns:
- the minimum 'level' value
-