Skip to content

Commit

Permalink
bugfix: resolve BlockSelectionRenderer (#4973)
Browse files Browse the repository at this point in the history
Co-authored-by: Tobias Nett <[email protected]>
  • Loading branch information
pollend and skaldarnar authored Dec 19, 2021
1 parent 71a98a1 commit 7583454
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ private static void buildBlockMesh(StandardMeshData mesh, float size, Rectanglef
Vector3f pos = new Vector3f();
Vector3f norm = new Vector3f();
Vector2f texCoord = new Vector2f();
final float sizeHalf = size / 2;
final float sizeHalf = (size / 2) + .001f;

int firstIndex = mesh.position.getPosition();

Expand All @@ -81,7 +81,7 @@ private static void buildBlockMesh(StandardMeshData mesh, float size, Rectanglef
mesh.uv0.put(texCoord.set(texRect.minX, texRect.maxY));
mesh.uv0.put(texCoord.set(texRect.maxX, texRect.maxY));
mesh.uv0.put(texCoord.set(texRect.maxX, texRect.minY));
mesh.uv0.put(texCoord.set(texRect.minY, texRect.minY));
mesh.uv0.put(texCoord.set(texRect.minX, texRect.minY));
for (int i = 0; i < 4; i++) {
mesh.normal.put(norm.set(-1.0f, 0, 0));
mesh.color0.put(c);
Expand Down Expand Up @@ -123,7 +123,7 @@ private static void buildBlockMesh(StandardMeshData mesh, float size, Rectanglef
mesh.uv0.put(texCoord.set(texRect.minX, texRect.maxY));
mesh.uv0.put(texCoord.set(texRect.maxX, texRect.maxY));
mesh.uv0.put(texCoord.set(texRect.maxX, texRect.minY));
mesh.uv0.put(texCoord.set(texRect.minY, texRect.minY));
mesh.uv0.put(texCoord.set(texRect.minX, texRect.minY));
for (int i = 0; i < 4; i++) {
mesh.normal.put(norm.set(0, 0, 1.0f));
mesh.color0.put(c);
Expand Down

0 comments on commit 7583454

Please sign in to comment.