mirror of
https://github.com/TeamMidnightDust/MidnightLib.git
synced 2025-12-16 01:15:08 +01:00
Merge branch 'architectury-1.21.1' into temp/1.21-backport
This commit is contained in:
@@ -37,11 +37,14 @@ public abstract class MixinOptionsScreen extends Screen {
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(at = @At("TAIL"), method = "refreshWidgetPositions")
|
||||
|
||||
|
||||
@Inject(at = @At("TAIL"), method = "initTabNavigation")
|
||||
public void midnightlib$onResize(CallbackInfo ci) {
|
||||
if (shouldShowButton()) this.midnightlib$setButtonPos();
|
||||
}
|
||||
|
||||
|
||||
@Unique
|
||||
public void midnightlib$setButtonPos() {
|
||||
midnightlib$button.setPosition(layout.getWidth() / 2 + 158, layout.getY() + layout.getFooterHeight() - 4);
|
||||
|
||||
@@ -293,9 +293,9 @@ public abstract class MidnightConfig {
|
||||
super.tick();
|
||||
if (prevTab != null && prevTab != tabManager.getCurrentTab()) {
|
||||
prevTab = tabManager.getCurrentTab();
|
||||
updateList(); list.setScrollY(0);
|
||||
updateList(); list.setScrollAmount(0);
|
||||
}
|
||||
scrollProgress = list.getScrollY();
|
||||
scrollProgress = list.getScrollAmount();
|
||||
for (EntryInfo info : entries.values()) info.updateFieldValue();
|
||||
updateButtons();
|
||||
if (reloadScreen) { updateList(); reloadScreen = false; }
|
||||
@@ -439,7 +439,7 @@ public abstract class MidnightConfig {
|
||||
if (!info.conditionsMet) widgets.forEach(w -> w.active = false);
|
||||
this.list.addButton(widgets, name, info);
|
||||
} else this.list.addButton(List.of(), name, info);
|
||||
} list.setScrollY(scrollProgress);
|
||||
} list.setScrollAmount(scrollProgress);
|
||||
updateButtons();
|
||||
}
|
||||
}
|
||||
@@ -459,7 +459,9 @@ public abstract class MidnightConfig {
|
||||
@Override
|
||||
protected void drawHeaderAndFooterSeparators(DrawContext context) {
|
||||
if (renderHeaderSeparator) super.drawHeaderAndFooterSeparators(context);
|
||||
else context.drawTexture(RenderPipelines.GUI_TEXTURED, this.client.world == null ? Screen.FOOTER_SEPARATOR_TEXTURE : Screen.INWORLD_FOOTER_SEPARATOR_TEXTURE, this.getX(), this.getBottom(), 0, 0, this.getWidth(), 2, 32, 2);
|
||||
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);
|
||||
RenderSystem.disableBlend(); }
|
||||
}
|
||||
public void addButton(List<ClickableWidget> buttons, Text text, EntryInfo info) { this.addEntry(new ButtonEntry(buttons, text, info)); }
|
||||
public void clear() { this.clearEntries(); }
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
org.gradle.jvmargs=-Xmx4096M
|
||||
|
||||
minecraft_version=1.21.6
|
||||
supported_versions=
|
||||
yarn_mappings=1.21.6+build.1
|
||||
minecraft_version=1.21
|
||||
supported_versions=1.21.1
|
||||
yarn_mappings=1.21+build.1
|
||||
enabled_platforms=fabric,neoforge
|
||||
|
||||
archives_base_name=midnightlib
|
||||
@@ -12,10 +12,10 @@ release_type=release
|
||||
curseforge_id=488090
|
||||
modrinth_id=codAaoxh
|
||||
|
||||
fabric_loader_version=0.16.14
|
||||
fabric_api_version=0.127.0+1.21.6
|
||||
fabric_loader_version=0.16.10
|
||||
fabric_api_version=0.115.0+1.21.1
|
||||
|
||||
neoforge_version=21.6.0-beta
|
||||
neoforge_version=21.0.167
|
||||
yarn_mappings_patch_neoforge_version = 1.21+build.4
|
||||
|
||||
mod_menu_version = 9.0.0
|
||||
Reference in New Issue
Block a user