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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ Fabric plugin for BlueMap that displays markers based on in-game signs
# Installation
Place in your `mods` folder along with BlueMap.

Requires Minecraft 26.3, Java 25, Fabric Loader 0.19.5 or newer, Fabric API for 26.3
(built against 0.161.0+26.3), and BlueMap 5.24 or newer.

Server-side only.

# Usage
Expand Down
8 changes: 4 additions & 4 deletions agent-context/context/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
|-------|-----------|
| Language | Java 25 (`sourceCompatibility`/`targetCompatibility` = `VERSION_25` in `build.gradle`) |
| Mod platform | Fabric, `DedicatedServerModInitializer` (server-only, no client logic) |
| Build | Gradle wrapper + Fabric Loom `1.17-SNAPSHOT` |
| Target Minecraft | version pinned in `gradle.properties` (`minecraft_version`), currently `26.2` |
| Build | Gradle 9.6.1 wrapper + Fabric Loom `1.17.21` |
| Target Minecraft | version pinned in `gradle.properties` (`minecraft_version`), currently `26.3` |
| Fabric loader/API | `loader_version` / `fabric_api_version` in `gradle.properties` |
| External integration | BlueMap API `blue_map_api_version` (`compileOnly` — provided by BlueMap itself at runtime), targeting BlueMap `blue_map_version` |
| External integration | BlueMap API `blue_map_api_version` (`compileOnly` — provided by BlueMap itself at runtime); `blue_map_version` declares the minimum supported BlueMap version in mod metadata |
| JSON | Gson, `Strictness.LENIENT` |
| Logging | SLF4J, all loggers named via `Constants.MOD_ID` |
| Testing | JUnit 5 (Jupiter), via `junit-bom:5.11.4` |
| Publish target | Modrinth, via `com.modrinth.minotaur` Gradle plugin |
| CI | GitHub Actions |

All version numbers live in `gradle.properties` — never hardcode a version in `build.gradle` or source.
`mod_version` follows `<minecraft_version>-<mod_semver>` (e.g. `26.2-0.19.0`).
`mod_version` follows `<minecraft_version>-<mod_semver>` (e.g. `26.3-1.0.0`).

