Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ jobs:
- version: 26.2-neoforge
java: '25'
beta: true
- version: 26.1.2-neoforge
java: '25'
beta: true
steps:
- uses: actions/checkout@v4

Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ jobs:
env:
GRADLE_OPTS: -Xmx2g

- name: Build 26.1.2 NeoForge (beta)
if: steps.check.outputs.release == 'true'
continue-on-error: true
run: ./gradlew :26.1.2-neoforge:build --no-daemon
env:
GRADLE_OPTS: -Xmx2g

# Gate distribution on the full launch/server verification: nothing is
# tagged or shipped unless the mod actually boots.
- name: Launch test (Fabric)
Expand Down Expand Up @@ -182,6 +189,22 @@ jobs:
changelog-file: CHANGELOG.md
files: versions/26.2-neoforge/build/libs/!(*-@(dev|sources|javadoc)).jar

- name: Publish 26.1.2 NeoForge to Modrinth (beta)
if: steps.check.outputs.release == 'true'
continue-on-error: true
uses: Kir-Antipov/mc-publish@v3.3
with:
modrinth-id: tDw1xQja
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
modrinth-featured: false
name: WebGUI ${{ steps.meta.outputs.version }} (26.1.2 NeoForge, beta)
version: ${{ steps.meta.outputs.version }}+mc26.1.2-neoforge
version-type: beta
loaders: neoforge
game-versions: '26.1.2'
changelog-file: CHANGELOG.md
files: versions/26.1.2-neoforge/build/libs/!(*-@(dev|sources|javadoc)).jar

# mc-publish can report success without actually creating a version (e.g.
# a token lacking the "Create versions" scope). Confirm every version is
# really on Modrinth so a green run can't lie.
Expand Down
5 changes: 3 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ stonecutter {
centralScript = 'build.gradle'

create(rootProject) {
// 26.2-neoforge is BETA: MC 26.2 + NeoForge beta; no Fabric target yet
// because Yarn mappings for 26.x are not published.
// MC 26 (NeoForge only — Yarn mappings for 26.x are not published).
// 26.2 is still a NeoForge beta; 26.1 is the released line.
version '26.2-neoforge', '26.2-neoforge'
version '26.1.2-neoforge', '26.1.2-neoforge'
version '1.21.11-fabric', '1.21.11-fabric'
version '1.21.11-neoforge', '1.21.11-neoforge'
version '1.21.1-fabric', '1.21.1-fabric'
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/land/webgui/WebGUIClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ private static void handleOpenPayload(Minecraft client, int mode, String url) {
}
String u = url == null || url.isBlank() ? StartUrls.primary() : url;
if (mode == WebviewNetworking.MODE_GUI) {
//? if >=26 {
//? if >=26.2-neoforge {
client.gui.setScreen(new WebViewScreen(u));
//? } else {
client.setScreen(new WebViewScreen(u));
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/land/webgui/WebGUIKeys.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public static void tick(MinecraftClient client) {
if (!WebHudOverlay.isHudVisible() || client.currentScreen != null) {
//? } else {
/*while (hudInteractive.consumeClick()) {
//? if >=26 {
//? if >=26.2-neoforge {
if (!WebHudOverlay.isHudVisible() || client.gui.screen() != null) {
//? } else {
if (!WebHudOverlay.isHudVisible() || client.screen != null) {
Expand All @@ -127,7 +127,7 @@ private static void tryOpenMainMenu(MinecraftClient client) {
}
//? } else {
/*private static void tryOpenMainMenu(Minecraft client) {
//? if >=26 {
//? if >=26.2-neoforge {
if (client.gui.screen() instanceof WebViewScreen) {
//? } else {
if (client.screen instanceof WebViewScreen) {
Expand All @@ -144,7 +144,7 @@ private static void tryOpenMainMenu(MinecraftClient client) {
}
return;
}
//? if >=26 {
//? if >=26.2-neoforge {
client.gui.setScreen(new WebViewScreen(WebGUIMainMenuUrl.getUrl()));
//? } else {
client.setScreen(new WebViewScreen(WebGUIMainMenuUrl.getUrl()));
Expand Down
16 changes: 8 additions & 8 deletions src/main/java/land/webgui/WebHudOverlay.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public static boolean shouldDeliverHudBrowserInput(MinecraftClient client) {
//? if fabric {
boolean hasGui1 = client.currentScreen != null;
//? } else {
/*//? if >=26 {
/*//? if >=26.2-neoforge {
boolean hasGui1 = client.gui.screen() != null;
//? } else {
boolean hasGui1 = client.screen != null;
Expand All @@ -92,7 +92,7 @@ public static boolean shouldForwardHudArrowKeys(MinecraftClient client) {
//? if fabric {
boolean hasGui2 = client.currentScreen != null;
//? } else {
/*//? if >=26 {
/*//? if >=26.2-neoforge {
boolean hasGui2 = client.gui.screen() != null;
//? } else {
boolean hasGui2 = client.screen != null;
Expand All @@ -118,7 +118,7 @@ public static boolean shouldBlockVanillaWorldInteractions(MinecraftClient client
//? if fabric {
if (client == null || client.currentScreen != null) {
//? } else {
/*//? if >=26 {
/*//? if >=26.2-neoforge {
if (client == null || client.gui.screen() != null) {
//? } else {
if (client == null || client.screen != null) {
Expand All @@ -144,7 +144,7 @@ public static void tickCursor(MinecraftClient client) {
//? if fabric {
if (client.currentScreen != null) {
//? } else {
/*//? if >=26 {
/*//? if >=26.2-neoforge {
if (client.gui.screen() != null) {
//? } else {
if (client.screen != null) {
Expand Down Expand Up @@ -191,13 +191,13 @@ public static void applyServerOpen(MinecraftClient client, String url) {
//? if fabric {
if (client.currentScreen != null) {
//? } else {
/*//? if >=26 {
/*//? if >=26.2-neoforge {
if (client.gui.screen() != null) {
//? } else {
if (client.screen != null) {
//? }*/
//? }
//? if >=26 {
//? if >=26.2-neoforge {
/*client.gui.setScreen(null);*/
//? } else {
client.setScreen(null);
Expand All @@ -221,7 +221,7 @@ public static void toggleHud(MinecraftClient client) {
//? if fabric {
if (client.currentScreen instanceof WebViewScreen) {
//? } else {
/*//? if >=26 {
/*//? if >=26.2-neoforge {
if (client.gui.screen() instanceof WebViewScreen) {
//? } else {
if (client.screen instanceof WebViewScreen) {
Expand Down Expand Up @@ -268,7 +268,7 @@ public static void toggleInteractive(MinecraftClient client) {
//? if fabric {
boolean hasGui7 = client.currentScreen != null;
//? } else {
/*//? if >=26 {
/*//? if >=26.2-neoforge {
boolean hasGui7 = client.gui.screen() != null;
//? } else {
boolean hasGui7 = client.screen != null;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/land/webgui/WebviewPageToClientBridge.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private static void dispatch(String request, CefQueryCallback callback) {
if (mc.currentScreen instanceof WebViewScreen) {
mc.currentScreen.close();
//? } else {
/*//? if >=26 {
/*//? if >=26.2-neoforge {
if (mc.gui.screen() instanceof WebViewScreen) {
mc.gui.screen().onClose();
//? } else {
Expand Down
6 changes: 6 additions & 0 deletions versions/26.1.2-neoforge/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
minecraft_version=26.1.2
loader_type=neoforge
neoforge_version=26.1.2.86
mcef_version=2.2.0-26.1.1-neoforge
minecraft_range=[26.1.2,26.1.2]
java_version=25
Loading