接口的使用
org.bukkit.block.BlockState
使用BlockState的程序包
程序包
说明
Bukkit API的顶级程序包, 包含通用的API类和接口.
用于操作在
世界内的三位像素(方块),包括一些特定的状态.各种方块的 BlockData 类.
为在
世界内存在的非三维像素单位(实体)提供的接口,包含玩家、怪物、抛射物等.简化
世界生成实现的类.用于操作可以存储在
物品堆的额外数据的接口.Classes related to creating or using
structures without creating Structure
blocks in the world.提供多种目的和单一目的的类以简化各种编程概念.
-
org.bukkit中BlockState的使用
返回BlockState的org.bukkit中的方法修饰符和类型方法说明RegionAccessor.getBlockState(int x, int y, int z) Gets theBlockStateat the given coordinates.RegionAccessor.getBlockState(@NotNull Location location) Gets theBlockStateat the givenLocation.Chunk.getTileEntities()获取该区块内所有的TileEntity的列表.类型变量类型为BlockState的org.bukkit中的方法参数修饰符和类型方法说明booleanRegionAccessor.generateTree(@NotNull Location location, @NotNull Random random, @NotNull TreeType type, @Nullable Consumer<? super BlockState> stateConsumer) Creates a tree at the givenLocationbooleanRegionAccessor.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代表酿造台.interfaceRepresents a captured state of suspicious sand or gravel.interface代表一个捕获的校准幽匿感测体状态.interface代表营火.interface代表箱子.interface代表雕纹书架的捕获状态.interface代表命令方块.interface代表关闭或打开状态的红石比较器.interface代表潮涌核心.interface代表容器方块.interface代表合成器的捕获状态.interface代表一个捕获的吱吱作响的心状态.interface代表刷怪笼.interface代表(反向)阳光探测器.interface代表一个捕获的饰纹陶罐状态.interface代表发射器.interface代表投掷器.interface代表附魔台.interface代表末影箱.interface代表末地折跃门.interfaceEntityBlockStorage<T extends Entity>代表可存储实体的方块 (译注:或者称为实体容器方块).interface代表熔炉.interface代表一个捕获的悬挂告示牌状态.interface代表漏斗.interface代表拼图方块.interface代表唱片机.interface代表讲台.interface代表幽匿催发体的捕获状态.interface代表幽匿感测体的捕获状态.interface代表幽匿尖啸体的捕获状态.interface代表潜影盒方块状态.interface代表告示牌或者墙上告示牌.interface代表头颅.interface代表烟熏炉.interface代表结构方块, 其可从文件中加载方块或保存方块到文件.interface已过时。interface代表一个捕获的测试方块状态.interface代表一个捕获的测试实例方块状态.interface代表持有指定位置的 tile entity 的方块状态.interface代表一个捕获的试炼刷怪笼状态.interface代表一个捕获的保险库状态.返回BlockState的org.bukkit.block中的方法 -
org.bukkit.block.data中BlockState的使用
修饰符和类型方法说明BlockData.createBlockState()Creates a new defaultBlockStatefor this type of Block, not bound to a location. -
org.bukkit.entity中BlockState的使用
类型变量类型为BlockState的org.bukkit.entity中的方法参数修饰符和类型方法说明voidPlayer.sendBlockChanges(@NotNull Collection<BlockState> blocks) Send a multi-block change.voidPlayer.sendBlockChanges(@NotNull Collection<BlockState> blocks, boolean suppressLightUpdates) 已过时。suppressLightUpdates is not functional in versions greater than 1.19.4 -
org.bukkit.event.block中BlockState的使用
声明为BlockState的org.bukkit.event.block中的字段修饰符和类型方法说明BlockPlaceEvent.getBlockReplacedState()获取被替换的方块的 BlockState.BlockDropItemEvent.getBlockState()获取被破坏的方块的BlockState.BlockExplodeEvent.getExplodedBlockState()返回发生爆炸的方块的已捕获状态.BlockBrushEvent.getNewState()Gets the state of the block that this block will turn into.BlockFadeEvent.getNewState()获取因为世界条件消退,融化,消失的方块的状态(BlockState).BlockGrowEvent.getNewState()获取这个方块生长之后的新状态.CauldronLevelChangeEvent.getNewState()Gets the new state of the cauldron.MoistureChangeEvent.getNewState()获取受到影响的方块的新状态.返回变量类型为BlockState的类型的org.bukkit.event.block中的方法修饰符和类型方法说明BlockFertilizeEvent.getBlocks()返回由于施肥而产生变化的所有方块的列表.SpongeAbsorbEvent.getBlocks()获取因海绵吸水而被移除的方块的列表.BlockMultiPlaceEvent.getReplacedBlockStates()获取所有被替换的旧方块的方块状态列表.参数类型为BlockState的org.bukkit.event.block中的构造器限定符构造器说明BlockBrushEvent(@NotNull Block theBlock, @NotNull BlockState newState, @NotNull Player player) 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) 类型变量类型为BlockState的org.bukkit.event.block中的构造器参数限定符构造器说明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.返回变量类型为BlockState的类型的org.bukkit.event.entity中的方法参数类型为BlockState的org.bukkit.event.entity中的构造器限定符构造器说明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) 类型变量类型为BlockState的org.bukkit.event.entity中的构造器参数限定符构造器说明EntityCreatePortalEvent(@NotNull LivingEntity what, @NotNull List<BlockState> blocks, @NotNull PortalType type) 已过时。 -
org.bukkit.event.world中BlockState的使用
返回变量类型为BlockState的类型的org.bukkit.event.world中的方法修饰符和类型方法说明PortalCreateEvent.getBlocks()获取与创建的传送门相关联的所有组成方块的数组列表.StructureGrowEvent.getBlocks()获取与结构有关的所有方块的列表.类型变量类型为BlockState的org.bukkit.event.world中的构造器参数限定符构造器说明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的使用
返回变量类型为BlockState的类型的org.bukkit.generator中的方法修饰符和类型方法说明LimitedRegion.getTileEntities()Gets a list of all tile entities in the limited region including the buffer zone. -
org.bukkit.inventory.meta中BlockState的使用
参数类型为BlockState的org.bukkit.inventory.meta中的方法修饰符和类型方法说明voidBlockStateMeta.setBlockState(@NotNull BlockState blockState) 将BlockState副本附加到物品上(设置这个物品的BlockState). -
org.bukkit.structure中BlockState的使用
返回变量类型为BlockState的类型的org.bukkit.structure中的方法 -
org.bukkit.util中BlockState的使用
返回BlockState的org.bukkit.util中的方法修饰符和类型方法说明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.参数类型为BlockState的org.bukkit.util中的方法修饰符和类型方法说明BlockTransformer.transform(@NotNull LimitedRegion region, int x, int y, int z, @NotNull BlockState current, @NotNull BlockTransformer.TransformationState state) Transforms a block in a structure.