Fabric API is pulled in per-module, not as the blanket artifact: `build.gradle` declares
`implementation fabricApi.module("fabric-lifecycle-events-v1", ...)` (the only module this mod's code actually
Expand Down
3 changes: 2 additions & 1 deletion agent-context/context/config-and-persistence.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ to end users.
`V6` is the player-marker-colors addition (GitHub issue #198,
`../plans/player-marker-colors/spec.md`): `SignEntry` gained `String frontDye`/`backDye` — the sign side's raw
`DyeColor` enum name (e.g. `"RED"`), captured by `SignHelper.createSignEntry` off
`SignBlockEntity.getFrontText()`/`getBackText()`'s `SignText.getColor()` at the same point raw lines are read. Both
`SignText.getColor()` on the text returned by `SignBlockEntity.getText(SignTextSlot.FRONT)` /
`getText(SignTextSlot.BACK)` at the same point raw lines are read. Both
fields are **never** `null` (unlike `frontRawLines`/`backRawLines`): `"BLACK"` (`SignEntryHelper.UNDYED_DYE`) means
"no player colour chosen," doubling as both an actually-undyed vanilla sign's real default and the
`Version6Converter` migration backfill value for pre-`V6` entries — this lets `ColorResolver` (`core-pipeline.md`
Expand Down
2 changes: 1 addition & 1 deletion agent-context/context/core-pipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ builds/adds) an entry:
`WorldMap.UNKNOWN` (the no-dimension-known sentinel), even though both currently hold `"unknown"`, since
`PlayerIds.UNKNOWN` is compared/persisted as a real `playerId` and must keep that exact value regardless of
what `WorldMap.UNKNOWN` does.
3. **Mixins** (`src/main/resources/bluemapsignmarkers.mixins.json`, server-only, `JAVA_21` compat level):
3. **Mixins** (`src/main/resources/bluemapsignmarkers.mixins.json`, server-only, `JAVA_25` compat level):
- `SignBlockEntityInject` injects `SignBlockEntity.updateSignText` at `HEAD` (sets a `@Unique` guard flag,
`bluemapsignmarkers$inUpdateSignText`) and at `TAIL` (clears the flag) → a player edited a sign →
`SignManager.addOrUpdate(SignHelper.createSignEntry(this, player.getStringUUID()))`. The same mixin also
Expand Down
83 changes: 83 additions & 0 deletions agent-context/plans/minecraft-26.3-port-plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Minecraft 26.3 port

## Scope and dependency baseline

Target Minecraft 26.3 with Java 25, Fabric Loader 0.19.5, Fabric API 0.161.0+26.3,
stable Loom 1.17.21, and BlueMap 5.24 / BlueMap API 2.8.0. Keep Gradle 9.6.1.
All dependency versions stay in `gradle.properties`; use mod version `26.3-1.0.0`.

Upstream references:

- [Fabric 26.3 migration notes](https://fabricmc.net/2026/09/15/263.html)
- [Fabric API artifacts](https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api/)
- [Loom artifacts](https://maven.fabricmc.net/net/fabricmc/fabric-loom/)
- [BlueMap 5.28 release](https://github.com/BlueMap-Minecraft/BlueMap/releases/tag/v5.28)
- [BlueMap 5.24 release](https://github.com/BlueMap-Minecraft/BlueMap/releases/tag/v5.24)
- [BlueMap API Maven metadata](https://repo.bluecolored.de/releases/de/bluecolored/bluemap-api/maven-metadata.xml)

## Minecraft API changes confirmed from the 26.3 server jar

- `SignBlockEntity.updateSignText` and `updateText` now take `SignTextSlot` instead of a front/back boolean.
Update all three Mixin callbacks, preserving the guard that avoids duplicate dispatch during text edits.
- `getFrontText()` / `getBackText()` are replaced by `getText(SignTextSlot.FRONT/BACK)`.
Read each side once when creating a sign snapshot, keeping raw lines and dye from the same text object.
- `SignText.getMessages(boolean)` now returns a `List<Component>` instead of an array; stream the list directly.
- Set Mixin `compatibilityLevel` to `JAVA_25`, matching the compiled class-file version (69).
- Verify the removal hook `BlockBehaviour.affectNeighborsAfterRemoval`, dimension identifiers, world paths,
and Fabric lifecycle callback signatures against the target dependencies.

## BlueMap integration

Compile against API 2.8.0, bundled in BlueMap 5.24, the first release supporting Minecraft 26.3.
Declare BlueMap 5.24 as the minimum supported version; the initial 5.28 verification is recorded below.
Check its Fabric dependencies when preparing the dev runtime; preserve the project's per-module Fabric setup.

## Validation

1. Build and run the complete existing JUnit suite with the target dependencies.
2. Inspect the built mod metadata and both Mixin target descriptors.
3. Start an isolated development server with BlueMap 5.24 to check runtime linkage and Mixin application.
4. Where a full server can run, check sign creation/edit/removal, front/back dye updates, reload,
multi-point markers, and persistence. Clearly record any checks requiring an interactive player.
5. Update README requirements and current architecture notes, then review the final diff.

Do not change persisted sign formats, group configuration, or marker identifiers as part of the port.

## Implementation and validation results (2026-10-01)

- Updated dependencies, mod version, sign snapshots, all three sign Mixin callbacks, and Java 25 Mixin metadata.
The mod now declares BlueMap `>=5.28`; README installation requirements and current architecture notes match.
- Comparing all Java sources in the official API 2.8.0 and 2.8.1 source jars found no public source changes.
Existing marker calls were retained and exercised against the API bundled in BlueMap 5.28.
- `build` succeeded against the target dependency set. JUnit reports: 454 tests, 452 passed, 2 skipped,
0 failures, 0 errors. The two skips are `RenderMaskEvaluatorTest` permission-denial cases: this Windows
environment could not revoke directory-listing/file-read permissions, so their assumptions aborted the tests.
- Verified Fabric lifecycle module 4.1.9+ffef5f675d: chunk-load callbacks still take
`(ServerLevel, LevelChunk, boolean)`, and block-entity-load callbacks still take `(BlockEntity, ServerLevel)`.
- Launched `runServer` with MC 26.3, Loader 0.19.5, and BlueMap 5.28 in an isolated directory under
`build/compat-26.3/server`, using a temporary Gradle init script and smoke-test mod (both ignored build artifacts).
Both required Mixins applied. Inspection of the exported `SignBlockEntity` bytecode confirmed the HEAD/TAIL
text-edit callbacks and both `updateText` RETURN callbacks use the new `SignTextSlot` descriptors.
- The temporary smoke mod passed ordinary/hanging sign snapshot checks (front/back raw text, parsing, position,
and independent red/blue dyes) and exercised actual BlueMap POI add/update/remove, LINE/SHAPE/EXTRUDE builders,
escaped detail text, and marker-set APIs. Snapshots used detached block entities populated by reflection;
these checks do not simulate a player editing a live sign.
- Correcting `JAVA_21` to `JAVA_25` removed the class-version-69 mismatch warning.
- The server stopped normally at the Minecraft EULA check. The test did not accept the EULA or start a world.
Live player edits/dye/ink interactions, world-backed removal, BlueMap enable/reload, chunk reconciliation,
and persistence across a full server restart remain manual acceptance checks.
- Final diff whitespace check passed. No persisted sign-format or marker-identifier changes were made.

## PR review follow-up (2026-10-02)

- Corrected the minimum supported BlueMap version from 5.28 to 5.24 in `gradle.properties` and README.
BlueMap 5.24 already supports Minecraft 26.3 and bundles API 2.8.0, so the compile-only API dependency now
matches that minimum. BlueMap 5.28 was the initial verification version, not an API requirement.
- Recompared the official API 2.8.0 and 2.8.1 source jars: all 27 Java files are identical, with none added or
removed. The existing marker builders, colors, marker-set properties, and listener calls need no changes.
- Rebuilt with API 2.8.0, rerunning all build tasks and tests: 454 tests, 452 passed, 2 skipped, no failures or
errors. Confirmed the generated mod metadata declares `bluemap >=5.24`.
- Loaded the official BlueMap 5.24 Fabric jar in an isolated MC 26.3 dev server under
`build/compat-bluemap-5.24/server`. Both Mixins applied; the temporary smoke mod passed the same sign-snapshot
and POI/LINE/SHAPE/EXTRUDE checks, plus connector listener registration/unregistration.
The server stopped at the EULA check without starting a world; live gameplay/reload checks remain manual.
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ org.gradle.parallel=true
java_version=25
# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=26.2
loader_version=0.19.3
minecraft_version=26.3
loader_version=0.19.5

# Mod Properties
mod_id=bluemapsignmarkers
mod_name=BlueMap Sign Markers
mod_version=26.2-1.0.0
mod_version=26.3-1.0.1
mod_description=A plugin for BlueMap that creates markers from signs
maven_group=com.tpwalke2.bluemapsignmarkers
archives_base_name=bluemapsignmarkers

# Dependencies
fabric_api_version=0.152.1+26.2
fabric_loom_version=1.17-SNAPSHOT
blue_map_version=5.22
fabric_api_version=0.161.0+26.3
fabric_loom_version=1.17.21
blue_map_version=5.24
blue_map_api_version=2.8.0
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.entity.SignBlockEntity;
import net.minecraft.world.level.block.entity.SignText;
import net.minecraft.world.level.block.entity.SignTextSlot;

public class SignHelper {
private SignHelper() {
Expand All @@ -26,8 +27,10 @@ public static SignEntry createSignEntry(
SignBlockEntity signBlockEntity,
String playerId) {
var pos = signBlockEntity.getBlockPos();
var frontRawLines = getRawLines(signBlockEntity.getFrontText());
var backRawLines = getRawLines(signBlockEntity.getBackText());
var frontText = signBlockEntity.getText(SignTextSlot.FRONT);
var backText = signBlockEntity.getText(SignTextSlot.BACK);
var frontRawLines = getRawLines(frontText);
var backRawLines = getRawLines(backText);

return new SignEntry(
new SignEntryKey(
Expand All @@ -41,8 +44,8 @@ public static SignEntry createSignEntry(
System.currentTimeMillis(),
frontRawLines,
backRawLines,
signBlockEntity.getFrontText().getColor().name(),
signBlockEntity.getBackText().getColor().name());
frontText.getColor().name(),
backText.getColor().name());
}

public static String getSignParentMap(Level world) {
Expand All @@ -52,8 +55,8 @@ public static String getSignParentMap(Level world) {
}

private static String[] getRawLines(SignText signText) {
return Arrays.stream(signText.getMessages(false))
return signText.getMessages(false).stream()
.map(Component::getString)
.toArray(String[]::new);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.level.block.entity.SignBlockEntity;
import net.minecraft.world.level.block.entity.SignText;
import net.minecraft.world.level.block.entity.SignTextSlot;

@Mixin(SignBlockEntity.class)
public class SignBlockEntityInject {
Expand All @@ -31,7 +32,7 @@ public class SignBlockEntityInject {
@Inject(method = "updateSignText", at = @At("HEAD"))
void onBeginUpdateSignText(
Player player,
boolean frontText,
SignTextSlot slot,
List<FilteredText> lines,
CallbackInfo cir) {
bluemapsignmarkers$inUpdateSignText = true;
Expand All @@ -40,7 +41,7 @@ void onBeginUpdateSignText(
@Inject(method = "updateSignText", at = @At("TAIL"))
void onTryChangeText(
Player player,
boolean frontText,
SignTextSlot slot,
List<FilteredText> lines,
CallbackInfo cir) {
bluemapsignmarkers$inUpdateSignText = false;
Expand All @@ -59,7 +60,7 @@ void onTryChangeText(
@Inject(method = "updateText", at = @At("RETURN"))
void onUpdateText(
UnaryOperator<SignText> function,
boolean isFrontText,
SignTextSlot slot,
CallbackInfoReturnable<Boolean> cir) {
if (!cir.getReturnValueZ()) return;
if (bluemapsignmarkers$inUpdateSignText) return;
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/bluemapsignmarkers.mixins.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"required": true,
"package": "com.tpwalke2.bluemapsignmarkers.mixin",
"compatibilityLevel": "JAVA_21",
"compatibilityLevel": "JAVA_25",
Comment thread
tpwalke2 marked this conversation as resolved.
Resolved
"mixins": [],
"client": [],
"server": [
Expand All @@ -11,4 +11,4 @@
"injectors": {
"defaultRequire": 1
}
}
}
4 changes: 2 additions & 2 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
"minecraft": "~${minecraft_version}",
"java": ">=${java_version}",
"fabric-lifecycle-events-v1": "*",
"bluemap": "*"
"bluemap": ">=${blue_map_version}"
}
}
}
Loading