Interface LevelReader

All Superinterfaces:
BiomeManager.NoiseBiomeSource, BlockAndTintGetter, BlockGetter, CollisionGetter, IBlockAndTintGetterExtension, IBlockGetterExtension, ILevelReaderExtension, LevelHeightAccessor, SignalGetter
All Known Subinterfaces:
CommonLevelAccessor, LevelAccessor, ServerLevelAccessor, WorldGenLevel
All Known Implementing Classes:
ClientLevel, Level, ServerLevel, WorldGenRegion

  • Method Details

    • getChunk

      @Nullable ChunkAccess getChunk(int chunkX, int chunkZ, ChunkStatus targetStatus, boolean loadOrGenerate)
    • hasChunk

      @Deprecated boolean hasChunk(int chunkX, int chunkZ)
      Deprecated.
    • getHeight

      int getHeight(Heightmap.Types type, int x, int z)
    • getHeight

      default int getHeight(Heightmap.Types type, BlockPos pos)
    • getSkyDarken

      int getSkyDarken()
    • getBiomeManager

      BiomeManager getBiomeManager()
    • getBiome

      default Holder<Biome> getBiome(BlockPos pos)
    • getBlockStatesIfLoaded

      default Stream<BlockState> getBlockStatesIfLoaded(AABB box)
    • getBlockTint

      default int getBlockTint(BlockPos pos, ColorResolver resolver)
      Specified by:
      getBlockTint in interface BlockAndTintGetter
    • getNoiseBiome

      default Holder<Biome> getNoiseBiome(int quartX, int quartY, int quartZ)
      Description copied from interface: BiomeManager.NoiseBiomeSource
      Gets the biome at the given quart positions. Note that the coordinates passed into this method are 1/4 the scale of block coordinates.
      Specified by:
      getNoiseBiome in interface BiomeManager.NoiseBiomeSource
    • getUncachedNoiseBiome

      Holder<Biome> getUncachedNoiseBiome(int quartX, int quartY, int quartZ)
    • isClientSide

      boolean isClientSide()
    • getSeaLevel

      int getSeaLevel()
    • dimensionType

      DimensionType dimensionType()
    • getMinY

      default int getMinY()
      Specified by:
      getMinY in interface LevelHeightAccessor
    • getHeight

      default int getHeight()
      Specified by:
      getHeight in interface LevelHeightAccessor
    • getHeightmapPos

      default BlockPos getHeightmapPos(Heightmap.Types type, BlockPos pos)
    • isEmptyBlock

      default boolean isEmptyBlock(BlockPos pos)
      Checks to see if an air block exists at the provided location. Note that this only checks to see if the blocks material is set to air, meaning it is possible for non-vanilla blocks to still pass this check.
    • canSeeSkyFromBelowWater

      default boolean canSeeSkyFromBelowWater(BlockPos pos)
    • getPathfindingCostFromLightLevels

      default float getPathfindingCostFromLightLevels(BlockPos pos)
    • getLightLevelDependentMagicValue

      @Deprecated default float getLightLevelDependentMagicValue(BlockPos pos)
      Deprecated.
    • getChunk

      default ChunkAccess getChunk(BlockPos pos)
    • getChunk

      default ChunkAccess getChunk(int chunkX, int chunkZ)
    • getChunk

      default ChunkAccess getChunk(int chunkX, int chunkZ, ChunkStatus status)
    • getChunkForCollisions

      default @Nullable BlockGetter getChunkForCollisions(int chunkX, int chunkZ)
      Specified by:
      getChunkForCollisions in interface CollisionGetter
    • isWaterAt

      default boolean isWaterAt(BlockPos pos)
    • containsAnyLiquid

      default boolean containsAnyLiquid(AABB box)
      Checks if any of the blocks within the aabb are liquids.
    • getMaxLocalRawBrightness

      default int getMaxLocalRawBrightness(BlockPos pos)
    • getMaxLocalRawBrightness

      default int getMaxLocalRawBrightness(BlockPos pos, int skyDarkening)
    • getEffectiveSkyBrightness

      default int getEffectiveSkyBrightness(BlockPos pos)
    • hasChunkAt

      @Deprecated default boolean hasChunkAt(int blockX, int blockZ)
      Deprecated.
    • hasChunkAt

      @Deprecated default boolean hasChunkAt(BlockPos pos)
      Deprecated.
    • hasChunksAt

      @Deprecated default boolean hasChunksAt(BlockPos pos0, BlockPos pos1)
      Deprecated.
    • hasChunksAt

      @Deprecated default boolean hasChunksAt(int x0, int y0, int z0, int x1, int y1, int z1)
      Deprecated.
    • hasChunksAt

      @Deprecated default boolean hasChunksAt(int x0, int z0, int x1, int z1)
      Deprecated.
    • registryAccess

      RegistryAccess registryAccess()
    • enabledFeatures

      FeatureFlagSet enabledFeatures()
    • holderLookup

      default <T> HolderLookup<T> holderLookup(ResourceKey<? extends Registry<? extends T>> key)
    • environmentAttributes

      EnvironmentAttributeReader environmentAttributes()