Skip to content

Commit 36aa2d4

Browse files
committed
Faster starting
1 parent dbf8a94 commit 36aa2d4

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

simpleclient-1.19.4/src/main/java/simpleclient/feature/FeatureManagerImpl.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public FeatureManagerImpl() {
2828
@Override
2929
public void init() {
3030
addFeature(new FPS());
31+
addFeature(new PerformanceBoost());
3132
super.init();
3233
}
3334
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package simpleclient.feature;
2+
3+
public class PerformanceBoost extends EnableableFeature {
4+
public static PerformanceBoost INSTANCE = new PerformanceBoost();
5+
public PerformanceBoost() {
6+
super(FeatureType.FPS);
7+
}
8+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package simpleclient.mixin;
2+
3+
import net.minecraft.SharedConstants;
4+
import org.spongepowered.asm.mixin.Mixin;
5+
import org.spongepowered.asm.mixin.injection.At;
6+
import org.spongepowered.asm.mixin.injection.Inject;
7+
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
8+
import simpleclient.feature.PerformanceBoost;
9+
10+
@Mixin(SharedConstants.class)
11+
public class SharedConstantsMixin {
12+
@Inject(at = @At("HEAD"), method = "enableDataFixerOptimizations")
13+
private static void enableDataFixerOptimizations(CallbackInfo ci) {
14+
if (PerformanceBoost.INSTANCE.isEnabled()) ci.cancel();
15+
}
16+
}

0 commit comments

Comments
 (0)