diff --git a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedTileRenderer.java b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedTileRenderer.java index bcc7f7866..5d126b2f7 100644 --- a/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedTileRenderer.java +++ b/src/main/java/com/simibubi/create/foundation/render/backend/instancing/InstancedTileRenderer.java @@ -30,6 +30,7 @@ public abstract class InstancedTileRenderer

{ protected Map, RenderMaterial> materials = new HashMap<>(); protected int frame; + protected int tick; protected InstancedTileRenderer() { registerMaterials(); @@ -40,6 +41,8 @@ public abstract class InstancedTileRenderer

{ public abstract void registerMaterials(); public void tick(double cameraX, double cameraY, double cameraZ) { + tick++; + // integer camera pos int cX = (int) cameraX; int cY = (int) cameraY; @@ -58,7 +61,7 @@ public abstract class InstancedTileRenderer

{ int dY = pos.getY() - cY; int dZ = pos.getZ() - cZ; - if ((frame % getUpdateDivisor(dX, dY, dZ)) == 0) + if ((tick % getUpdateDivisor(dX, dY, dZ)) == 0) instance.tick(); } } @@ -195,9 +198,9 @@ public abstract class InstancedTileRenderer

{ int dY = worldPos.getY() - cY; int dZ = worldPos.getZ() - cZ; - float dot = dX * lookX + dY * lookY + dZ * lookZ; + float dot = (dX + lookX * 2) * lookX + (dY + lookY * 2) * lookY + (dZ + lookZ * 2) * lookZ; - if (dot < 0) return false; // is it behind the camera? + if (dot < 0) return false; // is it more than 2 blocks behind the camera? return (frame % getUpdateDivisor(dX, dY, dZ)) == 0; }