mirror of
https://github.com/GTNewHorizons/MouseTweaks.git
synced 2026-11-25 22:34:40 +00:00
Now using MCP + LiteLoader build system, clean up, remade Config, remade the initialisation and whatnot, reformat, fixed LiteLoader compatibility.
This commit is contained in:
1 parent
8abfb6e2c3
commit
a204c82ea5
34 files changed
+2166
-2391
No files matched your search
@@ -0,0 +1,28 @@
|
||||
package yalter.mousetweaks;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.profiler.Profiler;
|
||||
|
||||
public class ProfilerCustom extends Profiler {
|
||||
private Minecraft minecraft;
|
||||
|
||||
public ProfilerCustom() {
|
||||
minecraft = Minecraft.getMinecraft();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startSection(String sectionName) {
|
||||
// The useProfiler check is redundant here since the OnTick method cannot change in the runtime (at the time of writing this comment).
|
||||
if (Main.useProfiler && "gameRenderer".equals(sectionName)) {
|
||||
Main.onUpdateInGame();
|
||||
}
|
||||
|
||||
super.startSection(sectionName);
|
||||
|
||||
if (Main.optifine) {
|
||||
if (!Reflection.gameSettings.setFieldValue(minecraft.gameSettings, "ofProfiler", true)) {
|
||||
Main.optifine = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user