本文整理汇总了Java中net.minecraft.client.renderer.chunk.RenderChunk.getPosition方法的典型用法代码示例。如果您正苦于以下问题:Java RenderChunk.getPosition方法的具体用法?Java RenderChunk.getPosition怎么用?Java RenderChunk.getPosition使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.renderer.chunk.RenderChunk
的用法示例。
在下文中一共展示了RenderChunk.getPosition方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateChunkLight
import net.minecraft.client.renderer.chunk.RenderChunk; //导入方法依赖的package包/类
private void updateChunkLight(RenderChunk p_updateChunkLight_1_, Set<BlockPos> p_updateChunkLight_2_, Set<BlockPos> p_updateChunkLight_3_)
{
if (p_updateChunkLight_1_ != null)
{
CompiledChunk compiledchunk = p_updateChunkLight_1_.getCompiledChunk();
if (compiledchunk != null && !compiledchunk.isEmpty())
{
p_updateChunkLight_1_.setNeedsUpdate(true);
}
BlockPos blockpos = p_updateChunkLight_1_.getPosition();
if (p_updateChunkLight_2_ != null)
{
p_updateChunkLight_2_.remove(blockpos);
}
if (p_updateChunkLight_3_ != null)
{
p_updateChunkLight_3_.add(blockpos);
}
}
}
示例2: updateChunkPositions
import net.minecraft.client.renderer.chunk.RenderChunk; //导入方法依赖的package包/类
public void updateChunkPositions(double viewEntityX, double viewEntityZ)
{
int i = MathHelper.floor_double(viewEntityX) - 8;
int j = MathHelper.floor_double(viewEntityZ) - 8;
int k = this.countChunksX * 16;
for (int l = 0; l < this.countChunksX; ++l)
{
int i1 = this.func_178157_a(i, k, l);
for (int j1 = 0; j1 < this.countChunksZ; ++j1)
{
int k1 = this.func_178157_a(j, k, j1);
for (int l1 = 0; l1 < this.countChunksY; ++l1)
{
int i2 = l1 * 16;
RenderChunk renderchunk = this.renderChunks[(j1 * this.countChunksY + l1) * this.countChunksX + l];
BlockPos blockpos = renderchunk.getPosition();
if (blockpos.getX() != i1 || blockpos.getY() != i2 || blockpos.getZ() != k1)
{
BlockPos blockpos1 = new BlockPos(i1, i2, k1);
if (!blockpos1.equals(renderchunk.getPosition()))
{
renderchunk.setPosition(blockpos1);
}
}
}
}
}
}
示例3: isPositionInRenderChunk
import net.minecraft.client.renderer.chunk.RenderChunk; //导入方法依赖的package包/类
private boolean isPositionInRenderChunk(BlockPos pos, RenderChunk renderChunkIn)
{
BlockPos blockpos = renderChunkIn.getPosition();
return MathHelper.abs_int(pos.getX() - blockpos.getX()) > 16 ? false : (MathHelper.abs_int(pos.getY() - blockpos.getY()) > 16 ? false : MathHelper.abs_int(pos.getZ() - blockpos.getZ()) <= 16);
}
示例4: preRenderChunk
import net.minecraft.client.renderer.chunk.RenderChunk; //导入方法依赖的package包/类
public void preRenderChunk(RenderChunk renderChunkIn)
{
BlockPos blockpos = renderChunkIn.getPosition();
GlStateManager.translate((float)((double)blockpos.getX() - this.viewEntityX), (float)((double)blockpos.getY() - this.viewEntityY), (float)((double)blockpos.getZ() - this.viewEntityZ));
}