Skip to content

Commit

Permalink
Strange rendering problem fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
SammySemicolon committed Jul 1, 2024
1 parent a48941b commit 9c6a567
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions src/main/java/com/sammy/malum/client/RenderUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,13 @@ public static CubeVertexData makeCubePositions(float scale) {
return makeCubePositions(scale, scale);
}
public static CubeVertexData makeCubePositions(float xScale, float yScale) {
float xStart = -(xScale/2f)+0.5f;
float xEnd = xScale/2f+0.5f;
float yStart = -(yScale/2f)+0.5f;
float yEnd = yScale/2f+0.5f;
float half = 0.5f;
float xOffset = xScale / 2f;
float yOffset = yScale / 2f;
float xStart = -xOffset + half;
float xEnd = xOffset + half;
float yStart = -yOffset + half;
float yEnd = yOffset + half;
Vector3f[] bottomVertices = new Vector3f[]{new Vector3f(xStart, yStart, xStart), new Vector3f(xStart, yStart, xEnd), new Vector3f(xEnd, yStart, xEnd), new Vector3f(xEnd, yStart, xStart)};
Vector3f[] topVertices = new Vector3f[]{new Vector3f(xStart, yEnd, xStart), new Vector3f(xStart, yEnd, xEnd), new Vector3f(xEnd, yEnd, xEnd), new Vector3f(xEnd, yEnd, xStart)};
Collection<Vector3f[]> offsetMap = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ public static LodestoneBlockProperties TWISTED_ETHER_BRAZIER() {
public static LodestoneBlockProperties MANA_MOTE_BLOCK() {
return new LodestoneBlockProperties()
.mapColor(MapColor.COLOR_LIGHT_BLUE)
.setRenderType(() -> RenderType::translucent)
.setRenderType(() -> RenderType::cutout)
.noOcclusion()
.needsPickaxe()
.requiresCorrectToolForDrops()
Expand Down

0 comments on commit 9c6a567

Please sign in to comment.