diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/makamys/neodymium/Neodymium.java | 15 | ||||
-rw-r--r-- | src/main/java/makamys/neodymium/renderer/ChunkMesh.java | 7 | ||||
-rw-r--r-- | src/main/java/makamys/neodymium/renderer/MeshQuad.java | 4 |
3 files changed, 3 insertions, 23 deletions
diff --git a/src/main/java/makamys/neodymium/Neodymium.java b/src/main/java/makamys/neodymium/Neodymium.java index ce2f8eb..d47d03a 100644 --- a/src/main/java/makamys/neodymium/Neodymium.java +++ b/src/main/java/makamys/neodymium/Neodymium.java @@ -42,9 +42,6 @@ public class Neodymium public static NeoRenderer renderer; - public static boolean ofFastRender; - private static Method ofIsFastRenderMethod; - @EventHandler public void preInit(FMLConstructionEvent event) { MCLib.init(); @@ -122,18 +119,6 @@ public class Neodymium if(!Config.enabled) return; if(event.phase == TickEvent.Phase.START) { - if(OFUtil.isOptiFinePresent()) { - try { - if(ofIsFastRenderMethod == null) { - ofIsFastRenderMethod = Class.forName("Config").getMethod("isFastRender"); - } - ofFastRender = (boolean)ofIsFastRenderMethod.invoke(null); - } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException - | SecurityException | ClassNotFoundException e) { - // oops - } - } - EntityPlayer player = Minecraft.getMinecraft().thePlayer; World world = player != null ? player.worldObj : null; if(world != getRendererWorld()) { diff --git a/src/main/java/makamys/neodymium/renderer/ChunkMesh.java b/src/main/java/makamys/neodymium/renderer/ChunkMesh.java index 26429a7..3971c65 100644 --- a/src/main/java/makamys/neodymium/renderer/ChunkMesh.java +++ b/src/main/java/makamys/neodymium/renderer/ChunkMesh.java @@ -72,17 +72,12 @@ public class ChunkMesh extends Mesh { int yOffset = wr.posY; int zOffset = wr.posZ; - boolean fr = OFUtil.isOptiFinePresent() && Neodymium.ofFastRender; - int tessellatorXOffset = fr ? 0 : xOffset; - int tessellatorYOffset = fr ? 0 : yOffset; - int tessellatorZOffset = fr ? 0 : zOffset; - ChunkMesh.Flags flags = new ChunkMesh.Flags(t.hasTexture, t.hasBrightness, t.hasColor, t.hasNormals); quadBuf.reset(); for(int quadI = 0; quadI < t.vertexCount / 4; quadI++) { - quadBuf.next().setState(t.rawBuffer, quadI * 32, flags, tessellatorXOffset, tessellatorYOffset, tessellatorZOffset); + quadBuf.next().setState(t.rawBuffer, quadI * 32, flags, (float)-t.xOffset, (float)-t.yOffset, (float)-t.zOffset); } List<MeshQuad> quads = quadBuf.getAsList(); diff --git a/src/main/java/makamys/neodymium/renderer/MeshQuad.java b/src/main/java/makamys/neodymium/renderer/MeshQuad.java index 71daf1a..d33bc75 100644 --- a/src/main/java/makamys/neodymium/renderer/MeshQuad.java +++ b/src/main/java/makamys/neodymium/renderer/MeshQuad.java @@ -66,7 +66,7 @@ public class MeshQuad { private static Vector3f vectorB = new Vector3f(); private static Vector3f vectorC = new Vector3f(); - private void read(int[] rawBuffer, int offset, int offsetX, int offsetY, int offsetZ) { + private void read(int[] rawBuffer, int offset, float offsetX, float offsetY, float offsetZ) { for(int vi = 0; vi < 4; vi++) { int i = offset + vi * 8; @@ -84,7 +84,7 @@ public class MeshQuad { } } - public void setState(int[] rawBuffer, int offset, ChunkMesh.Flags flags, int offsetX, int offsetY, int offsetZ) { + public void setState(int[] rawBuffer, int offset, ChunkMesh.Flags flags, float offsetX, float offsetY, float offsetZ) { resetState(); read(rawBuffer, offset, offsetX, offsetY, offsetZ); |