接口的使用
org.bukkit.block.BlockState
程序包
说明
Bukkit API的顶级程序包, 包含通用的API类和接口.
用于操作在
世界
内的三位像素(方块),包括一些特定的状态.为在
世界
内存在的非三维像素单位(实体)提供的接口,包含玩家、怪物、抛射物等.简化
世界
生成实现的类.用于操作可以存储在
物品堆
的额外数据的接口.Classes related to creating or using
structures
without creating Structure
blocks
in the world.-
org.bukkit中BlockState的使用
修饰符和类型方法说明RegionAccessor.getBlockState
(int x, int y, int z) Gets theBlockState
at the given coordinates.RegionAccessor.getBlockState
(@NotNull Location location) Gets theBlockState
at the givenLocation
.Chunk.getTileEntities()
获取该区块内所有的TileEntity的列表.修饰符和类型方法说明boolean
RegionAccessor.generateTree
(@NotNull Location location, @NotNull Random random, @NotNull TreeType type, @Nullable Predicate<BlockState> statePredicate) Creates a tree at the givenLocation
boolean
RegionAccessor.generateTree
(@NotNull Location location, @NotNull Random random, @NotNull TreeType type, @Nullable Consumer<BlockState> stateConsumer) Creates a tree at the givenLocation
-
org.bukkit.block中BlockState的使用
修饰符和类型接口说明interface
代表旗帜.interface
代表木桶.interface
代表信标.interface
已过时。除材质本身之外, 本状态未提供有用的信息interface
代表蜂巢.interface
代表钟.interface
代表高炉.interface
代表酿造台.interface
Represents a captured state of suspicious sand or gravel.interface
Represents a captured state of a calibrated sculk sensorinterface
代表营火.interface
代表箱子.interface
Represents a captured state of a chiseled bookshelf.interface
代表命令方块.interface
代表关闭或打开状态的红石比较器.interface
代表潮涌核心.interface
代表容器方块.interface
代表刷怪笼.interface
代表(反向)阳光探测器.interface
Represents a captured state of a decorated pot.interface
代表发射器.interface
代表投掷器.interface
代表附魔台.interface
代表末影箱.interface
代表末地折跃门.interface
EntityBlockStorage<T extends Entity>
代表可存储实体的方块 (译注:或者称为实体容器方块).interface
代表熔炉.interface
Represents a captured state of a hanging sign.interface
代表漏斗.interface
代表拼图方块.interface
代表唱片机.interface
代表讲台.interface
Represents a captured state of a sculk catalyst.interface
Represents a captured state of a sculk sensorinterface
Represents a captured state of a sculk shrieker.interface
代表潜影盒方块状态.interface
代表告示牌或者墙上告示牌.interface
代表头颅.interface
代表烟熏炉.interface
代表结构方块, 其可从文件中加载方块或保存方块到文件.interface
已过时。interface
代表持有指定位置的 tile entity 的方块状态. -
org.bukkit.entity中BlockState的使用
修饰符和类型方法说明void
Player.sendBlockChanges
(@NotNull Collection<BlockState> blocks) Send a multi-block change.void
Player.sendBlockChanges
(@NotNull Collection<BlockState> blocks, boolean suppressLightUpdates) 已过时。suppressLightUpdates is not functional in versions greater than 1.19.4 -
org.bukkit.event.block中BlockState的使用
修饰符和类型方法说明BlockPlaceEvent.getBlockReplacedState()
获取被替换的方块的 BlockState.BlockDropItemEvent.getBlockState()
获取被破坏的方块的BlockState.BlockFadeEvent.getNewState()
获取因为世界条件消退,融化,消失的方块的状态(BlockState
).BlockGrowEvent.getNewState()
获取这个方块生长之后的新状态.CauldronLevelChangeEvent.getNewState()
Gets the new state of the cauldron.MoistureChangeEvent.getNewState()
获取受到影响的方块的新状态.修饰符和类型方法说明BlockFertilizeEvent.getBlocks()
返回由于施肥而产生变化的所有方块的列表.SpongeAbsorbEvent.getBlocks()
获取因海绵吸水而被移除的方块的列表.BlockMultiPlaceEvent.getReplacedBlockStates()
获取所有被替换的旧方块的方块状态列表.限定符构造器说明BlockDropItemEvent
(@NotNull Block block, @NotNull BlockState blockState, @NotNull Player player, @NotNull List<Item> items) BlockFadeEvent
(@NotNull Block block, @NotNull BlockState newState) BlockFormEvent
(@NotNull Block block, @NotNull BlockState newState) BlockGrowEvent
(@NotNull Block block, @NotNull BlockState newState) BlockPlaceEvent
(@NotNull Block placedBlock, @NotNull BlockState replacedBlockState, @NotNull Block placedAgainst, @NotNull ItemStack itemInHand, @NotNull Player thePlayer, boolean canBuild) 已过时。BlockPlaceEvent
(@NotNull Block placedBlock, @NotNull BlockState replacedBlockState, @NotNull Block placedAgainst, @NotNull ItemStack itemInHand, @NotNull Player thePlayer, boolean canBuild, @NotNull EquipmentSlot hand) BlockSpreadEvent
(@NotNull Block block, @NotNull Block source, @NotNull BlockState newState) CauldronLevelChangeEvent
(@NotNull Block block, @Nullable Entity entity, @NotNull CauldronLevelChangeEvent.ChangeReason reason, @NotNull BlockState newBlock) EntityBlockFormEvent
(@NotNull Entity entity, @NotNull Block block, @NotNull BlockState blockstate) MoistureChangeEvent
(@NotNull Block block, @NotNull BlockState newState) 限定符构造器说明BlockFertilizeEvent
(@NotNull Block theBlock, @Nullable Player player, @NotNull List<BlockState> blocks) BlockMultiPlaceEvent
(@NotNull List<BlockState> states, @NotNull Block clicked, @NotNull ItemStack itemInHand, @NotNull Player thePlayer, boolean canBuild) SpongeAbsorbEvent
(@NotNull Block block, @NotNull List<BlockState> waterblocks) -
org.bukkit.event.entity中BlockState的使用
限定符构造器说明EntityCreatePortalEvent
(@NotNull LivingEntity what, @NotNull List<BlockState> blocks, @NotNull PortalType type) 已过时。 -
org.bukkit.event.world中BlockState的使用
修饰符和类型方法说明PortalCreateEvent.getBlocks()
获取与创建的传送门相关联的所有组成方块的数组列表.StructureGrowEvent.getBlocks()
获取与结构有关的所有方块的列表.限定符构造器说明PortalCreateEvent
(@NotNull List<BlockState> blocks, @NotNull World world, @NotNull PortalCreateEvent.CreateReason reason) 已过时。PortalCreateEvent
(@NotNull List<BlockState> blocks, @NotNull World world, @Nullable Entity entity, @NotNull PortalCreateEvent.CreateReason reason) StructureGrowEvent
(@NotNull Location location, @NotNull TreeType species, boolean bonemeal, @Nullable Player player, @NotNull List<BlockState> blocks) -
org.bukkit.generator中BlockState的使用
修饰符和类型方法说明LimitedRegion.getTileEntities()
Gets a list of all tile entities in the limited region including the buffer zone. -
org.bukkit.inventory.meta中BlockState的使用
修饰符和类型方法说明void
BlockStateMeta.setBlockState
(@NotNull BlockState blockState) 将BlockState副本附加到物品上(设置这个物品的BlockState). -
org.bukkit.structure中BlockState的使用