Fixed Tesseract and Rift Crack rendering.
This commit is contained in:
parent
ab2681bc35
commit
1270716d98
2 changed files with 4 additions and 3 deletions
|
@ -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) {
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue