接口的使用
org.bukkit.block.data.BlockData
程序包
说明
Bukkit API的顶级程序包, 包含通用的API类和接口.
用于操作在
世界
内的三位像素(方块),包括一些特定的状态.各种方块的 BlockData 类.
与部分方块或方块集有关的特定的 BlockData 类.
为在
世界
内存在的非三维像素单位(实体)提供的接口,包含玩家、怪物、抛射物等.简化
世界
生成实现的类.用于操作可以存储在
物品堆
的额外数据的接口.-
org.bukkit中BlockData的使用
修饰符和类型方法说明Bukkit.createBlockData
(@NotNull String data) Creates a newBlockData
instance with material and properties parsed from provided data.Bukkit.createBlockData
(@NotNull Material material) Creates a newBlockData
instance for the specified Material, with all properties initialized to unspecified defaults.Creates a newBlockData
instance for the specified Material, with all properties initialized to unspecified defaults.Bukkit.createBlockData
(@Nullable Material material, @Nullable String data) Creates a newBlockData
instance for the specified Material, with all properties initialized to unspecified defaults, except for those provided in data.Material.createBlockData()
Creates a newBlockData
instance for this Material, with all properties initialized to unspecified defaults.Material.createBlockData
(@Nullable String data) Creates a newBlockData
instance for this Material, with all properties initialized to unspecified defaults, except for those provided in data.Material.createBlockData
(@Nullable Consumer<BlockData> consumer) Creates a newBlockData
instance for the specified Material, with all properties initialized to unspecified defaults.Server.createBlockData
(@NotNull String data) Creates a newBlockData
instance with material and properties parsed from provided data.Server.createBlockData
(@NotNull Material material) Creates a newBlockData
instance for the specified Material, with all properties initialized to unspecified defaults.Creates a newBlockData
instance for the specified Material, with all properties initialized to unspecified defaults.Server.createBlockData
(@Nullable Material material, @Nullable String data) Creates a newBlockData
instance for the specified Material, with all properties initialized to unspecified defaults, except for those provided in data.UnsafeValues.fromLegacy
(Material material, byte data) 已过时。BlockChangeDelegate.getBlockData
(int x, int y, int z) Get the block data at the location.ChunkSnapshot.getBlockData
(int x, int y, int z) Get block data for block at corresponding coordinate in the chunkRegionAccessor.getBlockData
(int x, int y, int z) Gets theBlockData
at the given coordinates.RegionAccessor.getBlockData
(@NotNull Location location) 修饰符和类型方法说明boolean
Tests if this chunk contains the specified block.boolean
Tests if this snapshot contains the specified block.boolean
BlockChangeDelegate.setBlockData
(int x, int y, int z, @NotNull BlockData blockData) Set a block data at the specified coordinates.void
RegionAccessor.setBlockData
(int x, int y, int z, @NotNull BlockData blockData) Sets theBlockData
at the given coordinates.void
RegionAccessor.setBlockData
(@NotNull Location location, @NotNull BlockData blockData) World.spawnFallingBlock
(@NotNull Location location, @NotNull BlockData data) 修饰符和类型方法说明Creates a newBlockData
instance for the specified Material, with all properties initialized to unspecified defaults.Material.createBlockData
(@Nullable Consumer<BlockData> consumer) Creates a newBlockData
instance for the specified Material, with all properties initialized to unspecified defaults.Creates a newBlockData
instance for the specified Material, with all properties initialized to unspecified defaults. -
org.bukkit.block中BlockData的使用
修饰符和类型方法说明boolean
Checks if this block is a valid placement location for the specified block data.void
Block.setBlockData
(@NotNull BlockData data) 设置此方块的BlockData.void
Block.setBlockData
(@NotNull BlockData data, boolean applyPhysics) 设置一个方块的BlockData, 并决定是否应用重力 (译者注: 更新方块的意思,如沙不掉落).void
BlockState.setBlockData
(@NotNull BlockData data) 设置此方块状态的数据. -
org.bukkit.block.data中BlockData的使用
修饰符和类型接口说明interface
'age' 表示农作物的不同生长阶段.interface
'power' 值代表当前通过此方块发出/传输红石信号的强度.interface
'attached' 值表示绊线钩或绊线是否构成了一个完整的绊线回路并准备好触发.interface
'half' 值表示该方块是一个两格高方块的哪一部分.interface
'dusted' 表示方块被刷子清除的程度,即露出的程度。interface
'facing' 代表方块的朝向.interface
'face' 值代表一个拉杆或按钮固定在哪一个面上.interface
'hanging' denotes whether the lantern is hanging from a block.interface
'hatch' 值为这些蛋中孵化出实体的数量.interface
'level' 值代表该方块中液体的高度, 其液体要么单独存在要么在炼药锅内.interface
'lit' 表示此方块 (红石或熔炉) 是否在发光 ———— 不是烧毁他们的意思.interface
This class encompasses the 'north', 'east', 'south', 'west', 'up', 'down' boolean flags which are used to set which faces of the block textures are displayed on.interface
'open' 表示此方块是否开着.interface
'axis' represents the axis along whilst this block is oriented.interface
'powered' 数据值表示该方块是否被充能.interface
'shape' 数据值表示此铁轨的形态 (铁轨连接方向).interface
'rotation' 表示方块的旋转方向.interface
'snowy' 属性表示此方块是否被雪覆盖 (通常情况下时因为 "它" 的头顶下着雪).interface
'waterlogged' 表示方块是否处于流体之中. -
org.bukkit.block.data.type中BlockData的使用
修饰符和类型接口说明interface
interface
'leaves' 值代表该竹子方块上叶子的大小.interface
interface
与Bisected
相似, 'part' 值表示该方块对应的是床的哪一部分.interface
'honey_level' 值代表该蜂箱中存储蜂蜜的值.interface
'attachment' 值表示钟是怎么固定到其他方块上的.interface
'tilt' indicates how far the leaf is tilted.interface
酿造台的 'has_bottle_0', 'has_bottle_1', 'has_bottle_2' 标识接口表示是否在外部贴图渲染出瓶子.interface
'drag' 值表示是否存在应用到实体上的力将其移向该方块.interface
'bites' 数据值表示蛋糕被吃掉了多少片.interface
interface
'signal_fire' 值表示该营火是否因为底部放了干草块而冒出更多的烟 (信号营火).interface
'candles' represents the number of candles which are present.interface
interface
'berries' indicates whether the block has berries.interface
interface
'type' 数据值表示这个方块是大型箱子的哪一部分, 亦或是它为一个独立的箱子.interface
表示书架上外部可见的哪些物品槽已被占用的接口,其标记名为“slot_0_occupied”、“slot_1_occupied”等。interface
interface
'conditional' 数据值表示触发此命令方块是否需要条件, 换句话说只有在此命令方块前的命令方块执行成功时才会触发本命令方块.interface
'mode' 值表示该 (红石) 比较器将会以什么模式运算.interface
interface
'inverted' 值表示阳光探测器是否被调整了反转模式, 即在光照不足时再激活.interface
interface
与Powerable
相似, 'triggered' 数据值表示此发射器是否被激活.interface
'hinge' 数据值表示门的门轴依靠哪一边, 并且开关门时会旋转.interface
interface
interface
'eye' 值表示该末地传送门上是否放置了一个末影之眼 (被激活).interface
'moisture' 值的的大小表示耕地距离水源 (如果有的话) .interface
interface
md_5's mixtape.interface
interface
'in_wall" 值表示栅栏门是否固定在墙上, 若为 true, 栅栏门的材质会被稍微降低一点以更好的融入周围 (墙, 比如圆石墙).interface
interface
interface
interface
interface
与Powerable
相似, 'enabled' 数据值表示此漏斗是否被激活.interface
'orientation' 指拼图方块的朝向.interface
'has_record' 数据值可用来快速检查此唱片机是否装入了唱片.interface
interface
interface
'persistent' 值决定树叶是否会被服务器检查以腐烂 (自动消失).interface
'has_book' 可用于快速检测讲台内是否有书.interface
interface
interface
interface
'instrument' 为该音符盒被激活时发出的音色.interface
interface
“flower_amount” 表示花瓣的数量。interface
'extended' 值表示当前活塞臂是否伸出.interface
'short' 值表示该活塞臂是否由于正在回缩的原因比平时短.interface
interface
'thickness' represents the dripstone thickness.interface
铁轨的一种, 以一种或多种方式与红石交互.interface
interface
'north', 'east', 'south', 'west' 代表该红石线与临近方块连接的方式.interface
'delay' 为中继器传递信号的延迟, 即在当前信号传递过来后, 等待多少刻再激活自身以传递信号到下一个方块.interface
'charges' 值代表重生锚还能使用几次.interface
'stage' 值代表树苗的成长阶段.interface
'bottom' 值表示脚手架是否浮空.interface
'bloom' indicates whether the sculk catalyst is actively spreading the sculk or not.interface
'sculk_sensor_phase' indicates the current operational phase of the sensor.interface
'can_summon' indicates whether the sculk shrieker can summon the warden.interface
interface
'pickles' 值表示该方块有多少个海泡菜.interface
interface
'type' 值代表台阶 (/半砖) 的状态 - 上台阶, 下台阶, 或占据了整个方块的双层台阶.interface
interface
'layers' 值代表该方块堆积了多少层雪片.interface
'shape' 值代表阶梯方块的材质和碰撞箱的类型.interface
'mode' 值代表结构方块可执行的不同行为模式.interface
interface
'type' 值代表该 (技术) 活塞方块对应的类型.interface
'unstable' 值表示该 TNT 是否会在破坏后引爆.interface
interface
'disarmed' 值表示该绊线被剪刀破坏, 所以不会在破坏时触发绊线钩.interface
interface
'eggs' 值为该方块中出现的海龟蛋的数量.interface
该类包含 'north', 'east', 'south', 'west', 的高度标识, 用于设置墙在此朝向的高度.interface
interface
-
org.bukkit.entity中BlockData的使用
修饰符和类型方法说明BlockDisplay.getBlock()
Gets the displayed block.FallingBlock.getBlockData()
Get the data for the falling blockEnderman.getCarriedBlock()
获取末影人手持的方块的方块数据对象.Minecart.getDisplayBlockData()
获取展示在矿车中的方块的方块数据.修饰符和类型方法说明void
Player.sendBlockChange
(@NotNull Location loc, @NotNull BlockData block) 向该玩家发送一个伪造的指定位置的方块(Block
)更改数据包.这不会改变世界中的方块.void
Sets the displayed block.void
Enderman.setCarriedBlock
(@Nullable BlockData blockData) 设置末影人手持的方块的方块数据对象.void
Minecart.setDisplayBlockData
(@Nullable BlockData blockData) 设置展示在矿车中的方块. -
org.bukkit.event.block中BlockData的使用
修饰符和类型方法说明BlockCanBuildEvent.getBlockData()
获取我们想要放置的方块的BlockData数据.FluidLevelChangeEvent.getNewData()
获取变化后的方块的新数据.限定符构造器说明BlockCanBuildEvent
(@NotNull Block block, @NotNull BlockData type, boolean canBuild) 已过时。BlockCanBuildEvent
(@NotNull Block block, @Nullable Player player, @NotNull BlockData type, boolean canBuild) BlockPhysicsEvent
(@NotNull Block block, @NotNull BlockData changed) FluidLevelChangeEvent
(@NotNull Block theBlock, @NotNull BlockData newData) -
org.bukkit.event.entity中BlockData的使用
-
org.bukkit.generator中BlockData的使用
修饰符和类型方法说明ChunkGenerator.ChunkData.getBlockData
(int x, int y, int z) Get the type and data of the block at x, y, z.修饰符和类型方法说明void
Set the block at x,y,z in the chunk data to material.void
ChunkGenerator.ChunkData.setRegion
(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, @NotNull BlockData blockData) Set a region of this chunk from xMin, yMin, zMin (inclusive) to xMax, yMax, zMax (exclusive) to material. -
org.bukkit.inventory.meta中BlockData的使用