Package net.minecraft.world.chunk
Class WorldChunk
java.lang.Object
net.minecraft.world.chunk.WorldChunk
- All Implemented Interfaces:
BlockView
,Chunk
,HeightLimitView
,StructureHolder
- Direct Known Subclasses:
EmptyChunk
public class WorldChunk extends Object implements Chunk
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WorldChunk.CreationType
(package private) class
WorldChunk.DirectBlockEntityTickInvoker<T extends BlockEntity>
(package private) static class
WorldChunk.EmptyBlockEntityTickInvoker
(package private) class
WorldChunk.WrappedBlockEntityTickInvoker
-
Field Summary
-
Constructor Summary
Constructors Constructor Description WorldChunk(ServerWorld serverWorld, ProtoChunk protoChunk, Consumer<WorldChunk> consumer)
WorldChunk(World world, ChunkPos pos, BiomeArray biomes)
WorldChunk(World world, ChunkPos pos, BiomeArray biomes, UpgradeData upgradeData, TickScheduler<Block> blockTickScheduler, TickScheduler<Fluid> fluidTickScheduler, long inhabitedTime, ChunkSection[] sections, Consumer<WorldChunk> loadToWorldConsumer)
-
Method Summary
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.BlockView
getDismountHeight, getDismountHeight, getLuminance, getMaxLightLevel, getStatesInBox, raycast, raycast, raycastBlock
Methods inherited from interface net.minecraft.world.chunk.Chunk
areSectionsEmptyBetween, getHighestNonEmptySection, getHighestNonEmptySectionYOffset, markBlockForPostProcessing, markBlockForPostProcessing
Methods inherited from interface net.minecraft.world.HeightLimitView
getSection, getSectionIndex, getSectionIndexFromSection, getTopHeightLimit, getTopSectionLimit, isOutOfHeightLimit, isOutOfHeightLimit, method_32890, method_32891
-
Field Details
-
LOGGER
-
EMPTY_BLOCK_ENTITY_TICKER
-
EMPTY_SECTION
-
sections
-
biomeArray
-
pendingBlockEntityTags
-
blockEntityTickers
-
loadedToWorld
private boolean loadedToWorld -
world
-
heightmaps
-
upgradeData
-
blockEntities
-
structureStarts
-
structureReferences
-
postProcessingLists
-
blockTickScheduler
-
fluidTickScheduler
-
shouldSave
private volatile boolean shouldSave -
inhabitedTime
private long inhabitedTime -
levelTypeProvider
-
loadToWorldConsumer
-
pos
-
lightOn
private volatile boolean lightOn -
field_28129
-
-
Constructor Details
-
WorldChunk
-
WorldChunk
public WorldChunk(World world, ChunkPos pos, BiomeArray biomes, UpgradeData upgradeData, TickScheduler<Block> blockTickScheduler, TickScheduler<Fluid> fluidTickScheduler, long inhabitedTime, @Nullable ChunkSection[] sections, @Nullable Consumer<WorldChunk> loadToWorldConsumer) -
WorldChunk
public WorldChunk(ServerWorld serverWorld, ProtoChunk protoChunk, @Nullable Consumer<WorldChunk> consumer)
-
-
Method Details
-
method_32914
- Specified by:
method_32914
in interfaceChunk
-
getHeightmap
- Specified by:
getHeightmap
in interfaceChunk
-
getBlockEntityPositions
- Specified by:
getBlockEntityPositions
in interfaceChunk
-
getSectionArray
- Specified by:
getSectionArray
in interfaceChunk
-
getBlockState
- Specified by:
getBlockState
in interfaceBlockView
-
getFluidState
- Specified by:
getFluidState
in interfaceBlockView
-
getFluidState
-
setBlockState
- Specified by:
setBlockState
in interfaceChunk
-
addEntity
Deprecated. -
setHeightmap
- Specified by:
setHeightmap
in interfaceChunk
-
sampleHeightmap
- Specified by:
sampleHeightmap
in interfaceChunk
-
createBlockEntity
-
getBlockEntity
- Specified by:
getBlockEntity
in interfaceBlockView
-
getBlockEntity
-
addBlockEntity
-
canTickBlockEntities
private boolean canTickBlockEntities() -
canTickBlockEntity
-
setBlockEntity
- Specified by:
setBlockEntity
in interfaceChunk
-
addPendingBlockEntityTag
- Specified by:
addPendingBlockEntityTag
in interfaceChunk
-
getPackedBlockEntityTag
- Specified by:
getPackedBlockEntityTag
in interfaceChunk
-
removeBlockEntity
- Specified by:
removeBlockEntity
in interfaceChunk
-
method_32918
-
removeBlockEntityTicker
-
loadToWorld
public void loadToWorld() -
markDirty
public void markDirty() -
isEmpty
public boolean isEmpty() -
getPos
-
loadFromPacket
@Environment(CLIENT) public void loadFromPacket(@Nullable BiomeArray biomes, PacketByteBuf buf, CompoundTag tag, int verticalStripBitmask) -
removeBlockEntity
-
method_31717
-
getBiomeArray
- Specified by:
getBiomeArray
in interfaceChunk
-
setLoadedToWorld
public void setLoadedToWorld(boolean loaded) -
getWorld
-
getHeightmaps
- Specified by:
getHeightmaps
in interfaceChunk
-
getBlockEntities
-
getBlockEntityTag
- Specified by:
getBlockEntityTag
in interfaceChunk
-
getLightSourcesStream
- Specified by:
getLightSourcesStream
in interfaceChunk
-
getBlockTickScheduler
- Specified by:
getBlockTickScheduler
in interfaceChunk
-
getFluidTickScheduler
- Specified by:
getFluidTickScheduler
in interfaceChunk
-
setShouldSave
public void setShouldSave(boolean shouldSave)- Specified by:
setShouldSave
in interfaceChunk
-
needsSaving
public boolean needsSaving()- Specified by:
needsSaving
in interfaceChunk
-
getStructureStart
- Specified by:
getStructureStart
in interfaceStructureHolder
-
setStructureStart
- Specified by:
setStructureStart
in interfaceStructureHolder
-
getStructureStarts
- Specified by:
getStructureStarts
in interfaceChunk
-
setStructureStarts
- Specified by:
setStructureStarts
in interfaceChunk
-
getStructureReferences
- Specified by:
getStructureReferences
in interfaceStructureHolder
-
addStructureReference
- Specified by:
addStructureReference
in interfaceStructureHolder
-
getStructureReferences
- Specified by:
getStructureReferences
in interfaceStructureHolder
-
setStructureReferences
- Specified by:
setStructureReferences
in interfaceStructureHolder
-
getInhabitedTime
public long getInhabitedTime()- Specified by:
getInhabitedTime
in interfaceChunk
-
setInhabitedTime
public void setInhabitedTime(long inhabitedTime)- Specified by:
setInhabitedTime
in interfaceChunk
-
runPostProcessing
public void runPostProcessing() -
loadBlockEntity
-
getUpgradeData
- Specified by:
getUpgradeData
in interfaceChunk
-
getPostProcessingLists
- Specified by:
getPostProcessingLists
in interfaceChunk
-
disableTickSchedulers
public void disableTickSchedulers() -
enableTickSchedulers
-
getSectionCount
public int getSectionCount()- Specified by:
getSectionCount
in interfaceHeightLimitView
-
getBottomSectionLimit
public int getBottomSectionLimit()- Specified by:
getBottomSectionLimit
in interfaceHeightLimitView
-
getStatus
-
getLevelType
-
setLevelTypeProvider
-
isLightOn
public boolean isLightOn() -
setLightOn
public void setLightOn(boolean lightOn)- Specified by:
setLightOn
in interfaceChunk
-
removeAllBlockEntities
public void removeAllBlockEntities() -
updateAllBlockEntityTickers
public void updateAllBlockEntityTickers() -
method_32919
-
updateTicker
-
wrapTicker
private <T extends BlockEntity> BlockEntityTickInvoker wrapTicker(T t, BlockEntityTicker<T> blockEntityTicker)
-