Class LevelChunkSection
java.lang.Object
net.minecraft.world.level.chunk.LevelChunkSection
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprivate PalettedContainerRO<Holder<Biome>> private shortstatic final intstatic final intstatic final intprivate final PalettedContainer<BlockState> private shortprivate short -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateLevelChunkSection(LevelChunkSection source) LevelChunkSection(PalettedContainer<BlockState> states, PalettedContainerRO<Holder<Biome>> biomes) LevelChunkSection(PalettedContainerFactory containerFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoidacquire()copy()voidfillBiomesFromNoise(BiomeResolver biomeResolver, Climate.Sampler sampler, int quartMinX, int quartMinY, int quartMinZ) getBlockState(int sectionX, int sectionY, int sectionZ) getFluidState(int sectionX, int sectionY, int sectionZ) getNoiseBiome(int quartX, int quartY, int quartZ) intbooleanbooleanbooleanbooleanbooleanmaybeHas(Predicate<BlockState> predicate) voidread(FriendlyByteBuf buffer) voidreadBiomes(FriendlyByteBuf buffer) voidvoidrelease()setBlockState(int sectionX, int sectionY, int sectionZ, BlockState state) setBlockState(int sectionX, int sectionY, int sectionZ, BlockState state, boolean checkThreading) voidwrite(FriendlyByteBuf buffer)
-
Field Details
-
SECTION_WIDTH
public static final int SECTION_WIDTH- See Also:
-
SECTION_HEIGHT
public static final int SECTION_HEIGHT- See Also:
-
SECTION_SIZE
public static final int SECTION_SIZE- See Also:
-
BIOME_CONTAINER_BITS
public static final int BIOME_CONTAINER_BITS- See Also:
-
nonEmptyBlockCount
private short nonEmptyBlockCount -
tickingBlockCount
private short tickingBlockCount -
tickingFluidCount
private short tickingFluidCount -
states
-
biomes
-
-
Constructor Details
-
LevelChunkSection
-
LevelChunkSection
public LevelChunkSection(PalettedContainer<BlockState> states, PalettedContainerRO<Holder<Biome>> biomes) -
LevelChunkSection
-
-
Method Details
-
getBlockState
-
getFluidState
-
acquire
public void acquire() -
release
public void release() -
setBlockState
-
setBlockState
public BlockState setBlockState(int sectionX, int sectionY, int sectionZ, BlockState state, boolean checkThreading) -
hasOnlyAir
public boolean hasOnlyAir() -
isRandomlyTicking
public boolean isRandomlyTicking() -
isRandomlyTickingBlocks
public boolean isRandomlyTickingBlocks() -
isRandomlyTickingFluids
public boolean isRandomlyTickingFluids() -
recalcBlockCounts
public void recalcBlockCounts() -
getStates
-
getBiomes
-
read
-
readBiomes
-
write
-
getSerializedSize
public int getSerializedSize() -
maybeHas
- Returns:
trueif this section has any states matching the given predicate. As the internal representation uses aPalette, this is more efficient than looping through every position in the section, or indeed the chunk.
-
getNoiseBiome
-
fillBiomesFromNoise
public void fillBiomesFromNoise(BiomeResolver biomeResolver, Climate.Sampler sampler, int quartMinX, int quartMinY, int quartMinZ) -
copy
-