-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pull out the ChunkCache into a separate module
- Loading branch information
1 parent
f8a0bdd
commit 664c299
Showing
7 changed files
with
82 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
.../client/dynlights/WorldRendererMixin.java → .../mixins/client/cc/WorldRendererMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
src/main/java/com/falsepattern/falsetweaks/mixin/mixins/client/cc/of/ChunkCacheOFMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package com.falsepattern.falsetweaks.mixin.mixins.client.cc.of; | ||
|
||
import com.falsepattern.falsetweaks.modules.dynlights.DynamicLightsDrivers; | ||
import org.spongepowered.asm.mixin.Dynamic; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
|
||
import net.minecraft.block.Block; | ||
import net.minecraft.world.ChunkCache; | ||
import net.minecraft.world.IBlockAccess; | ||
import net.minecraft.world.World; | ||
|
||
@Mixin(targets = "ChunkCacheOF", | ||
remap = false) | ||
public abstract class ChunkCacheOFMixin extends ChunkCache { | ||
public ChunkCacheOFMixin(World p_i1964_1_, int p_i1964_2_, int p_i1964_3_, int p_i1964_4_, int p_i1964_5_, int p_i1964_6_, int p_i1964_7_, int p_i1964_8_) { | ||
super(p_i1964_1_, p_i1964_2_, p_i1964_3_, p_i1964_4_, p_i1964_5_, p_i1964_6_, p_i1964_7_, p_i1964_8_); | ||
} | ||
|
||
@Redirect(method = "getLightBrightnessForSkyBlocksRaw", | ||
at = @At(value = "INVOKE", | ||
target = "LConfig;isDynamicLights()Z"), | ||
require = 1) | ||
private boolean ftDynamicLights() { | ||
return DynamicLightsDrivers.frontend.enabled(); | ||
} | ||
|
||
@Redirect(method = "getLightBrightnessForSkyBlocksRaw", | ||
at = @At(value = "INVOKE", | ||
target = "LDynamicLights;getCombinedLight(IIII)I"), | ||
require = 1) | ||
private int ftCombinedLights(int x, int y, int z, int combinedLight) { | ||
return DynamicLightsDrivers.frontend.forWorldMesh().getCombinedLight(x, y, z, combinedLight); | ||
} | ||
|
||
@Redirect(method = "getLightBrightnessForSkyBlocksRaw", | ||
at = @At(value = "INVOKE", | ||
target = "Lnet/minecraft/world/IBlockAccess;getLightBrightnessForSkyBlocks(IIII)I", | ||
remap = true), | ||
require = 1) | ||
private int brightnessFromSuper(IBlockAccess instance, int x, int y, int z, int lightValue) { | ||
return super.getLightBrightnessForSkyBlocks(x, y, z, lightValue); | ||
} | ||
|
||
@Dynamic | ||
@Redirect(method = "func_147439_a", | ||
at = @At(value = "INVOKE", | ||
target = "Lnet/minecraft/world/IBlockAccess;getBlock(III)Lnet/minecraft/block/Block;", | ||
remap = true), | ||
remap = true, | ||
require = 3) | ||
private Block blockFromSuper(IBlockAccess instance, int x, int y, int z) { | ||
return super.getBlock(x, y, z); | ||
} | ||
} |
26 changes: 0 additions & 26 deletions
26
...java/com/falsepattern/falsetweaks/mixin/mixins/client/dynlights/of/ChunkCacheOFMixin.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
...weaks/modules/dynlights/ChunkCacheFT.java → .../falsetweaks/modules/cc/ChunkCacheFT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters