接口的使用
org.bukkit.block.BlockState
程序包
说明
Bukkit API的顶级程序包, 包含通用的API类和接口.
用于操作在
世界
内的三位像素(方块),包括一些特定的状态.各种方块的 BlockData 类.
为在
世界
内存在的非三维像素单位(实体)提供的接口,包含玩家、怪物、抛射物等.简化
世界
生成实现的类.用于操作可以存储在
物品堆
的额外数据的接口.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 Consumer<? super BlockState> stateConsumer) Creates a tree at the givenLocation
boolean
RegionAccessor.generateTree
(@NotNull Location location, @NotNull Random random, @NotNull TreeType type, @Nullable Predicate<? super BlockState> statePredicate) 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
Represents a captured state of a crafter.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 的方块状态.interface
Represents a captured state of a trial spawner.interface
Represents a captured state of a trial spawner. -
org.bukkit.block.data中BlockState的使用
修饰符和类型方法说明BlockData.createBlockState()
Creates a new defaultBlockState
for this type of Block, not bound to a location. -
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.BlockExplodeEvent.getExplodedBlockState()
返回发生爆炸的方块的已捕获状态.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) BlockExplodeEvent
(@NotNull Block what, @NotNull BlockState blockState, @NotNull List<Block> blocks, float yield, @NotNull ExplosionResult result) 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的使用
修饰符和类型方法说明EntityDamageByBlockEvent.getDamagerBlockState()
Returns the captured BlockState of the block that damaged the player.限定符构造器说明EntityDamageByBlockEvent
(@Nullable Block damager, @Nullable BlockState damagerState, @NotNull Entity damagee, @NotNull EntityDamageEvent.DamageCause cause, @NotNull DamageSource damageSource, double damage) EntityDamageByBlockEvent
(@Nullable Block damager, @Nullable BlockState damagerState, @NotNull Entity damagee, @NotNull EntityDamageEvent.DamageCause cause, @NotNull DamageSource damageSource, @NotNull Map<EntityDamageEvent.DamageModifier, Double> modifiers, @NotNull Map<EntityDamageEvent.DamageModifier, ? extends Function<? super Double, Double>> modifierFunctions) 限定符构造器说明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的使用
-
org.bukkit.util中BlockState的使用
修饰符和类型方法说明BlockTransformer.TransformationState.getOriginal()
Creates a clone of the original block state that a structure wanted to place and caches it for the current transformer.BlockTransformer.TransformationState.getWorld()
Creates a clone of the block state that was at the location of the currently modified block at the start of the transformation process and caches it for the current transformer.BlockTransformer.transform
(@NotNull LimitedRegion region, int x, int y, int z, @NotNull BlockState current, @NotNull BlockTransformer.TransformationState state) Transforms a block in a structure.修饰符和类型方法说明BlockTransformer.transform
(@NotNull LimitedRegion region, int x, int y, int z, @NotNull BlockState current, @NotNull BlockTransformer.TransformationState state) Transforms a block in a structure.