diff options
Diffstat (limited to 'src/main/java/makamys/lodmod/mixin')
-rw-r--r-- | src/main/java/makamys/lodmod/mixin/MixinTessellator.java | 4 | ||||
-rw-r--r-- | src/main/java/makamys/lodmod/mixin/MixinWorldRenderer.java | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/makamys/lodmod/mixin/MixinTessellator.java b/src/main/java/makamys/lodmod/mixin/MixinTessellator.java index 3624832..eea2a31 100644 --- a/src/main/java/makamys/lodmod/mixin/MixinTessellator.java +++ b/src/main/java/makamys/lodmod/mixin/MixinTessellator.java @@ -54,7 +54,7 @@ abstract class MixinTessellator implements ITessellator { } }*/ - public ChunkMesh toChunkMesh() { + public ChunkMesh toChunkMesh(int pass) { if(this.vertexCount % 4 != 0) { System.out.println("Error: Vertex count is not a multiple of 4"); return null; @@ -122,7 +122,7 @@ abstract class MixinTessellator implements ITessellator { return new ChunkMesh( (int)(-xOffset / 16), (int)(-yOffset / 16), (int)(-zOffset / 16), new ChunkMesh.Flags(hasTexture, hasBrightness, hasColor, hasNormals), - quadCount, quads); + quadCount, quads, pass); } else { return null; } diff --git a/src/main/java/makamys/lodmod/mixin/MixinWorldRenderer.java b/src/main/java/makamys/lodmod/mixin/MixinWorldRenderer.java index 8146431..a3a0e60 100644 --- a/src/main/java/makamys/lodmod/mixin/MixinWorldRenderer.java +++ b/src/main/java/makamys/lodmod/mixin/MixinWorldRenderer.java @@ -23,6 +23,7 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.client.renderer.entity.RenderItem; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.ChunkCache; import net.minecraft.world.World; @@ -78,9 +79,9 @@ abstract class MixinWorldRenderer implements IWorldRenderer { } @Inject(method = "postRenderBlocks", at = @At(value = "HEAD")) - private void prePostRenderBlocks(CallbackInfo ci) { + private void prePostRenderBlocks(int pass, EntityLivingBase entity, CallbackInfo ci) { if(LODMod.isActive()) { - chunkMeshes.add(((ITessellator)Tessellator.instance).toChunkMesh()); + chunkMeshes.add(((ITessellator)Tessellator.instance).toChunkMesh(pass)); } } |