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 classWorldChunk.CreationType(package private) classWorldChunk.DirectBlockEntityTickInvoker<T extends BlockEntity>(package private) static classWorldChunk.EmptyBlockEntityTickInvoker(package private) classWorldChunk.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, waitMethods inherited from interface net.minecraft.world.BlockView
getDismountHeight, getDismountHeight, getLuminance, getMaxLightLevel, method_29546, raycast, raycastBlockMethods inherited from interface net.minecraft.world.chunk.Chunk
areSectionsEmptyBetween, getHighestNonEmptySection, getHighestNonEmptySectionYOffset, markBlockForPostProcessing, markBlockForPostProcessingMethods inherited from interface net.minecraft.world.HeightLimitView
getBottomHeightLimit, getHeight, getSection, getSectionIndex, getSectionIndexFromSection, getTopHeightLimit, getTopSectionLimit, isOutOfHeightLimit, isOutOfHeightLimit
-
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
-
-
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
-
getHeightmap
- Specified by:
getHeightmapin interfaceChunk
-
getBlockEntityPositions
- Specified by:
getBlockEntityPositionsin interfaceChunk
-
getSectionArray
- Specified by:
getSectionArrayin interfaceChunk
-
getBlockState
- Specified by:
getBlockStatein interfaceBlockView
-
getFluidState
- Specified by:
getFluidStatein interfaceBlockView
-
getFluidState
-
setBlockState
- Specified by:
setBlockStatein interfaceChunk
-
getLightingProvider
-
addEntity
Deprecated. -
setHeightmap
- Specified by:
setHeightmapin interfaceChunk
-
sampleHeightmap
- Specified by:
sampleHeightmapin interfaceChunk
-
createBlockEntity
-
getBlockEntity
- Specified by:
getBlockEntityin interfaceBlockView
-
getBlockEntity
-
addBlockEntity
-
canTickBlockEntities
private boolean canTickBlockEntities() -
canTickBlockEntity
-
setBlockEntity
- Specified by:
setBlockEntityin interfaceChunk
-
addPendingBlockEntityTag
- Specified by:
addPendingBlockEntityTagin interfaceChunk
-
getPackedBlockEntityTag
- Specified by:
getPackedBlockEntityTagin interfaceChunk
-
removeBlockEntity
- Specified by:
removeBlockEntityin interfaceChunk
-
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) -
method_31722
-
method_31717
-
getBiomeArray
- Specified by:
getBiomeArrayin interfaceChunk
-
setLoadedToWorld
public void setLoadedToWorld(boolean loaded) -
getWorld
-
getHeightmaps
- Specified by:
getHeightmapsin interfaceChunk
-
getBlockEntities
-
getBlockEntityTag
- Specified by:
getBlockEntityTagin interfaceChunk
-
getLightSourcesStream
- Specified by:
getLightSourcesStreamin interfaceChunk
-
getBlockTickScheduler
- Specified by:
getBlockTickSchedulerin interfaceChunk
-
getFluidTickScheduler
- Specified by:
getFluidTickSchedulerin interfaceChunk
-
setShouldSave
public void setShouldSave(boolean shouldSave)- Specified by:
setShouldSavein interfaceChunk
-
needsSaving
public boolean needsSaving()- Specified by:
needsSavingin interfaceChunk
-
getStructureStart
- Specified by:
getStructureStartin interfaceStructureHolder
-
setStructureStart
- Specified by:
setStructureStartin interfaceStructureHolder
-
getStructureStarts
- Specified by:
getStructureStartsin interfaceChunk
-
setStructureStarts
- Specified by:
setStructureStartsin interfaceChunk
-
getStructureReferences
- Specified by:
getStructureReferencesin interfaceStructureHolder
-
addStructureReference
- Specified by:
addStructureReferencein interfaceStructureHolder
-
getStructureReferences
- Specified by:
getStructureReferencesin interfaceStructureHolder
-
setStructureReferences
- Specified by:
setStructureReferencesin interfaceStructureHolder
-
getInhabitedTime
public long getInhabitedTime()- Specified by:
getInhabitedTimein interfaceChunk
-
setInhabitedTime
public void setInhabitedTime(long inhabitedTime)- Specified by:
setInhabitedTimein interfaceChunk
-
runPostProcessing
public void runPostProcessing() -
loadBlockEntity
-
getUpgradeData
- Specified by:
getUpgradeDatain interfaceChunk
-
getPostProcessingLists
- Specified by:
getPostProcessingListsin interfaceChunk
-
disableTickSchedulers
public void disableTickSchedulers() -
enableTickSchedulers
-
getSectionCount
public int getSectionCount()- Specified by:
getSectionCountin interfaceHeightLimitView
-
getBottomSectionLimit
public int getBottomSectionLimit()- Specified by:
getBottomSectionLimitin interfaceHeightLimitView
-
getStatus
-
getLevelType
-
setLevelTypeProvider
-
isLightOn
public boolean isLightOn() -
setLightOn
public void setLightOn(boolean lightOn)- Specified by:
setLightOnin interfaceChunk
-
method_31712
public void method_31712() -
updateAllBlockEntityTickers
public void updateAllBlockEntityTickers() -
updateTicker
-
wrapTicker
private <T extends BlockEntity> BlockEntityTickInvoker wrapTicker(T t, BlockEntityTicker<T> blockEntityTicker)
-