Class ChunkCache
java.lang.Object
com.minecolonies.core.entity.pathfinding.world.ChunkCache
- All Implemented Interfaces:
net.minecraft.world.level.biome.BiomeManager.NoiseBiomeSource,net.minecraft.world.level.BlockAndTintGetter,net.minecraft.world.level.BlockGetter,net.minecraft.world.level.CollisionGetter,net.minecraft.world.level.LevelHeightAccessor,net.minecraft.world.level.LevelReader,net.minecraft.world.level.SignalGetter,net.minecraftforge.client.extensions.IForgeBlockAndTintGetter,net.minecraftforge.common.extensions.IForgeBlockGetter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected net.minecraft.world.level.chunk.LevelChunk[][]protected intprotected intprotected booleanset by !chunk.getAreLevelsEmptyprotected net.minecraft.world.level.LevelReference to the World object.Fields inherited from interface net.minecraft.world.level.SignalGetter
DIRECTIONS -
Constructor Summary
ConstructorsConstructorDescriptionChunkCache(net.minecraft.world.level.Level worldIn, net.minecraft.core.BlockPos posFromIn, net.minecraft.core.BlockPos posToIn) -
Method Summary
Modifier and TypeMethodDescription@NotNull net.minecraft.world.level.dimension.DimensionTypenet.minecraft.world.flag.FeatureFlagSetnet.minecraft.world.level.biome.BiomeManagernet.minecraft.world.level.block.entity.BlockEntitygetBlockEntity(@NotNull net.minecraft.core.BlockPos pos) @NotNull net.minecraft.world.level.block.state.BlockStategetBlockState(net.minecraft.core.BlockPos pos) net.minecraft.world.level.chunk.ChunkAccessgetChunk(int x, int z, net.minecraft.world.level.chunk.ChunkStatus requiredStatus, boolean nonnull) intgetDirectSignal(net.minecraft.core.BlockPos pos, net.minecraft.core.Direction direction) List<net.minecraft.world.phys.shapes.VoxelShape>getEntityCollisions(@Nullable net.minecraft.world.entity.Entity p_186427_, net.minecraft.world.phys.AABB p_186428_) net.minecraft.world.level.material.FluidStategetFluidState(net.minecraft.core.BlockPos pos) intgetHeight(net.minecraft.world.level.levelgen.Heightmap.Types heightmapType, int x, int z) net.minecraft.core.BlockPosgetHeightmapPos(net.minecraft.world.level.levelgen.Heightmap.Types heightmapType, net.minecraft.core.BlockPos pos) net.minecraft.world.level.lighting.LevelLightEngineintintintfloatgetShade(net.minecraft.core.Direction direction, boolean b) intnet.minecraft.world.level.block.entity.BlockEntitygetTileEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.chunk.LevelChunk.EntityCreationType createType) net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome>getUncachedNoiseBiome(int x, int y, int z) net.minecraft.world.level.border.WorldBorderbooleanhasChunk(int chunkX, int chunkZ) booleanbooleanisEmpty()set by !chunk.getAreLevelsEmptybooleanisEmptyBlock(net.minecraft.core.BlockPos pos) Checks to see if an air block exists at the provided location.booleanisUnobstructed(net.minecraft.world.entity.Entity entityIn, net.minecraft.world.phys.shapes.VoxelShape shape) net.minecraft.core.RegistryAccessMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.level.BlockAndTintGetter
canSeeSky, getBrightness, getRawBrightnessMethods inherited from interface net.minecraft.world.level.BlockGetter
clip, clipWithInteractionOverride, getBlockEntity, getBlockFloorHeight, getBlockFloorHeight, getBlockStates, getLightEmission, getMaxLightLevel, isBlockInLineMethods inherited from interface net.minecraft.world.level.CollisionGetter
collidesWithSuffocatingBlock, findFreePosition, findSupportingBlock, getBlockCollisions, getCollisions, isUnobstructed, isUnobstructed, noCollision, noCollision, noCollisionMethods inherited from interface net.minecraftforge.client.extensions.IForgeBlockAndTintGetter
getShadeMethods inherited from interface net.minecraftforge.common.extensions.IForgeBlockGetter
getExistingBlockEntity, getModelDataManagerMethods inherited from interface net.minecraft.world.level.LevelHeightAccessor
getMaxSection, getMinSection, getSectionIndex, getSectionIndexFromSectionY, getSectionsCount, getSectionYFromSectionIndex, isOutsideBuildHeight, isOutsideBuildHeightMethods inherited from interface net.minecraft.world.level.LevelReader
canSeeSkyFromBelowWater, containsAnyLiquid, getBiome, getBlockStatesIfLoaded, getBlockTint, getChunk, getChunk, getChunk, getChunkForCollisions, getHeight, getLightLevelDependentMagicValue, getMaxLocalRawBrightness, getMaxLocalRawBrightness, getNoiseBiome, getPathfindingCostFromLightLevels, hasChunkAt, hasChunkAt, hasChunksAt, hasChunksAt, hasChunksAt, holderLookup, isAreaLoaded, isWaterAtMethods inherited from interface net.minecraft.world.level.SignalGetter
getBestNeighborSignal, getControlInputSignal, getDirectSignalTo, getSignal, hasNeighborSignal, hasSignal
-
Field Details
-
chunkX
protected int chunkX -
chunkZ
protected int chunkZ -
chunkArray
protected net.minecraft.world.level.chunk.LevelChunk[][] chunkArray -
empty
protected boolean emptyset by !chunk.getAreLevelsEmpty -
world
protected net.minecraft.world.level.Level worldReference to the World object.
-
-
Constructor Details
-
ChunkCache
public ChunkCache(net.minecraft.world.level.Level worldIn, net.minecraft.core.BlockPos posFromIn, net.minecraft.core.BlockPos posToIn)
-
-
Method Details
-
isEmpty
public boolean isEmpty()set by !chunk.getAreLevelsEmpty- Returns:
- if so.
-
getBlockEntity
@Nullable public net.minecraft.world.level.block.entity.BlockEntity getBlockEntity(@NotNull @NotNull net.minecraft.core.BlockPos pos) - Specified by:
getBlockEntityin interfacenet.minecraft.world.level.BlockGetter
-
getTileEntity
@Nullable public net.minecraft.world.level.block.entity.BlockEntity getTileEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.chunk.LevelChunk.EntityCreationType createType) -
getMinBuildHeight
public int getMinBuildHeight()- Specified by:
getMinBuildHeightin interfacenet.minecraft.world.level.LevelHeightAccessor- Specified by:
getMinBuildHeightin interfacenet.minecraft.world.level.LevelReader
-
getMaxBuildHeight
public int getMaxBuildHeight()- Specified by:
getMaxBuildHeightin interfacenet.minecraft.world.level.LevelHeightAccessor
-
getBlockState
@NotNull public @NotNull net.minecraft.world.level.block.state.BlockState getBlockState(net.minecraft.core.BlockPos pos) - Specified by:
getBlockStatein interfacenet.minecraft.world.level.BlockGetter
-
getFluidState
public net.minecraft.world.level.material.FluidState getFluidState(net.minecraft.core.BlockPos pos) - Specified by:
getFluidStatein interfacenet.minecraft.world.level.BlockGetter
-
getUncachedNoiseBiome
public net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> getUncachedNoiseBiome(int x, int y, int z) - Specified by:
getUncachedNoiseBiomein interfacenet.minecraft.world.level.LevelReader
-
isEmptyBlock
public boolean isEmptyBlock(net.minecraft.core.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.- Specified by:
isEmptyBlockin interfacenet.minecraft.world.level.LevelReader
-
getChunk
@Nullable public net.minecraft.world.level.chunk.ChunkAccess getChunk(int x, int z, net.minecraft.world.level.chunk.ChunkStatus requiredStatus, boolean nonnull) - Specified by:
getChunkin interfacenet.minecraft.world.level.LevelReader
-
hasChunk
public boolean hasChunk(int chunkX, int chunkZ) - Specified by:
hasChunkin interfacenet.minecraft.world.level.LevelReader
-
getHeightmapPos
public net.minecraft.core.BlockPos getHeightmapPos(net.minecraft.world.level.levelgen.Heightmap.Types heightmapType, net.minecraft.core.BlockPos pos) - Specified by:
getHeightmapPosin interfacenet.minecraft.world.level.LevelReader
-
getHeight
public int getHeight(net.minecraft.world.level.levelgen.Heightmap.Types heightmapType, int x, int z) - Specified by:
getHeightin interfacenet.minecraft.world.level.LevelReader
-
getSkyDarken
public int getSkyDarken()- Specified by:
getSkyDarkenin interfacenet.minecraft.world.level.LevelReader
-
getBiomeManager
public net.minecraft.world.level.biome.BiomeManager getBiomeManager()- Specified by:
getBiomeManagerin interfacenet.minecraft.world.level.LevelReader
-
getWorldBorder
public net.minecraft.world.level.border.WorldBorder getWorldBorder()- Specified by:
getWorldBorderin interfacenet.minecraft.world.level.CollisionGetter
-
isUnobstructed
public boolean isUnobstructed(@Nullable net.minecraft.world.entity.Entity entityIn, net.minecraft.world.phys.shapes.VoxelShape shape) - Specified by:
isUnobstructedin interfacenet.minecraft.world.level.CollisionGetter
-
getEntityCollisions
public List<net.minecraft.world.phys.shapes.VoxelShape> getEntityCollisions(@Nullable @Nullable net.minecraft.world.entity.Entity p_186427_, net.minecraft.world.phys.AABB p_186428_) - Specified by:
getEntityCollisionsin interfacenet.minecraft.world.level.CollisionGetter
-
getDirectSignal
public int getDirectSignal(net.minecraft.core.BlockPos pos, net.minecraft.core.Direction direction) - Specified by:
getDirectSignalin interfacenet.minecraft.world.level.SignalGetter
-
registryAccess
public net.minecraft.core.RegistryAccess registryAccess()- Specified by:
registryAccessin interfacenet.minecraft.world.level.LevelReader
-
enabledFeatures
public net.minecraft.world.flag.FeatureFlagSet enabledFeatures()- Specified by:
enabledFeaturesin interfacenet.minecraft.world.level.LevelReader
-
isClientSide
public boolean isClientSide()- Specified by:
isClientSidein interfacenet.minecraft.world.level.LevelReader
-
getSeaLevel
public int getSeaLevel()- Specified by:
getSeaLevelin interfacenet.minecraft.world.level.LevelReader
-
dimensionType
@NotNull public @NotNull net.minecraft.world.level.dimension.DimensionType dimensionType()- Specified by:
dimensionTypein interfacenet.minecraft.world.level.LevelReader
-
getShade
public float getShade(net.minecraft.core.Direction direction, boolean b) - Specified by:
getShadein interfacenet.minecraft.world.level.BlockAndTintGetter
-
getLightEngine
public net.minecraft.world.level.lighting.LevelLightEngine getLightEngine()- Specified by:
getLightEnginein interfacenet.minecraft.world.level.BlockAndTintGetter
-