diff --git a/src/fos/graphics/FOSOreRenderer.java b/src/fos/graphics/FOSOreRenderer.java index 65b37ba4..c724bd5b 100644 --- a/src/fos/graphics/FOSOreRenderer.java +++ b/src/fos/graphics/FOSOreRenderer.java @@ -39,7 +39,7 @@ public class FOSOreRenderer { vertexSize = 2 + 1 + 2, spriteSize = vertexSize * 4, maxSprites = chunkSize * chunkSize * 9; - private static final float pad = tilesize/2f; + private static final float pad = tilesize / 2f; private static final boolean dynamic = false; private float[] vertices = new float[maxSprites * vertexSize * 4]; @@ -100,14 +100,12 @@ void main(){ /** Queues up a cache change for a tile. Only runs in render loop. */ public void recacheTile(Tile tile){ - //recaching all layers may not be necessary recacheSet.add(Point2.pack(tile.x / chunkSize, tile.y / chunkSize)); } public void drawOre(){ - if(cache == null){ + if(cache == null) return; - } Camera camera = Core.camera; @@ -145,9 +143,8 @@ public void drawOre(){ } IntSet.IntSetIterator it = drawnLayerSet.iterator(); - while(it.hasNext){ + while(it.hasNext) drawnLayers.add(it.next()); - } drawnLayers.sort(); @@ -205,9 +202,8 @@ public void checkChanges(){ } public void beginDraw(){ - if(cache == null){ + if(cache == null) return; - } Draw.flush(); @@ -217,17 +213,15 @@ public void beginDraw(){ } public void endDraw(){ - if(cache == null){ + if(cache == null) return; - } endc(); } public void drawLayer(CacheLayer layer){ - if(cache == null){ + if(cache == null) return; - } Camera camera = Core.camera;