Migration Notes

Minecraft 26.1

These migration notes cover only the changes made to Balm APIs. For Minecraft and mod-loader specific migrations, check out their respective release announcements or primers.

Overview

Minecraft 26.1 comes with a lot of toolchain changes, such as a new Loom plugin (net.fabricmc.fabric-loom), ForgeGradle 7, Java 25 and deobfuscated names.

You will have to follow the individual mod loaders' migration guides to update your build setup. For reference, you can also compare against the balm-mod template repository and the commits made on the 26.1 branch to get an idea of what changes are required.

In terms of code migrations, there are a few bigger updates in Minecraft (like the introduction of ItemStackTemplate), but Balm itself has not undergone any significant changes.

⚠️ Known Issues

Custom BlockStateModels are currently disabled on Fabric

Custom models will not resolve, which may lead to crashes when they are used. They will be re-enabled once Fabric ports its model loading API.

Inbuilt Mod Compatibilities are currently disabled

Compatibility with Jade, WTHIT, Trinkets, Cloth Config, and Configured has been disabled temporarily.

This is due to the many class and package renames in Minecraft 26.1 as well as the shift to deobfuscated names that make it impossible to compile against older versions.

These integrations will be re-enabled as those mods are ported.

Data Attachments and Capability Registrations are not available on Forge

  • While NeoForge and Fabric have introduced a native system for data attachments, Forge has not. Attempting to access data attachments on Forge will crash.
  • Forge no longer has a programmatic way of registering capabilities. BalmCapabilities#registerType will make a type known to Balm, but registration is only possible with a Forge-specific annotation.
  • If you depend on any of those features, my recommendation is to drop support for Forge. Balm won't be putting major efforts into feature parity with Forge.

Breaking Changes

NeoForgeLoadContext now requires a ModContainer parameter

This is mainly for future-proofing, to avoid potentially brittle static lookup over the mod list

+// Add a ModContainer parameter to your NeoForge @Mod entrypoint constructor. NeoForge will pass it for you.
-public NeoForgeYourMod(IEventBus modBus) {
+public NeoForgeYourMod(ModContainer modContainer, IEventBus modBus) {
+// Pass the mod container into the NeoForgeLoadContext in your Balm.initializeMod and BalmClient.initializeMod calls
-Balm.initializeMod("yourmod", new NeoForgeLoadContext(modBus), ...);
+Balm.initializeMod("yourmod", new NeoForgeLoadContext(modContainer, modBus), ...);

BalmVillagerTradeRegistrar has been removed

Minecraft supports data-driven villager trades now.

BalmBlockRenderTypeRegistrar has been removed

Minecraft automatically computes render layers from the block's textures now.

BalmBlockColorRegistrar#register(...) now takes List<BlockTintSource> instead of BlockColor

Replace old block color registrations with new tint-source list registration.

Other Changes

  • DiscriminatedBlocks and DiscriminatedItems removed filterNonNullDiscriminatorEntries and filterNonNullDiscriminators; use sortedEntries(...) / sortedValues(...) instead. Null discriminators now sort first, and blank discriminator values no longer generate prefixes/suffixes when using the helper methods.
  • BalmItemRegistrar#registerDiscriminated(...) was added, bringing discriminated item registration in line with block registration
  • Registry alias support was added across the generic and typed registrars via addAlias(...). Use it for renamed IDs to preserve world/data compatibility when changing object names.
  • Config-screen selection is now configurable through BalmConfig#setPreferredConfigScreen.
  • Networking sendTo* behavior was tightened so packets are only sent when the channel is supported on the remote.