Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
989e679
Phase 0: Replace inlined core with git submodule
kuba6000 May 10, 2026
8d5805a
Phase 1: Add 1.21.1 core submodule integration - interface layer file…
kuba6000 May 10, 2026
03a8cc0
1.21.1: Phase 2 - reconcile core interfaces, fix all 41 compilation e…
kuba6000 May 10, 2026
86c66b7
CI: add submodules recursive checkout for core submodule
kuba6000 May 10, 2026
b5fbf48
1.21.1: config inversion Phase 5 - NeoForgeConfigBuilder/Value, core …
kuba6000 May 10, 2026
051af60
Update core submodule for command inversion
kuba6000 May 10, 2026
b45911e
1.21.1: command inversion Phase 6 - NeoForgeCommandContext/Registry, …
kuba6000 May 10, 2026
621cd5e
Update core submodule with bugfixes
kuba6000 May 10, 2026
bc924b2
Fix NeoForge config crash - return defaults before config loads
kuba6000 May 10, 2026
980fddb
Update core: lazy rateLimiter init
kuba6000 May 10, 2026
af5a2e4
Fix core syntax error
kuba6000 May 10, 2026
4573b75
Unify to single mod: ae2webintegration (remove ae2webintegration_core…
kuba6000 May 14, 2026
5fec749
Fix Brigadier subcommand registration + green/bold version notification
kuba6000 May 14, 2026
d34df82
1.21.1: full command inversion - ICommandBuilder + NeoForgeCommandBui…
kuba6000 May 14, 2026
32e914e
Fix Brigadier tree - split parent into fluentParent + isRoot
kuba6000 May 14, 2026
a7402de
Core: add unit tests + update AI docs with testing requirements
kuba6000 May 14, 2026
fd264fd
Fix Brigadier tree - two-phase: store nodes as data, build tree at re…
kuba6000 May 14, 2026
6d2bf55
1.21.1: rename Forge/NeoForge→unprefixed (Platform, Config, ConfigBui…
kuba6000 May 14, 2026
48a2b87
spotlessApply
kuba6000 May 14, 2026
f803417
Fix web returns PlayerIdentity instead of GameProfile
kuba6000 May 16, 2026
843be25
Set VERSION_IDENTIFIER to -neoforge-1.21.1 in CommonProxy preInit
kuba6000 May 16, 2026
8ff23c9
Update core submodule (UTF-8 encoding fix)
kuba6000 May 16, 2026
9b7e6c6
Reload configs and use PlayerIdentity
kuba6000 May 30, 2026
8c32b6e
Update CommandContext.java
kuba6000 May 30, 2026
13a49f9
Bump core to eb7a313 and add NeoForge shadow packaging
kuba6000 Jun 9, 2026
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: 2 additions & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'recursive'
- name: Checkout workflows repo
uses: actions/checkout@v4
with:
Expand All @@ -42,7 +43,7 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Compile the mod
run: ./gradlew --build-cache --info --stacktrace assemble
run: ./gradlew --build-cache --info --stacktrace :core:test assemble
- name: Attach compilation artifacts
uses: actions/upload-artifact@v4
with:
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/release-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 32
submodules: 'recursive'

- name: Set up JDK versions
uses: actions/setup-java@v4
Expand Down Expand Up @@ -70,7 +71,12 @@ jobs:
-f tag_name="${RELEASE_VERSION}" \
--jq ".body" > "${CHANGELOG_FILE}"
cat "${CHANGELOG_FILE}"
gh release create "${RELEASE_VERSION}" -F "${CHANGELOG_FILE}" $PRERELEASE ./build/libs/*.jar
mapfile -t RELEASE_JARS < <(find build/libs -maxdepth 1 -name '*.jar' ! -name '*-sources*' ! -name '*-slim*')
if [[ ${#RELEASE_JARS[@]} -eq 0 ]]; then
echo "No production jar found in build/libs"
exit 1
fi
gh release create "${RELEASE_VERSION}" -F "${CHANGELOG_FILE}" $PRERELEASE "${RELEASE_JARS[@]}"
shell: bash
continue-on-error: true
env:
Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "core"]
path = core
url = https://github.com/kuba6000/AE2-Web-Integration.git
branch = core
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id 'java-library'
id 'net.neoforged.moddev' version '2.0.113'
id 'com.gradleup.shadow' version '9.4.2'
id 'idea'
id 'maven-publish'
id 'com.diffplug.spotless' version '7.0.2'
Expand Down Expand Up @@ -72,6 +73,9 @@ afterEvaluate {
}

apply from: "$rootDir/gradle/scripts/jars.gradle"
if (findProperty('usesShadowedDependencies')?.toString()?.toBoolean()) {
apply from: "$rootDir/gradle/scripts/shadow.gradle"
}
apply from: "$rootDir/gradle/scripts/moddevgradle.gradle"
apply from: "$rootDir/gradle/scripts/repositories.gradle"
apply from: "$rootDir/dependencies.gradle"
Expand Down
1 change: 1 addition & 0 deletions core
Submodule core added at eb7a31
30 changes: 30 additions & 0 deletions core_compile_output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

[Incubating] Problems report is available at: file:///C:/github/AE2-Web-Integration/build/reports/problems/problems-report.html
.\gradlew.bat :
At C:\Users\TellingSalamander\AppData\Local\Temp\.ctx-mode-ocpAC8\script.ps1:1 char:35
+ ... hub\AE2-Web-Integration; .\gradlew.bat :core:compileJava 2>&1 | Out-F ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError

FAILURE: Build failed with an exception.

* What went wrong:
Cannot locate tasks that match ':core:compileJava' as project 'core' not found in root project 'ae2webintegration'.

* Try:
> Run gradlew projects to get a list of available projects.
> For more on name expansion, please refer to https://docs.gradle.org/9.1.0/userguide/command_line_interface.html#sec:n
ame_abbreviation in the Gradle documentation.
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to generate a Build Scan (Powered by Develocity).
> Get more help at https://help.gradle.org.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 10.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/9.1.0/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 2s
3 changes: 3 additions & 0 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
dependencies {
compileOnly(libs.jetbrains.annotations)

// Core submodule (pure Java — no NeoForge/MC/AE2 references)
implementation project(':core')

// AE2
implementation(neoforge.ae2)
compileOnly(neoforge.ae2wtlib)
Expand Down
5 changes: 5 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ mod_license = LGPL-3.0 license
mod_url = https://github.com/kuba6000/AE2-Web-Integration
mod_issue_tracker = https://github.com/kuba6000/AE2-Web-Integration/issues/
maven_group =

# Shadow core submodule into the production jar (see gradle/scripts/shadow.gradle)
usesShadowedDependencies = true
minimizeShadowedDependencies = false
relocateShadowedDependencies = true
6 changes: 3 additions & 3 deletions gradle/scripts/jars.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ java {
withSourcesJar()
}

jar.archiveClassifier = "dev"

base {
archivesName = "${project.name}" // -${libs.versions.minecraft.get()}
}

afterEvaluate {
jar.archiveClassifier = ""
if (!findProperty('usesShadowedDependencies')?.toString()?.toBoolean()) {
jar.archiveClassifier = ''
}
tasks.withType(org.gradle.jvm.tasks.Jar).configureEach {
destinationDirectory = file('build/libs/')
manifest.attributes([
Expand Down
49 changes: 49 additions & 0 deletions gradle/scripts/shadow.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
def shadowRelocationPrefix = 'pl.kuba6000.ae2webintegration.shadow'

configurations {
coreShadow {
canBeConsumed = false
canBeResolved = true
}
}

dependencies {
coreShadow(project(':core')) {
transitive = true
}
}

tasks.named('shadowJar').configure {
dependsOn(':core:jar')
archiveClassifier = ''
configurations = [project.configurations.coreShadow]

dependencies {
exclude(dependency('org.apache.logging.log4j:log4j-api:.*'))
exclude(dependency('org.apache.logging.log4j:log4j-core:.*'))
}

if (findProperty('relocateShadowedDependencies')?.toString()?.toBoolean() != false) {
relocate('com.google', "${shadowRelocationPrefix}.com.google")
relocate('org.apache.commons', "${shadowRelocationPrefix}.org.apache.commons")
relocate('commons-io', "${shadowRelocationPrefix}.commons-io")
relocate('club.minnced', "${shadowRelocationPrefix}.club.minnced")
relocate(
'pl.kuba6000.ae2webintegration.core',
"${shadowRelocationPrefix}.pl.kuba6000.ae2webintegration.core")
}
}

tasks.named('jar', Jar).configure {
enabled = false
finalizedBy(tasks.named('shadowJar'))
}

configurations.runtimeElements.outgoing.artifacts.clear()
configurations.apiElements.outgoing.artifacts.clear()
configurations.runtimeElements.outgoing.artifact(tasks.named('shadowJar'))
configurations.apiElements.outgoing.artifact(tasks.named('shadowJar'))

configurations.named('shadowRuntimeElements') {
outgoing.artifacts.clear()
}
2 changes: 2 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ dependencyResolutionManagement {
}

rootProject.name = "${mod_id}"

include ':core'
Original file line number Diff line number Diff line change
@@ -1,41 +1,75 @@
package pl.kuba6000.ae2webintegration.ae2interface;

import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.fml.ModContainer;
import net.neoforged.fml.ModLoadingContext;
import net.neoforged.fml.common.EventBusSubscriber;
import net.neoforged.fml.common.Mod;
import net.neoforged.fml.config.ModConfig;
import net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent;
import net.neoforged.neoforge.event.RegisterCommandsEvent;
import net.neoforged.neoforge.event.server.ServerStartedEvent;
import net.neoforged.neoforge.event.server.ServerStoppingEvent;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import pl.kuba6000.ae2webintegration.ae2interface.commands.CommandBuilder;
import pl.kuba6000.ae2webintegration.ae2interface.config.Config;
import pl.kuba6000.ae2webintegration.ae2interface.implementations.AE;
import pl.kuba6000.ae2webintegration.ae2interface.platform.Platform;
import pl.kuba6000.ae2webintegration.ae2interface.proxy.CommonProxy;
import pl.kuba6000.ae2webintegration.core.CommandBootstrap;
import pl.kuba6000.ae2webintegration.core.api.IAEWebInterface;

@Mod(value = AE2WebIntegration.MODID)
@EventBusSubscriber(modid = AE2WebIntegration.MODID)
public class AE2WebIntegration {

public static final String MODID = "ae2webintegration_interface";
public static final String MODID = "ae2webintegration";
public static final Logger LOG = LogManager.getLogger(MODID);

private static final CommonProxy PROXY = new CommonProxy();

public AE2WebIntegration() {
// ModLoadingContext.get()
// .registerExtensionPoint(
// IExtensionPoint.DisplayTest.class,
// () -> new IExtensionPoint.DisplayTest(() -> NetworkConstants.IGNORESERVERONLY, (a, b) -> true));
// SecurityCache.registerOpPlayer(
// IAEWebInterface.getInstance()
// .getAEWebGameProfile());
Platform platform = new Platform();
String version = ModLoadingContext.get()
.getActiveContainer()
.getModInfo()
.getVersion()
.toString();

// Register config before anything that depends on it
ModContainer container = ModLoadingContext.get()
.getActiveContainer();
container.registerConfig(ModConfig.Type.COMMON, Config.SPEC, "ae2webintegration/ae2webintegration.toml");

// Delegate remaining init to the proxy
PROXY.preInit(platform, version);
}

@EventBusSubscriber(modid = MODID, bus = EventBusSubscriber.Bus.MOD)
private static class eventHandler {
private static class ModEventHandler {

@SubscribeEvent
public static void commonSetup(FMLCommonSetupEvent event) {
// This is where you can do common setup tasks
IAEWebInterface.getInstance()
.initAEInterface(AE.instance);
}
}

@SubscribeEvent
public static void commandsRegister(RegisterCommandsEvent event) {
CommandBootstrap.init(new CommandBuilder(event.getDispatcher()));
}

@SubscribeEvent
public static void serverStarted(ServerStartedEvent event) {
PROXY.onServerStarted();
}

@SubscribeEvent
public static void serverStopping(ServerStoppingEvent event) {
PROXY.onServerStopping();
}
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
package pl.kuba6000.ae2webintegration.core;
package pl.kuba6000.ae2webintegration.ae2interface;

import static pl.kuba6000.ae2webintegration.core.AE2WebIntegration.MODID;

import net.minecraft.ChatFormatting;
import net.minecraft.network.chat.Component;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.entity.player.Player;
import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.fml.common.EventBusSubscriber;
import net.neoforged.neoforge.event.entity.player.PlayerEvent;
import net.neoforged.neoforge.event.tick.ServerTickEvent;

import pl.kuba6000.ae2webintegration.core.AE2Controller;
import pl.kuba6000.ae2webintegration.core.UpdateNotifier;
import pl.kuba6000.ae2webintegration.core.ae2request.sync.ISyncedRequest;
import pl.kuba6000.ae2webintegration.core.utils.VersionChecker;
import pl.kuba6000.ae2webintegration.core.api.PlayerIdentity;

@EventBusSubscriber(modid = MODID)
@EventBusSubscriber(modid = AE2WebIntegration.MODID)
public class FMLEventHandler {

@SubscribeEvent
Expand All @@ -31,13 +29,11 @@ public static void tick(ServerTickEvent.Pre event) {
@SubscribeEvent
public static void onPlayerLoggedIn(PlayerEvent.PlayerLoggedInEvent event) {
Player player = event.getEntity();
if (!(player instanceof ServerPlayer)) return;
if (Config.INSTANCE.CHECK_FOR_UPDATES.get() && VersionChecker.isOutdated() && player.hasPermissions(4)) {
player.sendSystemMessage(
Component.literal(
ChatFormatting.GREEN.toString() + ChatFormatting.BOLD
+ "----> AE2WebIntegration -> New version detected! Consider updating at https://github.com/kuba6000/AE2-Web-Integration/releases/latest"));
}
}
if (!(player instanceof ServerPlayer serverPlayer)) return;
if (!serverPlayer.hasPermissions(4)) return;

PlayerIdentity identity = new PlayerIdentity(serverPlayer.getUUID(), serverPlayer.getScoreboardName());
PlayerMessenger messenger = new PlayerMessenger();
UpdateNotifier.notifyPlayerIfOutdated(messenger, identity);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package pl.kuba6000.ae2webintegration.ae2interface;

import net.minecraft.ChatFormatting;
import net.minecraft.network.chat.Component;
import net.minecraft.server.level.ServerPlayer;
import net.neoforged.neoforge.server.ServerLifecycleHooks;

import pl.kuba6000.ae2webintegration.core.api.IPlayerMessenger;
import pl.kuba6000.ae2webintegration.core.api.PlayerIdentity;

public class PlayerMessenger implements IPlayerMessenger {

@Override
public void sendMessage(PlayerIdentity player, String message) {
if (ServerLifecycleHooks.getCurrentServer() == null) return;
ServerPlayer serverPlayer = ServerLifecycleHooks.getCurrentServer()
.getPlayerList()
.getPlayer(player.uuid);
if (serverPlayer != null) {
serverPlayer.sendSystemMessage(
Component.literal(message)
.withStyle(ChatFormatting.GREEN, ChatFormatting.BOLD));
}
}
}
Loading
Loading