MidnightLib 1.6.4 (Port to 1.21.2/3)

- Forgot to push this earlier, oops
This commit is contained in:
Martin Prokoph
2024-10-29 22:14:54 +01:00
parent 07e6049fa0
commit 18209609cb
4 changed files with 11 additions and 10 deletions

View File

@@ -3,7 +3,7 @@ import groovy.json.JsonOutput
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "1.6-SNAPSHOT" apply false
id "dev.architectury.loom" version "1.7-SNAPSHOT" apply false
id "me.shedaniel.unified-publishing" version "0.1.+" apply false
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
}

View File

@@ -37,7 +37,7 @@ public abstract class MixinOptionsScreen extends Screen {
}
}
@Inject(at = @At("TAIL"), method = "initTabNavigation")
@Inject(at = @At("TAIL"), method = "refreshWidgetPositions")
public void midnightlib$onResize(CallbackInfo ci) {
if (shouldShowButton()) this.midnightlib$setButtonPos();
}

View File

@@ -9,6 +9,7 @@ import net.minecraft.client.MinecraftClient; import net.minecraft.client.font.Te
import net.minecraft.client.gui.Element; import net.minecraft.client.gui.Selectable; import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.tab.GridScreenTab; import net.minecraft.client.gui.tab.Tab; import net.minecraft.client.gui.tab.TabManager;
import net.minecraft.client.gui.tooltip.Tooltip; import net.minecraft.client.gui.widget.*;
import net.minecraft.client.render.RenderLayer;
import net.minecraft.client.resource.language.I18n;
import net.minecraft.registry.Registries;
import net.minecraft.screen.ScreenTexts;
@@ -418,7 +419,7 @@ public abstract class MidnightConfig {
protected void drawHeaderAndFooterSeparators(DrawContext context) {
if (renderHeaderSeparator) super.drawHeaderAndFooterSeparators(context);
else { RenderSystem.enableBlend();
context.drawTexture(this.client.world == null ? Screen.FOOTER_SEPARATOR_TEXTURE : Screen.INWORLD_FOOTER_SEPARATOR_TEXTURE, this.getX(), this.getBottom(), 0.0F, 0.0F, this.getWidth(), 2, 32, 2);
context.drawTexture(RenderLayer::getGuiTextured, this.client.world == null ? Screen.FOOTER_SEPARATOR_TEXTURE : Screen.INWORLD_FOOTER_SEPARATOR_TEXTURE, this.getX(), this.getBottom(), 0.0F, 0.0F, this.getWidth(), 2, 32, 2);
RenderSystem.disableBlend(); }
}
public void addButton(List<ClickableWidget> buttons, Text text, EntryInfo info) { this.addEntry(new ButtonEntry(buttons, text, info)); }

View File

@@ -1,21 +1,21 @@
org.gradle.jvmargs=-Xmx4096M
minecraft_version=1.21
supported_versions=1.21.1
yarn_mappings=1.21+build.1
minecraft_version=1.21.3
supported_versions=1.21.2
yarn_mappings=1.21.3+build.2
enabled_platforms=fabric,neoforge
archives_base_name=midnightlib
mod_version=1.6.3
mod_version=1.6.4
maven_group=eu.midnightdust
release_type=release
curseforge_id=488090
modrinth_id=codAaoxh
fabric_loader_version=0.15.11
fabric_api_version=0.100.1+1.21
fabric_loader_version=0.16.7
fabric_api_version=0.106.1+1.21.3
neoforge_version=21.0.143
neoforge_version=21.3.3-beta
yarn_mappings_patch_neoforge_version = 1.21+build.4
quilt_loader_version=0.19.0-beta.18