本文整理汇总了Java中net.minecraft.client.renderer.chunk.RenderChunk.setNeedsUpdate方法的典型用法代码示例。如果您正苦于以下问题:Java RenderChunk.setNeedsUpdate方法的具体用法?Java RenderChunk.setNeedsUpdate怎么用?Java RenderChunk.setNeedsUpdate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.renderer.chunk.RenderChunk
的用法示例。
在下文中一共展示了RenderChunk.setNeedsUpdate方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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(false);
}
BlockPos blockpos = p_updateChunkLight_1_.getPosition().toImmutable();
if (p_updateChunkLight_2_ != null)
{
p_updateChunkLight_2_.remove(blockpos);
}
if (p_updateChunkLight_3_ != null)
{
p_updateChunkLight_3_.add(blockpos);
}
}
}
示例3: updateChunks
import net.minecraft.client.renderer.chunk.RenderChunk; //导入方法依赖的package包/类
public void updateChunks(long finishTimeNano)
{
this.displayListEntitiesDirty |= this.renderDispatcher.runChunkUploads(finishTimeNano);
if (!this.chunksToUpdate.isEmpty())
{
Iterator<RenderChunk> iterator = this.chunksToUpdate.iterator();
while (iterator.hasNext())
{
RenderChunk renderchunk = (RenderChunk)iterator.next();
if (!this.renderDispatcher.updateChunkLater(renderchunk))
{
break;
}
renderchunk.setNeedsUpdate(false);
iterator.remove();
long i = finishTimeNano - System.nanoTime();
if (i < 0L)
{
break;
}
}
}
}
示例4: markBlocksForUpdate
import net.minecraft.client.renderer.chunk.RenderChunk; //导入方法依赖的package包/类
public void markBlocksForUpdate(int fromX, int fromY, int fromZ, int toX, int toY, int toZ)
{
int i = MathHelper.bucketInt(fromX, 16);
int j = MathHelper.bucketInt(fromY, 16);
int k = MathHelper.bucketInt(fromZ, 16);
int l = MathHelper.bucketInt(toX, 16);
int i1 = MathHelper.bucketInt(toY, 16);
int j1 = MathHelper.bucketInt(toZ, 16);
for (int k1 = i; k1 <= l; ++k1)
{
int l1 = k1 % this.countChunksX;
if (l1 < 0)
{
l1 += this.countChunksX;
}
for (int i2 = j; i2 <= i1; ++i2)
{
int j2 = i2 % this.countChunksY;
if (j2 < 0)
{
j2 += this.countChunksY;
}
for (int k2 = k; k2 <= j1; ++k2)
{
int l2 = k2 % this.countChunksZ;
if (l2 < 0)
{
l2 += this.countChunksZ;
}
int i3 = (l2 * this.countChunksY + j2) * this.countChunksX + l1;
RenderChunk renderchunk = this.renderChunks[i3];
renderchunk.setNeedsUpdate(true);
}
}
}
}
示例5: updateChunks
import net.minecraft.client.renderer.chunk.RenderChunk; //导入方法依赖的package包/类
public void updateChunks(long finishTimeNano)
{
finishTimeNano = (long)((double)finishTimeNano + 1.0E8D);
this.displayListEntitiesDirty |= this.renderDispatcher.runChunkUploads(finishTimeNano);
if (this.chunksToUpdateForced.size() > 0)
{
Iterator iterator = this.chunksToUpdateForced.iterator();
while (iterator.hasNext())
{
RenderChunk renderchunk = (RenderChunk)iterator.next();
if (!this.renderDispatcher.updateChunkLater(renderchunk))
{
break;
}
renderchunk.setNeedsUpdate(false);
iterator.remove();
this.chunksToUpdate.remove(renderchunk);
this.chunksToResortTransparency.remove(renderchunk);
}
}
if (this.chunksToResortTransparency.size() > 0)
{
Iterator iterator2 = this.chunksToResortTransparency.iterator();
if (iterator2.hasNext())
{
RenderChunk renderchunk2 = (RenderChunk)iterator2.next();
if (this.renderDispatcher.updateTransparencyLater(renderchunk2))
{
iterator2.remove();
}
}
}
int j = 0;
int k = Config.getUpdatesPerFrame();
int i = k * 2;
Iterator iterator1 = this.chunksToUpdate.iterator();
while (iterator1.hasNext())
{
RenderChunk renderchunk1 = (RenderChunk)iterator1.next();
if (!this.renderDispatcher.updateChunkLater(renderchunk1))
{
break;
}
renderchunk1.setNeedsUpdate(false);
iterator1.remove();
if (renderchunk1.getCompiledChunk().isEmpty() && k < i)
{
++k;
}
++j;
if (j >= k)
{
break;
}
}
}
示例6: updateChunks
import net.minecraft.client.renderer.chunk.RenderChunk; //导入方法依赖的package包/类
public void updateChunks(long finishTimeNano)
{
this.displayListEntitiesDirty |= this.renderDispatcher.runChunkUploads(finishTimeNano);
if (this.chunksToUpdateForced.size() > 0)
{
Iterator iterator = this.chunksToUpdateForced.iterator();
while (iterator.hasNext())
{
RenderChunk renderchunk = (RenderChunk)iterator.next();
if (!this.renderDispatcher.updateChunkLater(renderchunk))
{
break;
}
renderchunk.setNeedsUpdate(false);
iterator.remove();
this.chunksToUpdate.remove(renderchunk);
this.chunksToResortTransparency.remove(renderchunk);
}
}
if (this.chunksToResortTransparency.size() > 0)
{
Iterator iterator2 = this.chunksToResortTransparency.iterator();
if (iterator2.hasNext())
{
RenderChunk renderchunk2 = (RenderChunk)iterator2.next();
if (this.renderDispatcher.updateTransparencyLater(renderchunk2))
{
iterator2.remove();
}
}
}
int j = 0;
int k = Config.getUpdatesPerFrame();
int i = k * 2;
Iterator iterator1 = this.chunksToUpdate.iterator();
while (iterator1.hasNext())
{
RenderChunk renderchunk1 = (RenderChunk)iterator1.next();
if (!this.renderDispatcher.updateChunkLater(renderchunk1))
{
break;
}
renderchunk1.setNeedsUpdate(false);
iterator1.remove();
if (renderchunk1.getCompiledChunk().isEmpty() && k < i)
{
++k;
}
++j;
if (j >= k)
{
break;
}
}
}
示例7: markBlocksForUpdate
import net.minecraft.client.renderer.chunk.RenderChunk; //导入方法依赖的package包/类
public void markBlocksForUpdate(int p_187474_1_, int p_187474_2_, int p_187474_3_, int p_187474_4_, int p_187474_5_, int p_187474_6_, boolean p_187474_7_)
{
int i = MathHelper.intFloorDiv(p_187474_1_, 16);
int j = MathHelper.intFloorDiv(p_187474_2_, 16);
int k = MathHelper.intFloorDiv(p_187474_3_, 16);
int l = MathHelper.intFloorDiv(p_187474_4_, 16);
int i1 = MathHelper.intFloorDiv(p_187474_5_, 16);
int j1 = MathHelper.intFloorDiv(p_187474_6_, 16);
for (int k1 = i; k1 <= l; ++k1)
{
int l1 = k1 % this.countChunksX;
if (l1 < 0)
{
l1 += this.countChunksX;
}
for (int i2 = j; i2 <= i1; ++i2)
{
int j2 = i2 % this.countChunksY;
if (j2 < 0)
{
j2 += this.countChunksY;
}
for (int k2 = k; k2 <= j1; ++k2)
{
int l2 = k2 % this.countChunksZ;
if (l2 < 0)
{
l2 += this.countChunksZ;
}
int i3 = (l2 * this.countChunksY + j2) * this.countChunksX + l1;
RenderChunk renderchunk = this.renderChunks[i3];
renderchunk.setNeedsUpdate(p_187474_7_);
}
}
}
}
示例8: markBlocksForUpdate
import net.minecraft.client.renderer.chunk.RenderChunk; //导入方法依赖的package包/类
public void markBlocksForUpdate(int p_187474_1_, int p_187474_2_, int p_187474_3_, int p_187474_4_, int p_187474_5_, int p_187474_6_, boolean p_187474_7_)
{
int i = MathHelper.bucketInt(p_187474_1_, 16);
int j = MathHelper.bucketInt(p_187474_2_, 16);
int k = MathHelper.bucketInt(p_187474_3_, 16);
int l = MathHelper.bucketInt(p_187474_4_, 16);
int i1 = MathHelper.bucketInt(p_187474_5_, 16);
int j1 = MathHelper.bucketInt(p_187474_6_, 16);
for (int k1 = i; k1 <= l; ++k1)
{
int l1 = k1 % this.countChunksX;
if (l1 < 0)
{
l1 += this.countChunksX;
}
for (int i2 = j; i2 <= i1; ++i2)
{
int j2 = i2 % this.countChunksY;
if (j2 < 0)
{
j2 += this.countChunksY;
}
for (int k2 = k; k2 <= j1; ++k2)
{
int l2 = k2 % this.countChunksZ;
if (l2 < 0)
{
l2 += this.countChunksZ;
}
int i3 = (l2 * this.countChunksY + j2) * this.countChunksX + l1;
RenderChunk renderchunk = this.renderChunks[i3];
renderchunk.setNeedsUpdate(p_187474_7_);
}
}
}
}