类 WorldUtils
java.lang.Object
committee.nova.mods.avaritia.api.util.WorldUtils
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明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.BlockEntitygetBlockEntity(@Nullable net.minecraft.world.level.BlockGetter level, @NotNull net.minecraft.core.BlockPos pos) 如果加载位置,获取一个块实体static intgetEnvironmentBrightness(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 booleanisBlockLoaded(@Nullable net.minecraft.world.level.BlockGetter world, @NotNull net.minecraft.core.BlockPos pos) 检查位置是否处于世界范围,并已加载
-
构造器详细资料
-
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- worldpos- position- 返回:
- 如果发现块实体,则无发现或未加载
-
isBlockLoaded
public static boolean isBlockLoaded(@Nullable @Nullable net.minecraft.world.level.BlockGetter world, @NotNull @NotNull net.minecraft.core.BlockPos pos) 检查位置是否处于世界范围,并已加载- 参数:
world- worldpos- position- 返回:
- 如果位置已加载或给定的世界是Iworldreader的超级类,则没有加载的概念。
-