diff options
author | makamys <makamys@outlook.com> | 2022-06-24 09:59:15 +0200 |
---|---|---|
committer | makamys <makamys@outlook.com> | 2022-06-25 07:27:12 +0200 |
commit | d5d08eb64a91c1a5b74e401037628260cfd8059c (patch) | |
tree | bf28db78fa10f92a28e82639943fe3cc409ee514 /src/main/java/makamys/neodymium/mixin/unused/lod | |
parent | 41c8ac491b8e168f871e8d5eec1a13208e272410 (diff) | |
download | Neodymium-d5d08eb64a91c1a5b74e401037628260cfd8059c.tar.gz Neodymium-d5d08eb64a91c1a5b74e401037628260cfd8059c.tar.bz2 Neodymium-d5d08eb64a91c1a5b74e401037628260cfd8059c.zip |
DESTROOOOY
Delete unused LOD stuff. I can always restore it from Git history if I need it
later.
Diffstat (limited to 'src/main/java/makamys/neodymium/mixin/unused/lod')
3 files changed, 0 insertions, 86 deletions
diff --git a/src/main/java/makamys/neodymium/mixin/unused/lod/MixinChunkCache.java b/src/main/java/makamys/neodymium/mixin/unused/lod/MixinChunkCache.java deleted file mode 100644 index 98dce9d..0000000 --- a/src/main/java/makamys/neodymium/mixin/unused/lod/MixinChunkCache.java +++ /dev/null @@ -1,29 +0,0 @@ -package makamys.neodymium.mixin.unused.lod; - -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Redirect; - -import makamys.neodymium.Neodymium; -import makamys.neodymium.renderer.lod.FarChunkCache; -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 { - - @Redirect(method = "<init>*", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/World;getChunkFromChunkCoords(II)Lnet/minecraft/world/chunk/Chunk;")) - private Chunk redirectGetChunkFromChunkCoords(World world, int p1, int p2) { - Chunk chunk = world.getChunkFromChunkCoords(p1, p2); - if(Neodymium.isActive() && FarChunkCache.class.isInstance(this.getClass()) && chunk.isEmpty()) { - Chunk myChunk = Neodymium.renderer.getChunkFromChunkCoords(p1, p2); - if(myChunk != null) { - chunk = myChunk; - } - } - return chunk; - } - -} diff --git a/src/main/java/makamys/neodymium/mixin/unused/lod/MixinEntityRenderer.java b/src/main/java/makamys/neodymium/mixin/unused/lod/MixinEntityRenderer.java deleted file mode 100644 index 7ddade1..0000000 --- a/src/main/java/makamys/neodymium/mixin/unused/lod/MixinEntityRenderer.java +++ /dev/null @@ -1,32 +0,0 @@ -package makamys.neodymium.mixin.unused.lod; - -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -import makamys.neodymium.Neodymium; -import net.minecraft.client.renderer.EntityRenderer; - -/** Unused remnant from LODMod. Handles changing fog distance. */ -@Mixin(EntityRenderer.class) -abstract class MixinEntityRenderer { - - @Shadow - private float farPlaneDistance; - - @Inject(method = "setupCameraTransform", at = @At(value = "FIELD", target = "Lnet/minecraft/client/renderer/EntityRenderer;farPlaneDistance:F", shift = At.Shift.AFTER, ordinal = 1)) - private void onConstructed(CallbackInfo ci) { - if(Neodymium.isActive()) { - farPlaneDistance *= Neodymium.renderer.getFarPlaneDistanceMultiplier(); - } - } - - @Inject(method = "setupFog", at = @At(value = "RETURN")) - private void afterSetupFog(int mode, float alpha, CallbackInfo ci) { - if(Neodymium.isActive()) { - Neodymium.renderer.afterSetupFog(mode, alpha, farPlaneDistance); - } - } -} diff --git a/src/main/java/makamys/neodymium/mixin/unused/lod/MixinRenderBlocks.java b/src/main/java/makamys/neodymium/mixin/unused/lod/MixinRenderBlocks.java deleted file mode 100644 index 0af9799..0000000 --- a/src/main/java/makamys/neodymium/mixin/unused/lod/MixinRenderBlocks.java +++ /dev/null @@ -1,25 +0,0 @@ -package makamys.neodymium.mixin.unused.lod; - -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Redirect; - -import makamys.neodymium.Neodymium; -import net.minecraft.block.Block; -import net.minecraft.client.renderer.RenderBlocks; -import net.minecraft.world.IBlockAccess; - -/** Unused remnant from LODMod. Disables a wall being drawn on the edges of chunks facing unloaded chunks. */ -@Mixin(RenderBlocks.class) -abstract class MixinRenderBlocks { - - @Redirect(method = "renderBlockLiquid", at = @At(value = "INVOKE", target = "Lnet/minecraft/block/Block;shouldSideBeRendered(Lnet/minecraft/world/IBlockAccess;IIII)Z")) - public boolean shouldSideBeRendered(Block block, IBlockAccess ba, int x, int y, int z, int w) { - if(Neodymium.isActive()) { - return Neodymium.renderer.shouldSideBeRendered(block, ba, x, y, z, w); - } else { - return block.shouldSideBeRendered(ba, x, y, z, w); - } - } - -} |