public class RenderChunk
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
AxisAlignedBB |
boundingBox |
CompiledChunk |
compiledChunk |
static int |
renderChunksUpdated |
Constructor and Description |
---|
RenderChunk(World worldIn,
RenderGlobal renderGlobalIn,
int indexIn) |
Modifier and Type | Method and Description |
---|---|
void |
clearNeedsUpdate() |
protected ChunkCache |
createRegionRenderCache(World world,
BlockPos from,
BlockPos to,
int subtract)
Creates a new RegionRenderCache instance.
Extending classes can change the behavior of the cache, allowing to visually change blocks (schematics etc). |
void |
deleteGlResources() |
protected void |
finishCompileTask() |
BlockPos |
getBlockPosOffset16(EnumFacing facing) |
CompiledChunk |
getCompiledChunk() |
protected double |
getDistanceSq() |
java.util.concurrent.locks.ReentrantLock |
getLockCompileTask() |
BlockPos |
getPosition() |
VertexBuffer |
getVertexBufferByLayer(int layer) |
World |
getWorld() |
ChunkCompileTaskGenerator |
makeCompileTaskChunk() |
ChunkCompileTaskGenerator |
makeCompileTaskTransparency() |
void |
multModelviewMatrix() |
boolean |
needsImmediateUpdate() |
boolean |
needsUpdate() |
void |
rebuildChunk(float x,
float y,
float z,
ChunkCompileTaskGenerator generator) |
void |
resortTransparency(float x,
float y,
float z,
ChunkCompileTaskGenerator generator) |
void |
setCompiledChunk(CompiledChunk compiledChunkIn) |
boolean |
setFrameIndex(int frameIndexIn) |
void |
setNeedsUpdate(boolean immediate) |
void |
setPosition(int x,
int y,
int z) |
void |
stopCompileTask() |
public static int renderChunksUpdated
public CompiledChunk compiledChunk
public AxisAlignedBB boundingBox
public RenderChunk(World worldIn, RenderGlobal renderGlobalIn, int indexIn)
public boolean setFrameIndex(int frameIndexIn)
public VertexBuffer getVertexBufferByLayer(int layer)
public void setPosition(int x, int y, int z)
public void resortTransparency(float x, float y, float z, ChunkCompileTaskGenerator generator)
public void rebuildChunk(float x, float y, float z, ChunkCompileTaskGenerator generator)
protected void finishCompileTask()
public java.util.concurrent.locks.ReentrantLock getLockCompileTask()
public ChunkCompileTaskGenerator makeCompileTaskChunk()
@Nullable public ChunkCompileTaskGenerator makeCompileTaskTransparency()
protected double getDistanceSq()
public void multModelviewMatrix()
public CompiledChunk getCompiledChunk()
public void setCompiledChunk(CompiledChunk compiledChunkIn)
public void stopCompileTask()
public void deleteGlResources()
public BlockPos getPosition()
public void setNeedsUpdate(boolean immediate)
public void clearNeedsUpdate()
public boolean needsUpdate()
public boolean needsImmediateUpdate()
protected ChunkCache createRegionRenderCache(World world, BlockPos from, BlockPos to, int subtract)
world
- The world to cache.from
- The starting position of the chunk minus one on each axis.to
- The ending position of the chunk plus one on each axis.subtract
- Padding used internally by the RegionRenderCache constructor to make
the cache a 20x20x20 cube, for a total of 8000 states in the cache.RegionRenderCache
public BlockPos getBlockPosOffset16(EnumFacing facing)
public World getWorld()