Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
cc3035c
fabric: split into common / intermediary / official + 26.X aggregator
Axionize May 23, 2026
43ae476
fabric: same codex review #1 fixes mirrored on Grim side
Axionize May 23, 2026
c05a8b4
fabric-intermediary: add minecraft <26 upper bound
Axionize May 23, 2026
d992383
fabric-intermediary mcXXXX: add minecraft <26 upper bounds
Axionize May 23, 2026
7b86f34
deps: bump packetevents to 2.12.2+6dca3cc00 (fabric pre-Via listener …
Axionize May 24, 2026
7087a71
fabric-official: wire scaffold entrypoint + mc261 chain participant
Axionize May 24, 2026
bbe7c47
deps: bump PE to 2d8b75d21 (erased-bridge); restore grimac modid via …
Axionize May 24, 2026
2de3ba4
deps: bump PE to 139086285 (fabric-official Mojang-named, 26.1.2 veri…
Axionize May 24, 2026
cc89bee
fabric: lift PE JiJ to aggregator level — single jar, no per-MC PE ga…
Axionize May 24, 2026
c514fed
fabric-official: document the real 26.X blocker (intermediary-bound d…
Axionize May 24, 2026
ca83257
fabric: address Grim codex review — drop PE-api dup + add repo.grim.ac
Axionize May 24, 2026
00d6c2a
test: add fabric-1.21.11 flight smoke scenario to repo
Axionize May 24, 2026
d4f7bb5
fabric: aggregator depends.minecraft → union to actually-supported ra…
Axionize May 24, 2026
af7aa9d
ci: bump build JDK from 21 → 25 for fabric-official LoomNoRemap
Axionize May 24, 2026
cb02f33
fabric-official: tighten 26.X range + declare PE depend (codex r3)
Axionize May 24, 2026
39cfd56
fabric-official: document the intentional empty-stub-mapping pattern
Axionize May 24, 2026
9b33fbf
ci: tighten Modrinth game-versions to actual supported union
Axionize May 24, 2026
3ebadd7
fabric-intermediary: drop provides: ["grimac"] (modid conflict with a…
Axionize May 24, 2026
5f0eaf4
test: add fabric-1.19.4 + fabric-26.1.2 smoke scenarios
Axionize May 24, 2026
2a24afb
fabric-official: document the concrete 26.X port work needed
Axionize May 24, 2026
a822c02
fabric-official: incorporate codex r5 review of 26.X port plan
Axionize May 24, 2026
22343a1
fabric-official: real 26.X anticheat port — compile targets in place …
Axionize May 24, 2026
1a309fd
fabric-official: wire MinecraftServer mixin → FabricServerEvents (Pha…
Axionize May 24, 2026
3bb9c29
test: drop per-version flight-smoke files — replaced by multi-version…
Axionize May 24, 2026
7020032
fabric-official: wire real ItemStack conversion + fix codex r6 notes
Axionize May 24, 2026
8105ec4
deps: bump PE to 7c0447d0d (PlayerListMixin + ConnectionMixin reinjec…
Axionize May 24, 2026
9e6fb99
deps: bump PE to ce37f2570 — Grim catches cheats on 26.X
Axionize May 25, 2026
4a742a1
fix(26.X): GrimPlayer re-creation on eviction + clean up temp diag
Axionize May 25, 2026
bb7794a
fix(26.X): forcePut + unconditional LogUtil for console alerts
Axionize May 25, 2026
7e5c5e4
fix(26.X): clean console alert output + remove diag code
Axionize May 25, 2026
c52cff7
deps: bump PE to 33e5bb605 — fix mc1140 version range for Fabric Load…
Axionize May 25, 2026
d5fab56
feat(26.X): update PolymerHook for Polymer 0.16+ API change
Axionize May 25, 2026
d1eb32f
review: shorten verbose comments in fabric-official 26.X files
Axionize May 28, 2026
5a7b729
review: shorten fabric-common/build.gradle.kts header comment
Axionize May 28, 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
15 changes: 12 additions & 3 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,13 @@ jobs:
persist-credentials: false
fetch-depth: 0

- name: Set up JDK 21
- name: Set up JDK 25
uses: actions/setup-java@v4
with:
java-version: '21'
# fabric-official's LoomNoRemap setup needs the GRADLE JVM itself on
# Java 25 (toolchain alone isn't enough — Loom configures fabric-official
# during Gradle config phase, before toolchain selection kicks in).
java-version: '25'
distribution: 'temurin'
server-id: github
settings-path: ${{ github.workspace }}
Expand Down Expand Up @@ -266,7 +269,13 @@ jobs:
changelog: ${{ steps.changelog.outputs.notes }}
loaders: |
fabric
game-versions: '>=1.16.1'
# Union of the two ranges actually shipped: intermediary
# variant covers [1.16.1, 26), official variant covers
# [26.1.2, 26.2). mc-publish reads multi-line YAML scalar
# as OR. Keep in sync with fabric.mod.json depends.minecraft.
game-versions: |
>=1.16.1 <26
>=26.1.2 <26.2
dependencies: 'fabric-api'

#------------------------------------------------------------------
Expand Down
11 changes: 6 additions & 5 deletions common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,12 @@ repositories {


dependencies {
if (BuildConfig.shadePE) {
api(libs.packetevents.api)
} else {
compileOnly(libs.packetevents.api)
}
// PE-api stays compileOnly even when shadePE=true: each platform module
// bundles PE through its own JiJ path (fabric/ aggregator JiJs the
// packetevents-fabric meta-jar; spigot/ shades PE-api separately). Declaring
// api() here would let Grim's jij-conventions plugin nest packetevents-api
// a second time inside grimac-fabric-intermediary, doubling ~4.2MB.
compileOnly(libs.packetevents.api)
api(libs.cloud.core)
api(libs.cloud.processors.requirements)
api(libs.configuralize) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,14 @@ private static void placeLilypad(GrimPlayer player, InteractionHand hand, int se
@Override
public void onPacketReceive(PacketReceiveEvent event) {
GrimPlayer player = GrimAPI.INSTANCE.getPlayerDataManager().getPlayer(event.getUser());
if (player == null && event.getConnectionState() == ConnectionState.PLAY) {
// 26.X: GrimPlayer vanishes from the map after the first few PLAY
// packets due to a PE pipeline state issue during CONFIGURATION→PLAY
// transition. Force re-creation bypassing shouldCheck (which may
// fail due to transient channel state).
player = new ac.grim.grimac.player.GrimPlayer(event.getUser());
GrimAPI.INSTANCE.getPlayerDataManager().forcePut(event.getUser(), player);
}
if (player == null) return;

if (event.getConnectionState() != ConnectionState.PLAY) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ public void onUserConnect(UserConnectEvent event) {
public void onUserLogin(UserLoginEvent event) {
// fake channel (NPC / spoofer / EmbeddedChannel) — no PacketUser, nothing to track
if (event.getUser() == null) return;

// 26.X fallback: ensure GrimPlayer exists at login time. On the
// fabric-official chain, addUser via onPacketSend(LOGIN_SUCCESS) may
// not fire reliably due to PE pipeline timing.
if (GrimAPI.INSTANCE.getPlayerDataManager().getPlayer(event.getUser()) == null) {
GrimAPI.INSTANCE.getPlayerDataManager().addUser(event.getUser());
}

Object nativePlayerObject = Objects.requireNonNull(event.getPlayer());

// This will never throw a NPE because code is run in OnUserConnect -> onPacketSend -> OnUserLogin order
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ public void addUser(final @NotNull User user) {
}
}

public void forcePut(@NotNull User user, @NotNull GrimPlayer player) {
playerDataMap.put(user, player);
}

public GrimPlayer remove(final @NotNull User user) {
return playerDataMap.remove(user);
}
Expand Down
25 changes: 25 additions & 0 deletions fabric-common/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Cross-variant Grim Fabric library. Currently sparse — most Fabric code is
// MC-typed and lives in fabric-intermediary/-official.

plugins {
`java-library`
grim.`base-conventions`
}

repositories {
exclusive("https://repo.grim.ac/snapshots") {
includeGroup("ac.grim.grimac")
includeGroup("com.github.retrooper")
}
exclusive("https://jitpack.io", { mavenContent { releasesOnly() } }) {
includeGroup("com.github.Fallen-Breath.conditional-mixin")
}
exclusive("https://nexus.scarsz.me/content/repositories/releases", { mavenContent { releasesOnly() } }) {
includeGroup("github.scarsz")
}
mavenCentral()
}

dependencies {
compileOnly(project(":common"))
}
153 changes: 153 additions & 0 deletions fabric-intermediary/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
import versioning.BuildConfig

val minecraft_version: String by project
val yarn_mappings: String by project
val fabric_version: String by project

plugins {
`maven-publish`
alias(libs.plugins.fabric.loom)
grim.`base-conventions`
grim.`jij-conventions`
}

dependencies {
minecraft("com.mojang:minecraft:$minecraft_version")
mappings(loom.officialMojangMappings())
modImplementation(fabricApi.module("fabric-lifecycle-events-v1", fabric_version))

modCompileOnly("me.lucko:fabric-permissions-api:0.3.1")

modImplementation(libs.cloud.fabric)
modImplementation(libs.fabric.loader)
// PE is JiJ'd at the top-level fabric/ aggregator (so it loads on every MC range
// the aggregator covers, not just the intermediary range). Here PE is compile-only:
// declaring modImplementation/modApi would also nest the api/transitive jars inside
// grimac-fabric-intermediary's published jar, which on a 26.1.2 server would never
// load because the intermediary mod itself is gated <26.
compileOnly(libs.packetevents.fabric)
compileOnly("org.slf4j:slf4j-api:2.0.17")
compileOnly("org.apache.logging.log4j:log4j-api:2.24.3")
}

// The configurations below will only apply to :fabric and its submodules, not its siblings or the root project
allprojects {
apply(plugin = "fabric-loom")
apply(plugin = "grim.base-conventions")
apply(plugin = "maven-publish")


repositories {
// 1. Fallback for non-exclusive deps
if (BuildConfig.mavenLocalOverride) mavenLocal()

// 2. Exclusive Repositories
exclusive("https://maven.fabricmc.net/") {
includeGroup("net.fabricmc")
includeGroup("net.fabricmc.fabric-api")
}

exclusive("https://repo.grim.ac/snapshots") {
includeGroup("ac.grim.grimac")
includeGroup("com.github.retrooper")
}

exclusive("https://jitpack.io", { mavenContent { releasesOnly() } }) {
includeGroup("com.github.Fallen-Breath.conditional-mixin")
}

exclusive("https://repo.viaversion.com", { mavenContent { releasesOnly() } }) {
includeGroup("com.viaversion")
}

exclusive("https://nexus.scarsz.me/content/repositories/releases", { mavenContent { releasesOnly() } }) {
includeGroup("github.scarsz")
}

exclusive("https://repo.opencollab.dev/maven-releases/", { mavenContent { releasesOnly() } }) {
includeGroup("org.geysermc.api")
}

exclusive("https://repo.opencollab.dev/maven-snapshots/", { mavenContent { snapshotsOnly() } }) {
includeGroup("org.geysermc.floodgate")
includeGroup("org.geysermc.cumulus")
includeModule("org.geysermc", "common")
includeModule("org.geysermc", "geyser-parent")
}

// Special logic for LuckPerms
if (project.name == "mc1161") {
exclusive("https://repo.grim.ac/snapshots") { includeGroup("me.lucko") }
} else {
// Enforce Central for LuckPerms so we don't accidentally check other snapshot repos
exclusive(mavenCentral()) { includeGroup("me.lucko") }
}

mavenCentral()
}

loom {
accessWidenerPath = file("src/main/resources/grimac.accesswidener")
}

dependencies {
// I hate this syntax, is there an alternative to make modCompileOnly(libs.package.name) work?
val libsx = rootProject.extensions.getByType<VersionCatalogsExtension>().named("libs")
// Use the libs extension from the root project
modImplementation(libsx.findLibrary("cloud-fabric").get()) {
exclude(group = "net.fabricmc.fabric-api")
}
modImplementation(libsx.findLibrary("fabric-loader").get())

implementation(project(":common"))
}

publishing.publications.create<MavenPublication>("maven") {
artifact(tasks["remapJar"])
}

tasks {
remapJar {
archiveBaseName = if (project == project(":fabric-intermediary")) {
"${rootProject.name}-fabric-intermediary"
} else {
"${rootProject.name}-fabric-${project.name}"
}
archiveVersion = rootProject.version as String
}

remapSourcesJar {
archiveBaseName = if (project == project(":fabric-intermediary")) {
"${rootProject.name}-fabric-intermediary"
} else {
"${rootProject.name}-fabric-${project.name}"
}
archiveVersion = rootProject.version as String
}
}
}

subprojects {
dependencies {
// configuration = "namedElements" required when depending on another loom project
implementation(project(":fabric-intermediary", configuration = "namedElements"))
// PE is JiJ'd at fabric/ (aggregator); per-version submodules just need it on
// the compile classpath. compileOnly avoids re-nesting PE inside each mcXXXX jar.
val libsx = rootProject.extensions.getByType<VersionCatalogsExtension>().named("libs")
compileOnly(libsx.findLibrary("packetevents-fabric").get())
}
}

subprojects.forEach {
tasks.named("remapJar").configure {
dependsOn("${it.path}:remapJar")
}
}

tasks.remapJar.configure {
subprojects.forEach { subproject ->
subproject.tasks.matching { it.name == "remapJar" }.configureEach {
nestedJars.from(this)
}
}
}
11 changes: 11 additions & 0 deletions fabric-intermediary/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx2G
org.gradle.parallel=true
# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.16.1
yarn_mappings=1.16.1+build.21
loader_version=0.16.13

# Fabric API
fabric_version=0.42.0+1.16
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"accessWidener": "grimac.accesswidener",
"depends": {
"fabricloader": "\u003e\u003d0.16",
"minecraft": ">=1.16.1",
"minecraft": ">=1.16.1 \u003c26",
"fabric-resource-loader-v0": "*"
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dependencies {
minecraft("com.mojang:minecraft:1.17.1")
mappings(loom.officialMojangMappings())
compileOnly(project(":fabric:mc1161", configuration = "namedElements"))
compileOnly(project(":fabric-intermediary:mc1161", configuration = "namedElements"))

modImplementation(fabricApi.module("fabric-lifecycle-events-v1", "0.46.1+1.17"))
modCompileOnly("me.lucko:fabric-permissions-api:0.3.1")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"accessWidener": "grimac.accesswidener",
"depends": {
"minecraft": ">=1.17",
"minecraft": ">=1.17 \u003c26",
"fabric-lifecycle-events-v1": "*"
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
dependencies {
minecraft("com.mojang:minecraft:1.19.4")
mappings(loom.officialMojangMappings())
compileOnly(project(":fabric:mc1161", configuration = "namedElements"))
compileOnly(project(":fabric:mc1171", configuration = "namedElements"))
compileOnly(project(":fabric-intermediary:mc1161", configuration = "namedElements"))
compileOnly(project(":fabric-intermediary:mc1171", configuration = "namedElements"))

modImplementation(fabricApi.module("fabric-lifecycle-events-v1", "0.87.2+1.19.4"))
modCompileOnly("me.lucko:fabric-permissions-api:0.3.1")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"accessWidener": "grimac.accesswidener",
"depends": {
"minecraft": ">=1.19",
"minecraft": ">=1.19 \u003c26",
"fabric-lifecycle-events-v1": "*"
}
}
10 changes: 10 additions & 0 deletions fabric-intermediary/mc1205/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
dependencies {
minecraft("com.mojang:minecraft:1.20.5")
mappings(loom.officialMojangMappings())
compileOnly(project(":fabric-intermediary:mc1161", configuration = "namedElements"))
compileOnly(project(":fabric-intermediary:mc1171", configuration = "namedElements"))
compileOnly(project(":fabric-intermediary:mc1194", configuration = "namedElements"))

modImplementation(fabricApi.module("fabric-lifecycle-events-v1", "0.97.8+1.20.5"))
modCompileOnly("me.lucko:fabric-permissions-api:0.3.1")
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"accessWidener": "grimac.accesswidener",
"depends": {
"minecraft": ">=1.20",
"minecraft": ">=1.20 \u003c26",
"fabric-lifecycle-events-v1": "*"
}
}
16 changes: 16 additions & 0 deletions fabric-intermediary/mc12111/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
dependencies {
minecraft("com.mojang:minecraft:1.21.11")
mappings(loom.officialMojangMappings())
compileOnly(project(":fabric-intermediary:mc1161", configuration = "namedElements"))
compileOnly(project(":fabric-intermediary:mc1171", configuration = "namedElements"))
compileOnly(project(":fabric-intermediary:mc1194", configuration = "namedElements"))
compileOnly(project(":fabric-intermediary:mc1205", configuration = "namedElements"))

modImplementation(fabricApi.module("fabric-lifecycle-events-v1", "0.141.1+1.21.11"))
modCompileOnly("me.lucko:fabric-permissions-api:0.6.1")
}


tasks.compileJava {
options.release.set(21)
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"accessWidener": "grimac.accesswidener",
"depends": {
"minecraft": ">=1.21.2",
"minecraft": ">=1.21.2 \u003c26",
"fabric-lifecycle-events-v1": "*"
}
}
Loading