[vintage] Increase blend radius to 14 and fix compile of 1.12.2 #24

Merged
embeddedt merged 17 commits from karnatour/celeritas:stonecutter into stonecutter 2026-03-12 19:23:39 -04:00
2 changed files with 6 additions and 8 deletions
Showing only changes of commit 56a5b76dd4 - Show all commits

No files matched your search

@@ -62,12 +62,7 @@ public class SodiumGameOptionPages {
.setTooltip(ComponentUtil.translatable("sodium.options.gui_scale.tooltip"))
.setControl(option -> new SliderControl(option, 0, MuiGuiScaleHook.getMaxGuiScale(), 1, ControlValueFormatter.guiScale()))
.setBinding((opts, value) -> {
// Convert Auto to the highest possible scale, because on 1.12.2 Auto breaks ScrollableFrame
if (value == 0) {
opts.guiScale = MuiGuiScaleHook.getMaxGuiScale();
} else {
opts.guiScale = value;
}
opts.guiScale = value;
Minecraft mc = Minecraft.getMinecraft();
mc.resize(mc.displayWidth, mc.displayHeight);
@@ -3,6 +3,7 @@ package org.taumc.celeritas.impl.gui.compat;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.ITextComponent;
import org.lwjgl.opengl.GL20C;
@@ -27,9 +28,11 @@ public class GuiGraphics {
public void enableScissor(int x, int y, int x2, int y2) {
int width = x2 - x + 1;
int height = y2 - y + 1;
int scale = Minecraft.getMinecraft().gameSettings.guiScale;
var mc = Minecraft.getMinecraft();
ScaledResolution scaledresolution = new ScaledResolution(mc);
int scale = scaledresolution.getScaleFactor();
GL20C.glEnable(3089);
GL20C.glScissor(x * scale, Minecraft.getMinecraft().displayHeight - (y + height) * scale, width * scale, height * scale);
GL20C.glScissor(x * scale, mc.displayHeight - (y + height) * scale, width * scale, height * scale);
}
public void disableScissor() {