From 1270716d988c5138ad5645645db338ec74d91482 Mon Sep 17 00:00:00 2001 From: Waterpicker Date: Sat, 5 Sep 2020 20:12:04 -0500 Subject: [PATCH] Fixed Tesseract and Rift Crack rendering. --- src/main/java/org/dimdev/dimdoors/client/MyRenderLayer.java | 3 ++- .../java/org/dimdev/dimdoors/client/RiftCrackRenderer.java | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/dimdev/dimdoors/client/MyRenderLayer.java b/src/main/java/org/dimdev/dimdoors/client/MyRenderLayer.java index 45cddfff..68227f22 100644 --- a/src/main/java/org/dimdev/dimdoors/client/MyRenderLayer.java +++ b/src/main/java/org/dimdev/dimdoors/client/MyRenderLayer.java @@ -46,7 +46,7 @@ public class MyRenderLayer extends RenderLayer { super(string, vertexFormat, i, j, bl, bl2, runnable, runnable2); } - public static RenderLayer CRACK = RenderLayer.of("crack", VertexFormats.POSITION_COLOR, GL11.GL_QUADS, 256, MultiPhaseParameters.builder() + public static RenderLayer CRACK = RenderLayer.of("crack", VertexFormats.POSITION_COLOR, GL11.GL_TRIANGLES, 256, MultiPhaseParameters.builder() .cull(DISABLE_CULLING) .lightmap(RenderPhase.DISABLE_LIGHTMAP) .texture(NO_TEXTURE) @@ -63,6 +63,7 @@ public class MyRenderLayer extends RenderLayer { .cull(DISABLE_CULLING) .lightmap(RenderPhase.DISABLE_LIGHTMAP) .texture(new Texture(DetachedRiftBlockEntityRenderer.TESSERACT_PATH, false, false)) + .alpha(Alpha.HALF_ALPHA) .build(false)); public static RenderLayer getDimensionalPortal(int phase, EntranceRiftBlockEntity blockEntity) { diff --git a/src/main/java/org/dimdev/dimdoors/client/RiftCrackRenderer.java b/src/main/java/org/dimdev/dimdoors/client/RiftCrackRenderer.java index 20f7ad36..3aa107a7 100644 --- a/src/main/java/org/dimdev/dimdoors/client/RiftCrackRenderer.java +++ b/src/main/java/org/dimdev/dimdoors/client/RiftCrackRenderer.java @@ -20,7 +20,7 @@ public final class RiftCrackRenderer { double offsetZ = 0; // Jitters that make rifts shake - float jitterSpeed = 0f; // Changes how quickly the rift jitters + float jitterSpeed = 0.014f; // Changes how quickly the rift jitters // Calculate jitter like for monoliths, depending x, y and z coordinates to avoid all rifts syncing float time = (System.currentTimeMillis() + riftRandom) % 2000000; @@ -56,7 +56,7 @@ public final class RiftCrackRenderer { y *= scale; z *= scale; - vc.vertex(model, (float) x, (float) y, (float) z).color(0.08f, 0.08f, 0.08f, .3f).next(); + vc.vertex(model, (float) (x + xJitter), (float) (y + yJitter), (float) (z + zJitter)).color(0.08f, 0.08f, 0.08f, .3f).next(); } } }