public class ReadOnlyChunk extends ProtoChunk
Modifier and Type | Field and Description |
---|---|
private WorldChunk |
wrapped |
Constructor and Description |
---|
ReadOnlyChunk(WorldChunk wrapped) |
addEntity, addLightSource, addLightSource, getBlockEntities, getBlockEntityPositions, getBlockEntityTags, getEntities, getHeightmap, getHeightmaps, getInhabitedTime, getLightSourcesBySection, getPackedSectionRelative, getPostProcessingLists, getSection, getUpgradeData, joinBlockPos, markBlockForPostProcessing, setCarvingMask, setInhabitedTime, setLightingProvider
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
areSectionsEmptyBetween, getHighestNonEmptySection, getHighestNonEmptySectionYOffset, getList
getDismountHeight, getDismountHeight, getHeight, getLuminance, method_29546, raycast, raycast, raycastBlock
private final WorldChunk wrapped
public ReadOnlyChunk(WorldChunk wrapped)
@Nullable public BlockEntity getBlockEntity(BlockPos pos)
getBlockEntity
in interface BlockView
getBlockEntity
in class ProtoChunk
@Nullable public BlockState getBlockState(BlockPos pos)
getBlockState
in interface BlockView
getBlockState
in class ProtoChunk
public FluidState getFluidState(BlockPos pos)
getFluidState
in interface BlockView
getFluidState
in class ProtoChunk
public int getMaxLightLevel()
@Nullable public BlockState setBlockState(BlockPos pos, BlockState state, boolean moved)
setBlockState
in interface Chunk
setBlockState
in class ProtoChunk
public void setBlockEntity(BlockPos pos, BlockEntity blockEntity)
setBlockEntity
in interface Chunk
setBlockEntity
in class ProtoChunk
public void addEntity(Entity entity)
addEntity
in interface Chunk
addEntity
in class ProtoChunk
public void setStatus(ChunkStatus status)
setStatus
in class ProtoChunk
public ChunkSection[] getSectionArray()
getSectionArray
in interface Chunk
getSectionArray
in class ProtoChunk
@Nullable public LightingProvider getLightingProvider()
getLightingProvider
in class ProtoChunk
public void setHeightmap(Heightmap.Type type, long[] heightmap)
setHeightmap
in interface Chunk
setHeightmap
in class ProtoChunk
private Heightmap.Type transformHeightmapType(Heightmap.Type type)
public int sampleHeightmap(Heightmap.Type type, int x, int z)
sampleHeightmap
in interface Chunk
sampleHeightmap
in class ProtoChunk
public ChunkPos getPos()
getPos
in interface Chunk
getPos
in class ProtoChunk
public void setLastSaveTime(long lastSaveTime)
setLastSaveTime
in interface Chunk
setLastSaveTime
in class ProtoChunk
@Nullable public StructureStart<?> getStructureStart(StructureFeature<?> structure)
getStructureStart
in interface StructureHolder
getStructureStart
in class ProtoChunk
public void setStructureStart(StructureFeature<?> structure, StructureStart<?> start)
setStructureStart
in interface StructureHolder
setStructureStart
in class ProtoChunk
public Map<StructureFeature<?>,StructureStart<?>> getStructureStarts()
getStructureStarts
in interface Chunk
getStructureStarts
in class ProtoChunk
public void setStructureStarts(Map<StructureFeature<?>,StructureStart<?>> structureStarts)
setStructureStarts
in interface Chunk
setStructureStarts
in class ProtoChunk
public it.unimi.dsi.fastutil.longs.LongSet getStructureReferences(StructureFeature<?> structure)
getStructureReferences
in interface StructureHolder
getStructureReferences
in class ProtoChunk
public void addStructureReference(StructureFeature<?> structure, long reference)
addStructureReference
in interface StructureHolder
addStructureReference
in class ProtoChunk
public Map<StructureFeature<?>,it.unimi.dsi.fastutil.longs.LongSet> getStructureReferences()
getStructureReferences
in interface StructureHolder
getStructureReferences
in class ProtoChunk
public void setStructureReferences(Map<StructureFeature<?>,it.unimi.dsi.fastutil.longs.LongSet> structureReferences)
setStructureReferences
in interface StructureHolder
setStructureReferences
in class ProtoChunk
public BiomeArray getBiomeArray()
getBiomeArray
in interface Chunk
getBiomeArray
in class ProtoChunk
public void setShouldSave(boolean shouldSave)
setShouldSave
in interface Chunk
setShouldSave
in class ProtoChunk
public boolean needsSaving()
needsSaving
in interface Chunk
needsSaving
in class ProtoChunk
public ChunkStatus getStatus()
getStatus
in interface Chunk
getStatus
in class ProtoChunk
public void removeBlockEntity(BlockPos pos)
removeBlockEntity
in interface Chunk
removeBlockEntity
in class ProtoChunk
public void markBlockForPostProcessing(BlockPos pos)
markBlockForPostProcessing
in interface Chunk
markBlockForPostProcessing
in class ProtoChunk
public void addPendingBlockEntityTag(CompoundTag tag)
addPendingBlockEntityTag
in interface Chunk
addPendingBlockEntityTag
in class ProtoChunk
@Nullable public CompoundTag getBlockEntityTag(BlockPos pos)
getBlockEntityTag
in interface Chunk
getBlockEntityTag
in class ProtoChunk
@Nullable public CompoundTag getPackedBlockEntityTag(BlockPos pos)
getPackedBlockEntityTag
in interface Chunk
getPackedBlockEntityTag
in class ProtoChunk
public void setBiomes(BiomeArray biomes)
setBiomes
in class ProtoChunk
public Stream<BlockPos> getLightSourcesStream()
getLightSourcesStream
in interface Chunk
getLightSourcesStream
in class ProtoChunk
public ChunkTickScheduler<Block> getBlockTickScheduler()
getBlockTickScheduler
in interface Chunk
getBlockTickScheduler
in class ProtoChunk
public ChunkTickScheduler<Fluid> getFluidTickScheduler()
getFluidTickScheduler
in interface Chunk
getFluidTickScheduler
in class ProtoChunk
public BitSet getCarvingMask(GenerationStep.Carver carver)
getCarvingMask
in class ProtoChunk
public BitSet getOrCreateCarvingMask(GenerationStep.Carver carver)
getOrCreateCarvingMask
in class ProtoChunk
public WorldChunk getWrappedChunk()
public boolean isLightOn()
isLightOn
in interface Chunk
isLightOn
in class ProtoChunk
public void setLightOn(boolean lightOn)
setLightOn
in interface Chunk
setLightOn
in class ProtoChunk