Skip to content

Commit

Permalink
use c style for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
boubou19 committed Feb 25, 2024
1 parent 30aef7f commit a202c6f
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/main/java/com/enderio/core/client/render/RenderUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -377,20 +377,20 @@ public static void addVerticesToTessellator(List<Vertex> vertices, Tessellator t
}

public static void addVerticesToTessellator(Vertex[] vertices, Tessellator tes) {
for (Vertex v : vertices) {
if (v.brightness != -1) {
tes.setBrightness(v.brightness);
for (int i = 0; i < vertices.length; i++) {
if (vertices[i].brightness != -1) {
tes.setBrightness(vertices[i].brightness);
}
if (v.color != null) {
tes.setColorRGBA_F(v.r(), v.g(), v.b(), v.a());
if (vertices[i].color != null) {
tes.setColorRGBA_F(vertices[i].r(), vertices[i].g(), vertices[i].b(), vertices[i].a());
}
if (v.uv != null) {
tes.setTextureUV(v.u(), v.v());
if (vertices[i].uv != null) {
tes.setTextureUV(vertices[i].u(), vertices[i].v());
}
if (v.normal != null) {
tes.setNormal(v.nx(), v.ny(), v.nz());
if (vertices[i].normal != null) {
tes.setNormal(vertices[i].nx(), vertices[i].ny(), vertices[i].nz());
}
tes.addVertex(v.x(), v.y(), v.z());
tes.addVertex(vertices[i].x(), vertices[i].y(), vertices[i].z());
}
}

Expand Down

0 comments on commit a202c6f

Please sign in to comment.