Skip to content

Update to Minecraft 26.2 - #60

Merged
craftycorvid merged 2 commits into
masterfrom
update-to-26.2
Jun 21, 2026
Merged

Update to Minecraft 26.2#60
craftycorvid merged 2 commits into
masterfrom
update-to-26.2

Conversation

@craftycorvid

@craftycorvid craftycorvid commented Jun 21, 2026

Copy link
Copy Markdown
Owner

Ports ImprovedSigns from 26.1.2 to Minecraft 26.2, following the Fabric 26.2 blog and verifying every API change against the decompiled 26.2 source (no guesses).

Versions

old new
Minecraft 26.1.2 26.2
Fabric Loader 0.19.1 0.19.3
Fabric API 0.145.4+26.1.2 0.152.2+26.2
Loom 1.15-SNAPSHOT 1.17-SNAPSHOT
Gradle 9.4.0 9.5.1

Java stays 25. fabric.mod.json depends bumped to minecraft ~26.2, fabricloader >=0.19.3 (the old ~26.1.2 would have refused to load on 26.2).

API changes

  • ChatFormatting.X.getColor() removed — ChatFormatting is now a bare enum. Switched to TextColor.X.getValue().
  • InventoryChangeTrigger moved package: net.minecraft.advancements.criterionnet.minecraft.advancements.triggers.
  • All four mixin string-targets confirmed unchanged in 26.2 (Block.popResource, ItemFrame.interact/removeFramedMap, SignItem.updateCustomBlockEntityTag, SignBlock.openTextEdit).

Loot datagen fix (sign-retain-on-break)

LootTableDatagen was calling copyData(EntityTarget.TARGET_ENTITY), which serializes source: "target_entity" — it reads an entity, which is wrong for block drops and would break the mod's retain-text-on-break feature (the committed JSON was stale-but-correct from older code).

26.2 adds LootContext.BlockEntityTarget.BLOCK_ENTITY, but CopyCustomDataFunction.copyData has no block-entity overload and exposes no public block-entity NbtProvider factory. Fixed by building the provider from BLOCK_ENTITY's serialized name through the public ContextNbtProvider.INLINE_CODEC. Regenerated loot tables now correctly emit source: "block_entity" and also pick up the 26.2 datagen format cleanups (dropped default bonus_rolls/count/category).

copyData(NbtProvider) is deprecated in 26.2, but it's the only public overload that can copy from a block entity, so the deprecation is knowingly accepted (scoped @SuppressWarnings).

Release workflow

publish.yml RELEASE_NAME and CHANGE_LOG bumped to 26.2. Mod version stays 1.6.0, matching the convention for pure MC ports (it carried unchanged through the 1.21.9 / 1.21.11 / 26.1.2 ports).

Verification

  • ./gradlew build
  • ./gradlew runDatagen ✅ (mod loads, registers, mixins init; loot tables emit block_entity)

Build:
- minecraft 26.2, loader 0.19.3, fabric-api 0.152.2+26.2
- loom 1.17-SNAPSHOT, gradle wrapper 9.5.1
- fabric.mod.json depends: minecraft ~26.2, fabricloader >=0.19.3

API changes (verified against decompiled 26.2):
- ChatFormatting.X.getColor() removed -> TextColor.X.getValue()
- InventoryChangeTrigger moved advancements.criterion -> advancements.triggers

Release workflow: bump RELEASE_NAME/CHANGE_LOG to 26.2 (mod version stays 1.6.0, per port convention).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 21, 2026 15:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Ports ImprovedSigns to the Minecraft 26.2 / Fabric 26.2 ecosystem by updating build metadata, dependency versions, and adjusting a couple of Mojang API/package changes needed for compilation/runtime.

Changes:

  • Bumped Minecraft/Fabric Loader/Fabric API/Loom/Gradle versions and updated fabric.mod.json dependency constraints accordingly.
  • Updated chat color usage to match the 26.2 ChatFormatting API change (now a bare enum).
  • Updated InventoryChangeTrigger import to its new package.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/main/resources/fabric.mod.json Updates loader and Minecraft dependency constraints for 26.2 compatibility.
src/main/java/com/craftycorvid/improvedSigns/ImprovedSignsUtils.java Replaces removed ChatFormatting#getColor() usage with TextColor#getValue() equivalents.
src/main/java/com/craftycorvid/improvedSigns/datagen/RecipeDatagen.java Updates InventoryChangeTrigger import to new package location.
gradle/wrapper/gradle-wrapper.properties Bumps Gradle wrapper to 9.5.1.
gradle.properties Updates Minecraft/loader/Fabric API version properties to 26.2-era versions.
build.gradle Bumps Fabric Loom plugin version to 1.17-SNAPSHOT.
.github/workflows/publish.yml Updates release name/changelog text to refer to Minecraft 26.2.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

LootTableDatagen used copyData(EntityTarget.TARGET_ENTITY), which serializes
source: "target_entity" (reads an entity, wrong for block drops) and would
break sign-retain-on-break. 26.2 adds LootContext.BlockEntityTarget but
copyData has no block-entity overload and exposes no public block-entity
NbtProvider factory, so build one by parsing BLOCK_ENTITY's serialized name
through the public inline codec. Regenerated tables now emit source:
"block_entity" (the correct, working value) and pick up 26.2 format cleanups.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@craftycorvid
craftycorvid merged commit 4c56d1d into master Jun 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants