aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/makamys/neodymium
diff options
context:
space:
mode:
authormakamys <makamys@outlook.com>2022-06-09 13:26:00 +0200
committermakamys <makamys@outlook.com>2022-06-09 13:26:04 +0200
commitb71b950132db103d85000cf322a4217e6b7c5e53 (patch)
tree88f9be28947f565c846d8cd951010aa1b2168e2d /src/main/java/makamys/neodymium
parentdd14fdbec57d9953fc9a7484c74af32809ccc94e (diff)
downloadNeodymium-b71b950132db103d85000cf322a4217e6b7c5e53.tar.gz
Neodymium-b71b950132db103d85000cf322a4217e6b7c5e53.tar.bz2
Neodymium-b71b950132db103d85000cf322a4217e6b7c5e53.zip
Clean up and document mixins
Diffstat (limited to 'src/main/java/makamys/neodymium')
-rw-r--r--src/main/java/makamys/neodymium/MixinConfigPlugin.java6
-rw-r--r--src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java1
-rw-r--r--src/main/java/makamys/neodymium/mixin/MixinRenderGlobal_OptiFine.java1
-rw-r--r--src/main/java/makamys/neodymium/mixin/MixinWorldRenderer.java1
-rw-r--r--src/main/java/makamys/neodymium/mixin/unused/lod/MixinChunkCache.java (renamed from src/main/java/makamys/neodymium/mixin/MixinChunkCache.java)3
-rw-r--r--src/main/java/makamys/neodymium/mixin/unused/lod/MixinEntityRenderer.java (renamed from src/main/java/makamys/neodymium/mixin/MixinEntityRenderer.java)3
-rw-r--r--src/main/java/makamys/neodymium/mixin/unused/lod/MixinRenderBlocks.java (renamed from src/main/java/makamys/neodymium/mixin/MixinRenderBlocks.java)3
7 files changed, 11 insertions, 7 deletions
diff --git a/src/main/java/makamys/neodymium/MixinConfigPlugin.java b/src/main/java/makamys/neodymium/MixinConfigPlugin.java
index cc4bc30..a2357d4 100644
--- a/src/main/java/makamys/neodymium/MixinConfigPlugin.java
+++ b/src/main/java/makamys/neodymium/MixinConfigPlugin.java
@@ -39,11 +39,9 @@ public class MixinConfigPlugin implements IMixinConfigPlugin {
@Override
public List<String> getMixins() {
List<String> mixins = new ArrayList<>();
- mixins.addAll(Arrays.asList("MixinChunkCache",
- "MixinEntityRenderer",
+ mixins.addAll(Arrays.asList(
"MixinRenderGlobal",
- "MixinWorldRenderer",
- "MixinRenderBlocks"));
+ "MixinWorldRenderer"));
if (isOptiFinePresent()) {
System.out.println("Detected OptiFine");
diff --git a/src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java b/src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java
index 03b8aac..8814221 100644
--- a/src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java
+++ b/src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java
@@ -18,6 +18,7 @@ import net.minecraft.client.renderer.RenderGlobal;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.entity.Entity;
+/** Blocks vanilla chunk rendering while NeoRenderer is active. */
@Mixin(RenderGlobal.class)
abstract class MixinRenderGlobal {
diff --git a/src/main/java/makamys/neodymium/mixin/MixinRenderGlobal_OptiFine.java b/src/main/java/makamys/neodymium/mixin/MixinRenderGlobal_OptiFine.java
index d63e3ad..c337c42 100644
--- a/src/main/java/makamys/neodymium/mixin/MixinRenderGlobal_OptiFine.java
+++ b/src/main/java/makamys/neodymium/mixin/MixinRenderGlobal_OptiFine.java
@@ -11,6 +11,7 @@ import makamys.neodymium.Neodymium;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.RenderGlobal;
+/** Blocks vanilla chunk rendering while NeoRenderer is active. (OptiFine compat) */
@Mixin(RenderGlobal.class)
abstract class MixinRenderGlobal_OptiFine {
diff --git a/src/main/java/makamys/neodymium/mixin/MixinWorldRenderer.java b/src/main/java/makamys/neodymium/mixin/MixinWorldRenderer.java
index 7d1ffd8..ee6908e 100644
--- a/src/main/java/makamys/neodymium/mixin/MixinWorldRenderer.java
+++ b/src/main/java/makamys/neodymium/mixin/MixinWorldRenderer.java
@@ -27,6 +27,7 @@ import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.ChunkCache;
import net.minecraft.world.World;
+/** Inserts hooks in WorldRenderer to listen for changes, and to grab the tessellator data right before rendering. */
@Mixin(WorldRenderer.class)
abstract class MixinWorldRenderer implements IWorldRenderer {
diff --git a/src/main/java/makamys/neodymium/mixin/MixinChunkCache.java b/src/main/java/makamys/neodymium/mixin/unused/lod/MixinChunkCache.java
index 331e3cf..f1da9bb 100644
--- a/src/main/java/makamys/neodymium/mixin/MixinChunkCache.java
+++ b/src/main/java/makamys/neodymium/mixin/unused/lod/MixinChunkCache.java
@@ -1,4 +1,4 @@
-package makamys.neodymium.mixin;
+package makamys.neodymium.mixin.unused.lod;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
@@ -11,6 +11,7 @@ import net.minecraft.world.ChunkCache;
import net.minecraft.world.World;
import net.minecraft.world.chunk.Chunk;
+/** Unused remnant from LODMod. Handles reusage of Chunks when a LOD chunk becomes loaded. */
@Mixin(ChunkCache.class)
abstract class MixinChunkCache {
diff --git a/src/main/java/makamys/neodymium/mixin/MixinEntityRenderer.java b/src/main/java/makamys/neodymium/mixin/unused/lod/MixinEntityRenderer.java
index 6e5cf7b..a88ac72 100644
--- a/src/main/java/makamys/neodymium/mixin/MixinEntityRenderer.java
+++ b/src/main/java/makamys/neodymium/mixin/unused/lod/MixinEntityRenderer.java
@@ -1,4 +1,4 @@
-package makamys.neodymium.mixin;
+package makamys.neodymium.mixin.unused.lod;
import org.lwjgl.opengl.GL11;
import org.spongepowered.asm.mixin.Mixin;
@@ -13,6 +13,7 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.EntityRenderer;
import net.minecraft.entity.EntityLivingBase;
+/** Unused remnant from LODMod. Handles changing fog distance. */
@Mixin(EntityRenderer.class)
abstract class MixinEntityRenderer {
diff --git a/src/main/java/makamys/neodymium/mixin/MixinRenderBlocks.java b/src/main/java/makamys/neodymium/mixin/unused/lod/MixinRenderBlocks.java
index fdfbe65..27b0605 100644
--- a/src/main/java/makamys/neodymium/mixin/MixinRenderBlocks.java
+++ b/src/main/java/makamys/neodymium/mixin/unused/lod/MixinRenderBlocks.java
@@ -1,4 +1,4 @@
-package makamys.neodymium.mixin;
+package makamys.neodymium.mixin.unused.lod;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
@@ -14,6 +14,7 @@ import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraft.world.chunk.Chunk;
+/** Unused remnant from LODMod. Disables a wall being drawn on the edges of chunks facing unloaded chunks. */
@Mixin(RenderBlocks.class)
abstract class MixinRenderBlocks {