mirror of
https://github.com/refactorinqq/SLC-1.8.9.git
synced 2024-11-10 07:11:31 +01:00
Custom FPS Limit in Silent Menu
This commit is contained in:
parent
be98355ab1
commit
8318d25350
@ -46,4 +46,8 @@ public class SilentScreen extends GuiScreen {
|
||||
super.onGuiClosed();
|
||||
Client.getInstance().getMouseCursorHandler().disableCursor();
|
||||
}
|
||||
|
||||
public int getFpsLimit() {
|
||||
return 120;
|
||||
}
|
||||
}
|
||||
|
@ -17,9 +17,9 @@ public class C17PacketCustomPayloadMixin {
|
||||
|
||||
@Inject(method = "processPacket(Lnet/minecraft/network/play/INetHandlerPlayServer;)V", at = @At("TAIL"))
|
||||
private void silent$releaseData(INetHandlerPlayServer handler, CallbackInfo ci) {
|
||||
// if (this.data != null) {
|
||||
// this.data.release();
|
||||
// }
|
||||
if (this.data != null) {
|
||||
this.data.release();
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
}
|
||||
|
@ -318,13 +318,13 @@ public abstract class MinecraftMixin implements MinecraftExt {
|
||||
@Overwrite
|
||||
public int getLimitFramerate()
|
||||
{
|
||||
if (this.theWorld == null && this.currentScreen != null) return this.theWorld == null && this.currentScreen != null ? 30 : this.gameSettings.limitFramerate;
|
||||
if (this.theWorld == null && this.currentScreen != null) return this.currentScreen instanceof SilentScreen ? ((SilentScreen) this.currentScreen).getFpsLimit() : 30;
|
||||
|
||||
if(!Display.isActive()) {
|
||||
return 60;
|
||||
}
|
||||
|
||||
return this.theWorld == null && this.currentScreen != null ? 30 : this.gameSettings.limitFramerate;
|
||||
return this.gameSettings.limitFramerate;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user