Package net.minecraft.world.chunk
Class Chunk
- All Implemented Interfaces:
IChunk
,IBlockReader
,IStructureReader
,ICapabilityProvider
,IForgeChunk
- Direct Known Subclasses:
EmptyChunk
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate BiomeContainer
private final Map<BlockPos,
TileEntity> private final ChunkPos
static final ChunkSection
private final ClassInheritanceMultiMap<Entity>[]
private Supplier<ChunkHolder.LocationType>
private final Map<Heightmap.Type,
Heightmap> private long
private boolean
private boolean
private long
private final World
private boolean
private static final org.apache.logging.log4j.Logger
private final Map<BlockPos,
CompoundNBT> private final it.unimi.dsi.fastutil.shorts.ShortList[]
private final ChunkSection[]
private final Map<Structure<?>,
StructureStart<?>> private boolean
private final UpgradeData
-
Constructor Summary
ConstructorDescriptionChunk
(World p_i225780_1_, ChunkPos p_i225780_2_, BiomeContainer p_i225780_3_) Chunk
(World p_i225781_1_, ChunkPos p_i225781_2_, BiomeContainer p_i225781_3_, UpgradeData p_i225781_4_, ITickList<Block> p_i225781_5_, ITickList<Fluid> p_i225781_6_, long p_i225781_7_, ChunkSection[] p_i225781_9_, Consumer<Chunk> p_i225781_10_) Chunk
(World p_i49947_1_, ChunkPrimer p_i49947_2_) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addBlockEntity
(TileEntity p_150813_1_) void
void
addReferenceForFeature
(Structure<?> p_230343_1_, long p_230343_2_) private TileEntity
createBlockEntity
(BlockPos p_177422_1_) Map<Structure<?>,
StructureStart<?>> getBlockEntity
(BlockPos p_175625_1_) getBlockEntity
(BlockPos p_177424_1_, Chunk.CreateEntityType p_177424_2_) getBlockEntityNbt
(BlockPos p_201579_1_) getBlockEntityNbtForSaving
(BlockPos p_223134_1_) getBlockState
(BlockPos p_180495_1_) void
getEntities
(Entity p_177414_1_, AxisAlignedBB p_177414_2_, List<Entity> p_177414_3_, Predicate<? super Entity> p_177414_4_) <T extends Entity>
voidgetEntities
(EntityType<?> p_217313_1_, AxisAlignedBB p_217313_2_, List<? super T> p_217313_3_, Predicate<? super T> p_217313_4_) <T extends Entity>
voidgetEntitiesOfClass
(Class<? extends T> p_177430_1_, AxisAlignedBB p_177430_2_, List<T> p_177430_3_, Predicate<? super T> p_177430_4_) getFluidState
(int p_205751_1_, int p_205751_2_, int p_205751_3_) getFluidState
(BlockPos p_204610_1_) int
getHeight
(Heightmap.Type p_201576_1_, int p_201576_2_, int p_201576_3_) long
getLevel()
getOrCreateHeightmapUnprimed
(Heightmap.Type p_217303_1_) getPos()
it.unimi.dsi.fastutil.shorts.ShortList[]
it.unimi.dsi.fastutil.longs.LongSet
getReferencesForFeature
(Structure<?> p_230346_1_) getStartForFeature
(Structure<?> p_230342_1_) boolean
isEmpty()
boolean
boolean
void
void
packTicks
(ServerWorld p_222880_1_) void
private TileEntity
promotePendingBlockEntity
(BlockPos p_212815_1_, CompoundNBT p_212815_2_) final void
Deprecated.void
removeBlockEntity
(BlockPos p_177425_1_) void
removeEntity
(Entity p_76622_1_) void
removeEntity
(Entity p_76608_1_, int p_76608_2_) void
replaceWithPacketData
(BiomeContainer p_227073_1_, PacketBuffer p_227073_2_, CompoundNBT p_227073_3_, int p_227073_4_) void
void
setAllReferences
(Map<Structure<?>, it.unimi.dsi.fastutil.longs.LongSet> p_201606_1_) void
setAllStarts
(Map<Structure<?>, StructureStart<?>> p_201612_1_) void
setBlockEntity
(BlockPos p_177426_1_, TileEntity p_177426_2_) void
setBlockEntityNbt
(CompoundNBT p_201591_1_) setBlockState
(BlockPos p_177436_1_, BlockState p_177436_2_, boolean p_177436_3_) void
setFullStatus
(Supplier<ChunkHolder.LocationType> p_217314_1_) void
setHeightmap
(Heightmap.Type p_201607_1_, long[] p_201607_2_) void
setInhabitedTime
(long p_177415_1_) void
setLastSaveHadEntities
(boolean p_177409_1_) void
setLastSaveTime
(long p_177432_1_) void
setLightCorrect
(boolean p_217305_1_) void
setLoaded
(boolean p_177417_1_) void
setStartForFeature
(Structure<?> p_230344_1_, StructureStart<?> p_230344_2_) void
setUnsaved
(boolean p_177427_1_) void
final CompoundNBT
Deprecated.Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCaps
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.world.IBlockReader
clip, clipWithInteractionOverride, getBlockFloorHeight, getBlockFloorHeight, getBlockStates, getLightEmission, getMaxBuildHeight, getMaxLightLevel
Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability, getCapability
Methods inherited from interface net.minecraft.world.chunk.IChunk
addPackedPostProcess, getHighestSection, getHighestSectionPosition, isYSpaceEmpty, markPosForPostprocessing
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
EMPTY_SECTION
-
sections
-
biomes
-
pendingBlockEntities
-
loaded
private boolean loaded -
level
-
heightmaps
-
upgradeData
-
blockEntities
-
entitySections
-
structureStarts
-
structuresRefences
-
postProcessing
private final it.unimi.dsi.fastutil.shorts.ShortList[] postProcessing -
blockTicks
-
liquidTicks
-
lastSaveHadEntities
private boolean lastSaveHadEntities -
lastSaveTime
private long lastSaveTime -
unsaved
private volatile boolean unsaved -
inhabitedTime
private long inhabitedTime -
fullStatus
-
postLoad
-
chunkPos
-
isLightCorrect
private volatile boolean isLightCorrect
-
-
Constructor Details
-
Chunk
-
Chunk
public Chunk(World p_i225781_1_, ChunkPos p_i225781_2_, BiomeContainer p_i225781_3_, UpgradeData p_i225781_4_, ITickList<Block> p_i225781_5_, ITickList<Fluid> p_i225781_6_, long p_i225781_7_, @Nullable ChunkSection[] p_i225781_9_, @Nullable Consumer<Chunk> p_i225781_10_) -
Chunk
-
-
Method Details
-
getOrCreateHeightmapUnprimed
- Specified by:
getOrCreateHeightmapUnprimed
in interfaceIChunk
-
getBlockEntitiesPos
- Specified by:
getBlockEntitiesPos
in interfaceIChunk
-
getSections
- Specified by:
getSections
in interfaceIChunk
-
getBlockState
- Specified by:
getBlockState
in interfaceIBlockReader
-
getFluidState
- Specified by:
getFluidState
in interfaceIBlockReader
-
getFluidState
-
setBlockState
@Nullable public BlockState setBlockState(BlockPos p_177436_1_, BlockState p_177436_2_, boolean p_177436_3_) - Specified by:
setBlockState
in interfaceIChunk
-
getLightEngine
-
addEntity
-
setHeightmap
- Specified by:
setHeightmap
in interfaceIChunk
-
removeEntity
-
removeEntity
-
getHeight
-
createBlockEntity
-
getBlockEntity
- Specified by:
getBlockEntity
in interfaceIBlockReader
-
getBlockEntity
@Nullable public TileEntity getBlockEntity(BlockPos p_177424_1_, Chunk.CreateEntityType p_177424_2_) -
addBlockEntity
-
setBlockEntity
- Specified by:
setBlockEntity
in interfaceIChunk
-
setBlockEntityNbt
- Specified by:
setBlockEntityNbt
in interfaceIChunk
-
getBlockEntityNbtForSaving
- Specified by:
getBlockEntityNbtForSaving
in interfaceIChunk
-
removeBlockEntity
- Specified by:
removeBlockEntity
in interfaceIChunk
-
runPostLoad
public void runPostLoad() -
markUnsaved
public void markUnsaved() -
getEntities
-
getEntities
public <T extends Entity> void getEntities(@Nullable EntityType<?> p_217313_1_, AxisAlignedBB p_217313_2_, List<? super T> p_217313_3_, Predicate<? super T> p_217313_4_) -
getEntitiesOfClass
public <T extends Entity> void getEntitiesOfClass(Class<? extends T> p_177430_1_, AxisAlignedBB p_177430_2_, List<T> p_177430_3_, @Nullable Predicate<? super T> p_177430_4_) -
isEmpty
public boolean isEmpty() -
getPos
-
replaceWithPacketData
public void replaceWithPacketData(@Nullable BiomeContainer p_227073_1_, PacketBuffer p_227073_2_, CompoundNBT p_227073_3_, int p_227073_4_) -
getBiomes
-
setLoaded
public void setLoaded(boolean p_177417_1_) -
getLevel
-
getHeightmaps
- Specified by:
getHeightmaps
in interfaceIChunk
-
getBlockEntities
-
getEntitySections
-
getBlockEntityNbt
- Specified by:
getBlockEntityNbt
in interfaceIChunk
-
getLights
-
getBlockTicks
- Specified by:
getBlockTicks
in interfaceIChunk
-
getLiquidTicks
- Specified by:
getLiquidTicks
in interfaceIChunk
-
setUnsaved
public void setUnsaved(boolean p_177427_1_) - Specified by:
setUnsaved
in interfaceIChunk
-
isUnsaved
public boolean isUnsaved() -
setLastSaveHadEntities
public void setLastSaveHadEntities(boolean p_177409_1_) -
setLastSaveTime
public void setLastSaveTime(long p_177432_1_) - Specified by:
setLastSaveTime
in interfaceIChunk
-
getStartForFeature
- Specified by:
getStartForFeature
in interfaceIStructureReader
-
setStartForFeature
- Specified by:
setStartForFeature
in interfaceIStructureReader
-
getAllStarts
- Specified by:
getAllStarts
in interfaceIChunk
-
setAllStarts
- Specified by:
setAllStarts
in interfaceIChunk
-
getReferencesForFeature
- Specified by:
getReferencesForFeature
in interfaceIStructureReader
-
addReferenceForFeature
- Specified by:
addReferenceForFeature
in interfaceIStructureReader
-
getAllReferences
- Specified by:
getAllReferences
in interfaceIStructureReader
-
setAllReferences
- Specified by:
setAllReferences
in interfaceIStructureReader
-
getInhabitedTime
public long getInhabitedTime()- Specified by:
getInhabitedTime
in interfaceIChunk
-
setInhabitedTime
public void setInhabitedTime(long p_177415_1_) - Specified by:
setInhabitedTime
in interfaceIChunk
-
postProcessGeneration
public void postProcessGeneration() -
promotePendingBlockEntity
@Nullable private TileEntity promotePendingBlockEntity(BlockPos p_212815_1_, CompoundNBT p_212815_2_) -
getUpgradeData
- Specified by:
getUpgradeData
in interfaceIChunk
-
getPostProcessing
public it.unimi.dsi.fastutil.shorts.ShortList[] getPostProcessing()- Specified by:
getPostProcessing
in interfaceIChunk
-
unpackTicks
public void unpackTicks() -
packTicks
-
getStatus
-
getFullStatus
-
setFullStatus
-
isLightCorrect
public boolean isLightCorrect()- Specified by:
isLightCorrect
in interfaceIChunk
-
setLightCorrect
public void setLightCorrect(boolean p_217305_1_) - Specified by:
setLightCorrect
in interfaceIChunk
-
writeCapsToNBT
Deprecated.FOR INTERNAL USE ONLYOnly public for use in
AnvilChunkLoader
. -
readCapsFromNBT
Deprecated.FOR INTERNAL USE ONLYOnly public for use in
AnvilChunkLoader
. -
getWorldForge
- Specified by:
getWorldForge
in interfaceIChunk
-