Package net.minecraft.world.chunk
Class EmptyChunk
java.lang.Object
net.minecraft.world.chunk.WorldChunk
net.minecraft.world.chunk.EmptyChunk
- All Implemented Interfaces:
BlockView
,Chunk
,StructureHolder
public class EmptyChunk extends WorldChunk
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.chunk.WorldChunk
WorldChunk.CreationType
-
Field Summary
Fields inherited from class net.minecraft.world.chunk.WorldChunk
EMPTY_SECTION
-
Constructor Summary
Constructors Constructor Description EmptyChunk(World world, ChunkPos pos)
-
Method Summary
Modifier and Type Method Description void
addBlockEntity(BlockEntity blockEntity)
void
addEntity(Entity entity)
boolean
areSectionsEmptyBetween(int lowerHeight, int upperHeight)
<T extends Entity>
voidcollectEntitiesByClass(Class<? extends T> entityClass, Box box, List<T> result, Predicate<? super T> predicate)
Collects a list of entities of some runtime type and appends them to the given list.void
collectOtherEntities(Entity except, Box box, List<Entity> entityList, Predicate<? super Entity> predicate)
BlockEntity
getBlockEntity(BlockPos pos, WorldChunk.CreationType creationType)
BlockState
getBlockState(BlockPos pos)
FluidState
getFluidState(BlockPos pos)
ChunkHolder.LevelType
getLevelType()
LightingProvider
getLightingProvider()
int
getLuminance(BlockPos pos)
boolean
isEmpty()
void
markDirty()
void
remove(Entity entity)
void
remove(Entity entity, int section)
void
removeBlockEntity(BlockPos pos)
void
setBlockEntity(BlockPos pos, BlockEntity blockEntity)
BlockState
setBlockState(BlockPos pos, BlockState state, boolean moved)
Methods inherited from class net.minecraft.world.chunk.WorldChunk
addPendingBlockEntityTag, addStructureReference, collectEntities, disableTickSchedulers, enableTickSchedulers, getBiomeArray, getBlockEntities, getBlockEntity, getBlockEntityPositions, getBlockEntityTag, getBlockTickScheduler, getEntitySectionArray, getFluidState, getFluidTickScheduler, getHeightmap, getHeightmaps, getInhabitedTime, getLightSourcesStream, getPackedBlockEntityTag, getPos, getPostProcessingLists, getSectionArray, getStatus, getStructureReferences, getStructureReferences, getStructureStart, getStructureStarts, getUpgradeData, getWorld, isLightOn, loadFromPacket, loadToWorld, needsSaving, runPostProcessing, sampleHeightmap, setHeightmap, setInhabitedTime, setLastSaveTime, setLevelTypeProvider, setLightOn, setLoadedToWorld, setShouldSave, setStructureReferences, setStructureStart, setStructureStarts, setUnsaved
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, getHeight, getMaxLightLevel, method_29546, raycast, raycastBlock
Methods inherited from interface net.minecraft.world.chunk.Chunk
getHighestNonEmptySection, getHighestNonEmptySectionYOffset, markBlockForPostProcessing, markBlockForPostProcessing
-
Field Details
-
BIOMES
-
-
Constructor Details
-
EmptyChunk
-
-
Method Details
-
getBlockState
- Specified by:
getBlockState
in interfaceBlockView
- Overrides:
getBlockState
in classWorldChunk
-
setBlockState
- Specified by:
setBlockState
in interfaceChunk
- Overrides:
setBlockState
in classWorldChunk
-
getFluidState
- Specified by:
getFluidState
in interfaceBlockView
- Overrides:
getFluidState
in classWorldChunk
-
getLightingProvider
- Overrides:
getLightingProvider
in classWorldChunk
-
getLuminance
-
addEntity
- Specified by:
addEntity
in interfaceChunk
- Overrides:
addEntity
in classWorldChunk
-
remove
- Overrides:
remove
in classWorldChunk
-
remove
- Overrides:
remove
in classWorldChunk
-
getBlockEntity
- Overrides:
getBlockEntity
in classWorldChunk
-
addBlockEntity
- Overrides:
addBlockEntity
in classWorldChunk
-
setBlockEntity
- Specified by:
setBlockEntity
in interfaceChunk
- Overrides:
setBlockEntity
in classWorldChunk
-
removeBlockEntity
- Specified by:
removeBlockEntity
in interfaceChunk
- Overrides:
removeBlockEntity
in classWorldChunk
-
markDirty
public void markDirty()- Overrides:
markDirty
in classWorldChunk
-
collectOtherEntities
public void collectOtherEntities(@Nullable Entity except, Box box, List<Entity> entityList, Predicate<? super Entity> predicate)- Overrides:
collectOtherEntities
in classWorldChunk
-
collectEntitiesByClass
public <T extends Entity> void collectEntitiesByClass(Class<? extends T> entityClass, Box box, List<T> result, Predicate<? super T> predicate)Collects a list of entities of some runtime type and appends them to the given list. The runtime class of each collected entity will be the same as or a subclass of the given class.- Overrides:
collectEntitiesByClass
in classWorldChunk
- Parameters:
entityClass
- the class object representing the type collected entities must extendbox
- the box in which to collect entitiesresult
- a list in which to store the collected entitiespredicate
- a predicate which entities must satisfy in order to be collected
-
isEmpty
public boolean isEmpty()- Overrides:
isEmpty
in classWorldChunk
-
areSectionsEmptyBetween
public boolean areSectionsEmptyBetween(int lowerHeight, int upperHeight) -
getLevelType
- Overrides:
getLevelType
in classWorldChunk
-