Interface Levelled

All Superinterfaces:
BlockData, Cloneable

public interface Levelled
extends BlockData
'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 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 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