本文整理汇总了Java中net.minecraft.client.renderer.chunk.RenderChunk.setPosition方法的典型用法代码示例。如果您正苦于以下问题:Java RenderChunk.setPosition方法的具体用法?Java RenderChunk.setPosition怎么用?Java RenderChunk.setPosition使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.renderer.chunk.RenderChunk
的用法示例。
在下文中一共展示了RenderChunk.setPosition方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateChunkPositions
import net.minecraft.client.renderer.chunk.RenderChunk; //导入方法依赖的package包/类
public void updateChunkPositions(double viewEntityX, double viewEntityZ)
{
int i = MathHelper.floor(viewEntityX) - 8;
int j = MathHelper.floor(viewEntityZ) - 8;
int k = this.countChunksX * 16;
for (int l = 0; l < this.countChunksX; ++l)
{
int i1 = this.getBaseCoordinate(i, k, l);
for (int j1 = 0; j1 < this.countChunksZ; ++j1)
{
int k1 = this.getBaseCoordinate(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];
renderchunk.setPosition(i1, i2, k1);
}
}
}
}
示例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.getBaseCoordinate(i, k, l);
for (int j1 = 0; j1 < this.countChunksZ; ++j1)
{
int k1 = this.getBaseCoordinate(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];
renderchunk.setPosition(i1, i2, k1);
}
}
}
}
示例3: 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 = new BlockPos(i1, i2, k1);
if (!blockpos.equals(renderchunk.getPosition()))
{
renderchunk.setPosition(blockpos);
}
}
}
}
}
示例4: 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);
}
}
}
}
}
}