(feature) hide world borders in fps boost

This commit is contained in:
kirillsaint 2024-01-26 13:17:15 +06:00
parent a57690e189
commit 0c5ea8e112
2 changed files with 10 additions and 0 deletions

View File

@ -9,8 +9,10 @@ import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.silentclient.client.Client;
import net.silentclient.client.event.impl.RenderTickEvent; import net.silentclient.client.event.impl.RenderTickEvent;
import net.silentclient.client.mods.render.BlockOverlayMod; import net.silentclient.client.mods.render.BlockOverlayMod;
import net.silentclient.client.mods.settings.FPSBoostMod;
import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Overwrite; import org.spongepowered.asm.mixin.Overwrite;
@ -45,4 +47,11 @@ public abstract class RenderGlobalMixin {
{ {
BlockOverlayMod.drawSelectionBox(player, movingObjectPositionIn, p_72731_3_, partialTicks); BlockOverlayMod.drawSelectionBox(player, movingObjectPositionIn, p_72731_3_, partialTicks);
} }
@Inject(method = "renderWorldBorder", at = @At("HEAD"), cancellable = true)
public void cancelRenderWorldBorder(Entity entityIn, float partialTicks, CallbackInfo ci) {
if(Client.getInstance().getSettingsManager().getSettingByClass(FPSBoostMod.class, "Hide World Border").getValBoolean()) {
ci.cancel();
}
}
} }

View File

@ -76,6 +76,7 @@ public class FPSBoostMod extends Mod {
this.addBooleanSetting("Hide Lava Particles", this, false); // ready this.addBooleanSetting("Hide Lava Particles", this, false); // ready
this.addBooleanSetting("Hide Mob in Spawner", this, false); // ready this.addBooleanSetting("Hide Mob in Spawner", this, false); // ready
this.addBooleanSetting("Hide Spawner Particles", this, false); // ready this.addBooleanSetting("Hide Spawner Particles", this, false); // ready
this.addBooleanSetting("Hide World Border", this, false); // ready
this.addSliderSetting("Player Render Distance", this, 64, 1, 64, true); // ready this.addSliderSetting("Player Render Distance", this, 64, 1, 64, true); // ready
this.addSliderSetting("Passive Entity Render Distance", this, 64, 1, 64, true); // ready this.addSliderSetting("Passive Entity Render Distance", this, 64, 1, 64, true); // ready
this.addSliderSetting("Hostile Entity Render Distance", this, 64, 1, 64, true); // ready this.addSliderSetting("Hostile Entity Render Distance", this, 64, 1, 64, true); // ready