chore: update to 1.20.3
This commit is contained in:
parent
746a8e2536
commit
20af9fb9a6
|
@ -5,10 +5,10 @@ plugins {
|
|||
allprojects { group = "io.gitlab.jfronny.libjf" }
|
||||
subprojects { version = rootProject.version }
|
||||
|
||||
val fabricVersion by extra("0.89.1+1.20.2")
|
||||
val fabricVersion by extra("0.91.1+1.20.3")
|
||||
val commonsVersion by extra("1.5-SNAPSHOT")
|
||||
val gsonCompileVersion by extra("1.4-SNAPSHOT")
|
||||
val modmenuVersion by extra("8.0.0-beta.2")
|
||||
val modmenuVersion by extra("9.0.0-pre.1")
|
||||
|
||||
val annotationsVersion by extra("24.0.1")
|
||||
val javapoetVersion by extra("1.13.0")
|
||||
|
@ -16,9 +16,9 @@ val javapoetVersion by extra("1.13.0")
|
|||
val baseCommonsModules by extra(listOf("http-client", "io", "logging", "logging-slf4j", "serialize", "serialize-gson"))
|
||||
|
||||
jfMod {
|
||||
minecraftVersion = "1.20.2"
|
||||
minecraftVersion = "1.20.3"
|
||||
yarn("build.1")
|
||||
loaderVersion = "0.14.22"
|
||||
loaderVersion = "0.15.0"
|
||||
|
||||
modrinth {
|
||||
projectId = "libjf"
|
||||
|
|
|
@ -34,7 +34,7 @@ public class TinyConfigTab implements Tab {
|
|||
}
|
||||
|
||||
// Sizing is also done in TinyConfigScreen. Keep these in sync!
|
||||
this.list = new EntryListWidget(screen.getClient(), textRenderer, screen.width, screen.height - 68, 32, screen.height - 36);
|
||||
this.list = new EntryListWidget(screen.getClient(), textRenderer, screen.width, screen.height - 68, 32);
|
||||
|
||||
String tooltipPath = config.getTranslationPrefix() + "tooltip";
|
||||
if (JfConfigSafe.TRANSLATION_SUPPLIER.apply(tooltipPath) != null) {
|
||||
|
|
|
@ -17,12 +17,7 @@ public class TinyConfigTabWrapper extends ClickableWidget {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void render(DrawContext context, int mouseX, int mouseY, float delta) {
|
||||
renderButton(context, mouseX, mouseY, delta);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderButton(DrawContext context, int mouseX, int mouseY, float delta) {
|
||||
public void renderWidget(DrawContext context, int mouseX, int mouseY, float delta) {
|
||||
throw new RuntimeException("TinyConfigTabWrapper must not be rendered");
|
||||
}
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@ public class EntryListWidget extends ElementListWidget<EntryListWidget.ConfigEnt
|
|||
private final TextRenderer textRenderer;
|
||||
private final boolean background;
|
||||
|
||||
public EntryListWidget(MinecraftClient client, TextRenderer tr, int width, int height, int top, int bottom) {
|
||||
super(client, width, height, top, bottom, 25);
|
||||
public EntryListWidget(MinecraftClient client, TextRenderer tr, int width, int height, int top) {
|
||||
super(client, width, height, top, 25);
|
||||
this.centerListVertically = false;
|
||||
textRenderer = tr;
|
||||
background = client.world == null;
|
||||
|
@ -70,8 +70,10 @@ public class EntryListWidget extends ElementListWidget<EntryListWidget.ConfigEnt
|
|||
}
|
||||
|
||||
public void refreshGrid(ScreenRect tabArea) {
|
||||
updateSize(tabArea.width(), tabArea.height(), tabArea.getTop(), tabArea.getBottom());
|
||||
setLeftPos(tabArea.getLeft());
|
||||
setWidth(tabArea.width());
|
||||
setHeight(tabArea.height());
|
||||
setX(tabArea.getLeft());
|
||||
setY(tabArea.getTop());
|
||||
for (int len = getEntryCount() - 1, i = len; i >= 0; i--) {
|
||||
getEntry(i).reflow(width, height);
|
||||
}
|
||||
|
@ -84,13 +86,13 @@ public class EntryListWidget extends ElementListWidget<EntryListWidget.ConfigEnt
|
|||
|
||||
// Background texture at the top of the screen
|
||||
context.setShaderColor(0.25f, 0.25f, 0.25f, 1.0f);
|
||||
context.drawTexture(Screen.OPTIONS_BACKGROUND_TEXTURE, left, 0, 0.0f, 0.0f, width, top, 32, 32);
|
||||
context.drawTexture(Screen.OPTIONS_BACKGROUND_TEXTURE, getX(), 0, 0.0f, 0.0f, width, getY(), 32, 32);
|
||||
context.setShaderColor(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
|
||||
// Gradient at the top of the screen
|
||||
context.fillGradient(RenderLayer.getGuiOverlay(), left, top, right, top + 4, 0xff000000, 0x00000000, 0);
|
||||
context.fillGradient(RenderLayer.getGuiOverlay(), getX(), getY(), getRight(), getY() + 4, 0xff000000, 0x00000000, 0);
|
||||
// Gradient at the bottom of the screen
|
||||
if (getScrollAmount() < getMaxScroll()) context.fillGradient(RenderLayer.getGuiOverlay(), left, bottom - 4, right, bottom, 0x00000000, 0xff000000, 0);
|
||||
if (getScrollAmount() < getMaxScroll()) context.fillGradient(RenderLayer.getGuiOverlay(), getX(), getBottom() - 4, getRight(), getBottom(), 0x00000000, 0xff000000, 0);
|
||||
}
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
|
|
|
@ -9,8 +9,8 @@ import net.minecraft.client.util.math.MatrixStack;
|
|||
import java.util.List;
|
||||
|
||||
public class PresetListWidget extends ElementListWidget<PresetListWidget.PresetEntry> {
|
||||
public PresetListWidget(MinecraftClient client, int i, int j, int k, int l, int m) {
|
||||
super(client, i, j, k, l, m);
|
||||
public PresetListWidget(MinecraftClient client, int width, int height, int top, int itemHeight) {
|
||||
super(client, width, height, top, itemHeight);
|
||||
setRenderBackground(client.world == null);
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ public class PresetsScreen extends Screen {
|
|||
@Override
|
||||
protected void init() {
|
||||
super.init();
|
||||
PresetListWidget list = new PresetListWidget(this.client, this.width, this.height, 32, this.height - 32, 25);
|
||||
PresetListWidget list = new PresetListWidget(this.client, this.width, this.height, 32, 25);
|
||||
for (Map.Entry<String, Runnable> entry : config.getPresets().entrySet()) {
|
||||
list.addButton(ButtonWidget.builder(Text.translatable(entry.getKey()),
|
||||
button -> {
|
||||
|
|
Loading…
Reference in New Issue