public void renderPathLine(float p_190067_1_, Path p_190067_2_)
{
Tessellator tessellator = Tessellator.getInstance();
VertexBuffer vertexbuffer = tessellator.getBuffer();
vertexbuffer.begin(3, DefaultVertexFormats.POSITION_COLOR);
for (int i = 0; i < p_190067_2_.getCurrentPathLength(); ++i)
{
PathPoint pathpoint = p_190067_2_.getPathPointFromIndex(i);
if (this.addDistanceToPlayer(pathpoint) <= 40.0F)
{
float f = (float)i / (float)p_190067_2_.getCurrentPathLength() * 0.33F;
int j = i == 0 ? 0 : MathHelper.hsvToRGB(f, 0.9F, 0.9F);
int k = j >> 16 & 255;
int l = j >> 8 & 255;
int i1 = j & 255;
vertexbuffer.pos((double)pathpoint.xCoord - this.xo + 0.5D, (double)pathpoint.yCoord - this.yo + 0.5D, (double)pathpoint.zCoord - this.zo + 0.5D).color(k, l, i1, 255).endVertex();
}
}
tessellator.draw();
}
DebugRendererPathfinding.java 文件源码
java
阅读 19
收藏 0
点赞 0
评论 0
项目:CustomWorldGen
作者:
评论列表
文章目录