-
-
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.
- Loading branch information
1 parent
db6d8e3
commit 9126b40
Showing
12 changed files
with
142 additions
and
11 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
36 changes: 36 additions & 0 deletions
36
...lsepattern/falsetweaks/mixin/mixins/client/threadedupdates/optifine/WorldClientMixin.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,36 @@ | ||
package com.falsepattern.falsetweaks.mixin.mixins.client.threadedupdates.optifine; | ||
|
||
import org.spongepowered.asm.mixin.Dynamic; | ||
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.Redirect; | ||
|
||
import net.minecraft.client.multiplayer.WorldClient; | ||
import net.minecraft.profiler.Profiler; | ||
import net.minecraft.world.World; | ||
import net.minecraft.world.WorldProvider; | ||
import net.minecraft.world.WorldSettings; | ||
import net.minecraft.world.storage.ISaveHandler; | ||
|
||
import static com.falsepattern.falsetweaks.modules.threadedupdates.ThreadedChunkUpdateHelper.MAIN_THREAD; | ||
|
||
@Mixin(WorldClient.class) | ||
public abstract class WorldClientMixin extends World { | ||
@Dynamic | ||
@Shadow(remap = false) | ||
public boolean renderItemInFirstPerson; | ||
|
||
public WorldClientMixin(ISaveHandler p_i45368_1_, String p_i45368_2_, WorldProvider p_i45368_3_, WorldSettings p_i45368_4_, Profiler p_i45368_5_) { | ||
super(p_i45368_1_, p_i45368_2_, p_i45368_3_, p_i45368_4_, p_i45368_5_); | ||
} | ||
|
||
@Dynamic | ||
@Redirect(method = {"getLightBrightnessForSkyBlocks", "func_72802_i"}, | ||
at = @At(value = "FIELD", | ||
target = "Lnet/minecraft/client/multiplayer/WorldClient;renderItemInFirstPerson:Z"), | ||
require = 1) | ||
private boolean noHandLightOffThread(WorldClient self) { | ||
return renderItemInFirstPerson && Thread.currentThread() == MAIN_THREAD; | ||
} | ||
} |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package stubpackage; | ||
|
||
import net.minecraft.world.ChunkCache; | ||
import net.minecraft.world.World; | ||
|
||
public class ChunkCacheOF extends ChunkCache { | ||
public ChunkCacheOF(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_); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package stubpackage; | ||
|
||
import net.minecraft.client.renderer.RenderGlobal; | ||
|
||
public class DynamicLights { | ||
public static void update(RenderGlobal rg) { | ||
|
||
} | ||
} |