Port to Minecraft 26.1.2 (Fabric)#410
Open
vanlueckn wants to merge 32 commits into
Open
Conversation
Ich hab doch keine Ahnung davon
Fabric/1.20.4
Port/1.21 fabric
Switch yarn mappings to 1.21.1+build.3 and Fabric API to 0.116.11+1.21.1, raise the fabric.mod.json minecraft dep range to ~1.21.1, and rename the artifact to TC-Redstone-1.21.1-Fabric. The dependencies block now reads minecraft / yarn / loader / fabric-api versions from gradle.properties so future bumps stay in one place. The 1.21-fabric linkableapi branch keeps working unchanged.
EMITER_TILE was registered with RS_MULTI_EMITTER as its only valid
block, so placing an emitter in 1.21.1 fails BlockEntity#validateSupports
("Invalid block entity tcredstone:emitter"). The check is new in
1.21.1; the typo had been latent in the 1.21 branch.
The previous commit accidentally tracked the loom/NeoForge run output (logs, saves, crash reports). Add runs/ to .gitignore and drop them from the index.
Update the gradle / fabric.mod.json version metadata to 1.21.3 and migrate the API breaks: ItemActionResult collapsed back into ActionResult (SKIP_DEFAULT_BLOCK_INTERACTION becomes PASS_TO_DEFAULT_BLOCK_ACTION), TypedActionResult<ItemStack> removed (Item#use returns ActionResult), neighborUpdate now takes WireOrientation instead of fromPos, and BlockEntityType.Builder is gone -- replaced with FabricBlockEntityTypeBuilder from the Fabric object-builder API. Submodule URL switches to the vanlueckn fork (branch 1.21.3-fabric) which carries the matching PlayerEntity#sendMessage migration.
MC 1.21.3 requires Item.Settings#registryKey and AbstractBlock.Settings#registryKey before the Item / Block constructor runs (Item id not set / Block id not set). The registration helpers now build a RegistryKey, prime the settings factory, and pass the configured Settings into the constructor; RemoteActivator forwards the same parameter to Linkingtool.
Update yarn mappings to 1.21.4+build.8 and Fabric API to 0.119.4+1.21.4, raise the fabric.mod.json minecraft dep to ~1.21.4, and add the new assets/tcredstone/items/<id>.json wrappers — 1.21.4 needs them in addition to assets/tcredstone/models/item or the items render as the missing-texture placeholder. The 1.21.3 linkableapi branch keeps working unchanged.
Update yarn / fabric-api / fabric.mod.json to 1.21.5 and route the NBT changes through the linkableapi: NbtHelper.fromBlockPos / toBlockPos were removed (RemoteActivator now calls the new Linkingtool.readBlockPos helper, TileRedstoneMultiEmitter calls MultiLinkingTool.writeBlockPos), and NbtCompound.getInt now returns Optional<Integer> so the legacy emitter NBT load uses the getInt(key, default) overload. Submodule pointer moves to the new 1.21.5-fabric linkableapi branch which carries the matching TooltipDisplayComponent-aware appendTooltip signature.
Update yarn / fabric-api / fabric.mod.json metadata to 1.21.8 and migrate BlockEntity to the new ReadView / WriteView serialization introduced in 1.21.6 (readNbt/writeNbt are gone). The multi emitter now stores its position list via BlockPos.CODEC.listOf() while the single emitter keeps the legacy xLinkedPos / yLinkedPos / zLinkedPos integer keys for save compatibility. The 1.21.5 linkableapi branch keeps working unchanged; its TooltipDisplayComponent-aware appendTooltip already matches 1.21.8.
Update yarn / fabric-api / fabric.mod.json metadata to 1.21.10. No source changes are required: Yarn always exposed World.isClient as a method, so the NeoForge-side private-field break does not apply here. The 1.21.5 linkableapi branch keeps working unchanged.
Fabric API 0.138.x for 1.21.10 declares fabricloader >= 0.17.0; keeping 0.16.14 makes the API mods refuse to load with "wrong version is present: 0.16.14".
Update yarn / fabric-api / fabric.mod.json metadata to 1.21.11. The new Fabric API ships javadoc with intermediary mappings that old Loom rejects, so bump fabric-loom to 1.16.1 and the Gradle wrapper to 9.5.0 (Loom 1.16+ requires Gradle 9.4+). No source changes are required; the 1.21.5 linkableapi branch keeps working unchanged.
Switch to Mojang official mappings (no Yarn release for 26.1.2 yet), bump fabric_version to 0.147.0+26.1.2, fabricloader to 0.19.2 and loom to 1.17.0-alpha.7. Migrate all parent sources from Yarn to Mojmap names and adopt the same 26.1.2 patterns as the NeoForge branch: Item.Properties#setId / BlockBehaviour.Properties#setId via ResourceKey, ValueInput / ValueOutput in BlockEntity, Identifier factory, isClientSide() method, IntArrayTag NBT helpers in the linkableapi. NOTE: build is currently blocked because Mojang has not yet published official mappings for 26.1.2 (client_mappings missing from version_manifest_v2.json). Loom fails with "Failed to find official mojang mappings for 26.1.2". Once Mojang ships the ProGuard mappings (or Fabric publishes intermediary / yarn for 26.1.2) the build should succeed without further code changes.
MC 26.1 is the first unobfuscated release - Mojang ships parameter names, no ProGuard mappings needed. Fabric splits the loom plugin: the new net.fabricmc.fabric-loom skips remapping entirely. Adopt the official 26.1 example mod layout: * plugins block uses id 'net.fabricmc.fabric-loom' (was 'fabric-loom') * drop the mappings line; loom configures sources directly * implementation / compileOnly instead of modImplementation / modCompileOnly * publish jar instead of remapJar (modrinth uploadFile, etc.) * Java toolchain raised to 25 (Mojang requires it) * CurseGradle plugin removed (1.4.0 is not compatible with Gradle 9 and the cleanup is overdue) TCInit also picks up two API renames that 26.1.2 fabric-api carries: ItemGroupEvents.modifyEntriesEvent -> CreativeModeTabEvents.modifyOutputEvent, and the now-private BlockEntityType constructor goes through FabricBlockEntityTypeBuilder again. The linkableapi branch follows with a ServerPlayer cast for ItemStack#hurtAndBreak.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Portiert TC-Wireless-Redstone auf Minecraft 26.1.2 (Fabric).
Hinweis: Setzt voraus, dass zuerst MrTroble/linkableapi#4 gemergt wird, damit das Submodul gegen den Upstream-linkableapi auflöst.