接口 Levelled
- 所有已知子接口:
Light
'level' 值代表该方块中液体的高度, 其液体要么单独存在要么在炼药锅内.
对于水和熔岩方块而言, 'level' 有着特殊的含义: 'level' 为 0 时相当于源方块, 1-7 是常规的液体高度, 8-15 适用于流下的液体. 所有流下的液体都有着相同的行为, 但 'level' 值与其上方的方块相对应, 上方的液体方块的 'level' 等于
值不可大于
对于水和熔岩方块而言, 'level' 有着特殊的含义: 'level' 为 0 时相当于源方块, 1-7 是常规的液体高度, 8-15 适用于流下的液体. 所有流下的液体都有着相同的行为, 但 'level' 值与其上方的方块相对应, 上方的液体方块的 'level' 等于
this.level - 8
.
Note that counterintuitively, an adjusted level of 1 is the highest level,
whilst 7 is the lowest.
值不可大于
getMaximumLevel()
.
原文:
'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()
.
-
方法概要
从接口继承的方法 org.bukkit.block.data.BlockData
clone, copyTo, createBlockState, getAsString, getAsString, getLightEmission, getMapColor, getMaterial, getPistonMoveReaction, getPlacementMaterial, getSoundGroup, isFaceSturdy, isOccluding, isPreferredTool, isSupported, isSupported, matches, merge, mirror, requiresCorrectToolForDrops, rotate
-
方法详细资料
-
getLevel
int getLevel()获取 'level' 属性的值.原文: Gets the value of the 'level' property.
- 返回:
- 属性 'level' 的值
-
setLevel
void setLevel(int level) 设置 'level' 属性的值.原文: Sets the value of the 'level' property.
- 参数:
level
- 新的 'level' 属性值
-
getMaximumLevel
int getMaximumLevel()获取 'level' 属性所能允许的最大值.原文: Gets the maximum allowed value of the 'level' property.
- 返回:
- 'level' 属性的最大值
-