类 WorldUtils

java.lang.Object
committee.nova.mods.avaritia.api.util.WorldUtils

public class WorldUtils extends Object
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    static List<net.minecraft.world.level.block.entity.BlockEntity>
    getBlockEntitiesWithinAABB(net.minecraft.world.level.Level level, net.minecraft.world.phys.AABB bBox)
     
    static @Nullable net.minecraft.world.level.block.entity.BlockEntity
    getBlockEntity(@Nullable net.minecraft.world.level.BlockGetter level, @NotNull net.minecraft.core.BlockPos pos)
    如果加载位置,获取一个块实体
    static int
    getEnvironmentBrightness(net.minecraft.world.entity.player.Player player)
    获取玩家当前位置的环境亮度
    static Iterable<net.minecraft.core.BlockPos>
    getPositionsFromBox(net.minecraft.core.BlockPos corner1, net.minecraft.core.BlockPos corner2)
     
    static Iterable<net.minecraft.core.BlockPos>
    getPositionsFromBox(net.minecraft.world.phys.AABB box)
     
    static boolean
    isBlockLoaded(@Nullable net.minecraft.world.level.BlockGetter world, @NotNull net.minecraft.core.BlockPos pos)
    检查位置是否处于世界范围,并已加载

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 构造器详细资料

    • WorldUtils

      public WorldUtils()
  • 方法详细资料

    • getEnvironmentBrightness

      public static int getEnvironmentBrightness(net.minecraft.world.entity.player.Player player)
      获取玩家当前位置的环境亮度
      参数:
      player - 当前玩家实体
      返回:
      当前环境亮度(范围0-15)
    • getBlockEntitiesWithinAABB

      public static List<net.minecraft.world.level.block.entity.BlockEntity> getBlockEntitiesWithinAABB(net.minecraft.world.level.Level level, net.minecraft.world.phys.AABB bBox)
    • getPositionsFromBox

      public static Iterable<net.minecraft.core.BlockPos> getPositionsFromBox(net.minecraft.world.phys.AABB box)
    • getPositionsFromBox

      public static Iterable<net.minecraft.core.BlockPos> getPositionsFromBox(net.minecraft.core.BlockPos corner1, net.minecraft.core.BlockPos corner2)
    • getBlockEntity

      @Nullable public static @Nullable net.minecraft.world.level.block.entity.BlockEntity getBlockEntity(@Nullable @Nullable net.minecraft.world.level.BlockGetter level, @NotNull @NotNull net.minecraft.core.BlockPos pos)
      如果加载位置,获取一个块实体
      参数:
      level - world
      pos - position
      返回:
      如果发现块实体,则无发现或未加载
    • isBlockLoaded

      public static boolean isBlockLoaded(@Nullable @Nullable net.minecraft.world.level.BlockGetter world, @NotNull @NotNull net.minecraft.core.BlockPos pos)
      检查位置是否处于世界范围,并已加载
      参数:
      world - world
      pos - position
      返回:
      如果位置已加载或给定的世界是Iworldreader的超级类,则没有加载的概念。