aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/makamys/lodmod/mixin/MixinTessellator.java
diff options
context:
space:
mode:
authormakamys <makamys@outlook.com>2022-06-03 13:11:12 +0200
committermakamys <makamys@outlook.com>2022-06-03 13:11:12 +0200
commit4371a8fb2bc0596d945c5f156d01fa44b56bcf8b (patch)
tree3e714123e3161e69be53f2e507524e228659c0e5 /src/main/java/makamys/lodmod/mixin/MixinTessellator.java
parentd5b0ec39fda8bc53ecb44ff491eba6e0b096b296 (diff)
downloadNeodymium-4371a8fb2bc0596d945c5f156d01fa44b56bcf8b.tar.gz
Neodymium-4371a8fb2bc0596d945c5f156d01fa44b56bcf8b.tar.bz2
Neodymium-4371a8fb2bc0596d945c5f156d01fa44b56bcf8b.zip
Make it work without OptiFine
Diffstat (limited to 'src/main/java/makamys/lodmod/mixin/MixinTessellator.java')
-rw-r--r--src/main/java/makamys/lodmod/mixin/MixinTessellator.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/makamys/lodmod/mixin/MixinTessellator.java b/src/main/java/makamys/lodmod/mixin/MixinTessellator.java
index d791ba9..9bb8e77 100644
--- a/src/main/java/makamys/lodmod/mixin/MixinTessellator.java
+++ b/src/main/java/makamys/lodmod/mixin/MixinTessellator.java
@@ -7,6 +7,7 @@ import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import makamys.lodmod.LODMod;
+import makamys.lodmod.MixinConfigPlugin;
import makamys.lodmod.ducks.ITessellator;
import makamys.lodmod.renderer.ChunkMesh;
import makamys.lodmod.renderer.MeshQuad;
@@ -79,7 +80,8 @@ abstract class MixinTessellator implements ITessellator {
int zOffset = wr.posZ;
for(int quadI = 0; quadI < this.vertexCount / 4; quadI++) {
- MeshQuad quad = new MeshQuad(rawBuffer, quadI * 32, new ChunkMesh.Flags(hasTexture, hasBrightness, hasColor, hasNormals), xOffset, yOffset, zOffset);
+ boolean of = MixinConfigPlugin.isOptiFinePresent();
+ MeshQuad quad = new MeshQuad(rawBuffer, quadI * 32, new ChunkMesh.Flags(hasTexture, hasBrightness, hasColor, hasNormals), of ? xOffset : 0, of ? yOffset : 0, of ? zOffset : 0);
/*if(quad.bUs[0] == quad.bUs[1] && quad.bUs[1] == quad.bUs[2] && quad.bUs[2] == quad.bUs[3] && quad.bUs[3] == quad.bVs[0] && quad.bVs[0] == quad.bVs[1] && quad.bVs[1] == quad.bVs[2] && quad.bVs[2] == quad.bVs[3] && quad.bVs[3] == 0) {
quad.deleted = true;
}*/