private void renderChunkBorder(double yMin, double yMax, double xBase, double zBase) {
Tessellator tessellator = Tessellator.getInstance();
BufferBuilder buf = tessellator.getBuffer();
int spacing = 16;
for (LineStyle line : this.style.getLines()) {
if (line.prepare(this.style.getRenderType())) {
buf.begin(GL_LINES, DefaultVertexFormats.POSITION);
line.applyColour();
for (int x = -16; x <= 32; x += spacing) {
for (int z = -16; z <= 32; z += spacing) {
buf.pos(xBase + x, yMin, zBase - z).endVertex();
buf.pos(xBase + x, yMax, zBase - z).endVertex();
}
}
for (double y = yMin; y <= yMax; y += yMax) {
buf.pos(xBase, y, zBase).endVertex();
buf.pos(xBase, y, zBase - 16).endVertex();
buf.pos(xBase, y, zBase - 16).endVertex();
buf.pos(xBase + 16, y, zBase - 16).endVertex();
buf.pos(xBase + 16, y, zBase - 16).endVertex();
buf.pos(xBase + 16, y, zBase).endVertex();
buf.pos(xBase + 16, y, zBase).endVertex();
buf.pos(xBase, y, zBase).endVertex();
}
tessellator.draw();
}
}
}
RenderChunkBoundary.java 文件源码
java
阅读 17
收藏 0
点赞 0
评论 0
项目:HardVox
作者:
评论列表
文章目录