public class ChunkPrimer extends java.lang.Object implements IChunk
Modifier and Type | Field and Description |
---|---|
private BiomeContainer |
biomes |
private java.util.Map<GenerationStage.Carving,java.util.BitSet> |
carvingMasks |
private java.util.Map<BlockPos,CompoundNBT> |
deferredTileEntities |
private java.util.List<CompoundNBT> |
entities |
private WorldLightManager |
field_217334_e |
private boolean |
hasLight |
private java.util.Map<Heightmap.Type,Heightmap> |
heightmaps |
private long |
inhabitedTime |
private java.util.List<BlockPos> |
lightPositions |
private static org.apache.logging.log4j.Logger |
LOGGER |
private boolean |
modified |
private it.unimi.dsi.fastutil.shorts.ShortList[] |
packedPositions |
private ChunkPrimerTickList<Block> |
pendingBlockTicks |
private ChunkPrimerTickList<Fluid> |
pendingFluidTicks |
private ChunkPos |
pos |
private ChunkSection[] |
sections |
private ChunkStatus |
status |
private java.util.Map<java.lang.String,it.unimi.dsi.fastutil.longs.LongSet> |
structureReferenceMap |
private java.util.Map<java.lang.String,StructureStart> |
structureStartMap |
private java.util.Map<BlockPos,TileEntity> |
tileEntities |
private UpgradeData |
upgradeData |
Constructor and Description |
---|
ChunkPrimer(ChunkPos p_i48700_1_,
UpgradeData data) |
ChunkPrimer(ChunkPos p_i49941_1_,
UpgradeData p_i49941_2_,
ChunkSection[] p_i49941_3_,
ChunkPrimerTickList<Block> p_i49941_4_,
ChunkPrimerTickList<Fluid> p_i49941_5_) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLastExtendedBlockStorage, getList, getTopFilledSegment, getWorldForge, isEmptyBetween
func_217300_a, getHeight, getLightValue, getMaxLightLevel, rayTraceBlocks, rayTraceBlocks
private static final org.apache.logging.log4j.Logger LOGGER
private final ChunkPos pos
private volatile boolean modified
@Nullable private BiomeContainer biomes
@Nullable private volatile WorldLightManager field_217334_e
private final java.util.Map<Heightmap.Type,Heightmap> heightmaps
private volatile ChunkStatus status
private final java.util.Map<BlockPos,TileEntity> tileEntities
private final java.util.Map<BlockPos,CompoundNBT> deferredTileEntities
private final ChunkSection[] sections
private final java.util.List<CompoundNBT> entities
private final java.util.List<BlockPos> lightPositions
private final it.unimi.dsi.fastutil.shorts.ShortList[] packedPositions
private final java.util.Map<java.lang.String,StructureStart> structureStartMap
private final java.util.Map<java.lang.String,it.unimi.dsi.fastutil.longs.LongSet> structureReferenceMap
private final UpgradeData upgradeData
private final ChunkPrimerTickList<Block> pendingBlockTicks
private final ChunkPrimerTickList<Fluid> pendingFluidTicks
private long inhabitedTime
private final java.util.Map<GenerationStage.Carving,java.util.BitSet> carvingMasks
private volatile boolean hasLight
public ChunkPrimer(ChunkPos p_i48700_1_, UpgradeData data)
public ChunkPrimer(ChunkPos p_i49941_1_, UpgradeData p_i49941_2_, @Nullable ChunkSection[] p_i49941_3_, ChunkPrimerTickList<Block> p_i49941_4_, ChunkPrimerTickList<Fluid> p_i49941_5_)
public BlockState getBlockState(BlockPos pos)
getBlockState
in interface IBlockReader
public IFluidState getFluidState(BlockPos pos)
getFluidState
in interface IBlockReader
public java.util.stream.Stream<BlockPos> getLightSources()
getLightSources
in interface IChunk
public it.unimi.dsi.fastutil.shorts.ShortList[] getPackedLightPositions()
public void addLightValue(short packedPosition, int lightValue)
public void addLightPosition(BlockPos lightPos)
@Nullable public BlockState setBlockState(BlockPos pos, BlockState state, boolean isMoving)
setBlockState
in interface IChunk
public ChunkSection getSection(int p_217332_1_)
public void addTileEntity(BlockPos pos, TileEntity tileEntityIn)
addTileEntity
in interface IChunk
public java.util.Set<BlockPos> getTileEntitiesPos()
getTileEntitiesPos
in interface IChunk
@Nullable public TileEntity getTileEntity(BlockPos pos)
getTileEntity
in interface IBlockReader
public java.util.Map<BlockPos,TileEntity> getTileEntities()
public void addEntity(CompoundNBT entityCompound)
public java.util.List<CompoundNBT> getEntities()
public void func_225548_a_(BiomeContainer p_225548_1_)
@Nullable public BiomeContainer getBiomes()
public void setModified(boolean modified)
setModified
in interface IChunk
public boolean isModified()
isModified
in interface IChunk
public ChunkStatus getStatus()
public void setStatus(ChunkStatus status)
public ChunkSection[] getSections()
getSections
in interface IChunk
@Nullable public WorldLightManager getWorldLightManager()
public java.util.Collection<java.util.Map.Entry<Heightmap.Type,Heightmap>> getHeightmaps()
getHeightmaps
in interface IChunk
public void setHeightmap(Heightmap.Type type, long[] data)
setHeightmap
in interface IChunk
public Heightmap getHeightmap(Heightmap.Type typeIn)
getHeightmap
in interface IChunk
public int getTopBlockY(Heightmap.Type heightmapType, int x, int z)
getTopBlockY
in interface IChunk
public void setLastSaveTime(long saveTime)
setLastSaveTime
in interface IChunk
@Nullable public StructureStart getStructureStart(java.lang.String stucture)
getStructureStart
in interface IStructureReader
public void putStructureStart(java.lang.String structureIn, StructureStart structureStartIn)
putStructureStart
in interface IStructureReader
public java.util.Map<java.lang.String,StructureStart> getStructureStarts()
getStructureStarts
in interface IChunk
public void setStructureStarts(java.util.Map<java.lang.String,StructureStart> structureStartsIn)
setStructureStarts
in interface IChunk
public it.unimi.dsi.fastutil.longs.LongSet getStructureReferences(java.lang.String structureIn)
getStructureReferences
in interface IStructureReader
public void addStructureReference(java.lang.String strucutre, long reference)
addStructureReference
in interface IStructureReader
public java.util.Map<java.lang.String,it.unimi.dsi.fastutil.longs.LongSet> getStructureReferences()
getStructureReferences
in interface IStructureReader
public void setStructureReferences(java.util.Map<java.lang.String,it.unimi.dsi.fastutil.longs.LongSet> p_201606_1_)
setStructureReferences
in interface IStructureReader
public static short packToLocal(BlockPos p_201651_0_)
public static BlockPos unpackToWorld(short packedPos, int yOffset, ChunkPos chunkPosIn)
public void markBlockForPostprocessing(BlockPos pos)
markBlockForPostprocessing
in interface IChunk
public it.unimi.dsi.fastutil.shorts.ShortList[] getPackedPositions()
getPackedPositions
in interface IChunk
public void func_201636_b(short packedPosition, int index)
func_201636_b
in interface IChunk
public ChunkPrimerTickList<Block> getBlocksToBeTicked()
getBlocksToBeTicked
in interface IChunk
public ChunkPrimerTickList<Fluid> getFluidsToBeTicked()
getFluidsToBeTicked
in interface IChunk
public UpgradeData getUpgradeData()
getUpgradeData
in interface IChunk
public void setInhabitedTime(long newInhabitedTime)
setInhabitedTime
in interface IChunk
public long getInhabitedTime()
getInhabitedTime
in interface IChunk
public void addTileEntity(CompoundNBT nbt)
addTileEntity
in interface IChunk
public java.util.Map<BlockPos,CompoundNBT> getDeferredTileEntities()
public CompoundNBT getDeferredTileEntity(BlockPos pos)
getDeferredTileEntity
in interface IChunk
@Nullable public CompoundNBT getTileEntityNBT(BlockPos pos)
getTileEntityNBT
in interface IChunk
public void removeTileEntity(BlockPos pos)
removeTileEntity
in interface IChunk
public java.util.BitSet getCarvingMask(GenerationStage.Carving type)
getCarvingMask
in interface IChunk
public void setCarvingMask(GenerationStage.Carving type, java.util.BitSet mask)
public void setLightManager(WorldLightManager p_217306_1_)