Skip to main content

Minecraft 1.21.6

info

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

In Minecraft 1.21.6, Balm has cleaned up some method names and deprecated some serialization-related methods in favor of Minecraft's newer ValueInput and ValueOutput APIs.

⚠️ Known Issues

/balm export icons is not yet functional

The command has not yet been updated to Minecraft's rendering changes.

Minor Changes

BalmCapabilities.registerProvider now takes a Supplier<Set<BlockEntityType<?>>> instead of Supplier<List<BlockEntityType<?>>>

This change was made because passed in types should be unique.

BalmEnvironment.SERVER has been renamed to BalmEnvironment.DEDICATED_SERVER

This change was made to avoid confusion with logical sides (i.e. ClientLevel vs ServerLevel).

BalmRenderers.setBlockRenderType now takes a ChunkSectionLayer instead of RenderType

This is to align with Minecraft's API changes.

BalmBlockEntity.writeUpdateTag now takes a ValueOutput instead of CompoundTag

This change was made to align with Minecraft's API changes.

Deprecations

DefaultContainer.serialize and DefaultContainer.deserialize have been deprecated

Use net.minecraft.world.ContainerHelper#loadAllItems(ValueInput, NonNullList) and net.minecraft.world.ContainerHelper#saveAllItems(ValueOutput, NonNullList) instead, which are identical.

ImplementedContainer.deserializeInventory and ImplementedContainer.serializeInventory have been deprecated

Use net.minecraft.world.ContainerHelper#loadAllItems(ValueInput, NonNullList) and net.minecraft.world.ContainerHelper#saveAllItems(ValueOutput, NonNullList) instead, which are identical.

DefaultEnergyStorage.serialize() and DefaultEnergyStorage.deserialize() have been deprecated

Use the methods of same name that take a ValueOutput or ValueInput instead. Note that, unlike the removed methods, these methods write into an "Energy" key instead of returning an IntTag directly. You may have to migrate data manually if you want to support upgrading older worlds.

DefaultFluidTank.serialize() and DefaultFluidTank.deserialize() have been deprecated

Use the methods of same name that take a ValueOutput or ValueInput instead.

Removals

Balm.initialize has been removed in favor of Balm.initializeMod

The methods are otherwise the same, this was just a name change for better clarity.

BalmClient.initialize has been removed in favor of BalmClient.initializeMod

The methods are otherwise the same, this was just a name change for better clarity.

TickType.Entity has been removed in favor of TickType.ServerEntity and TickType.ClientEntity

This change was made to match the other tick types in style.

SidedProxy.get() has been removed in favor of build or buildLazily

This change makes the intent over when the proxy is initialized more clear.

ListUtils has been removed

It was not used in Balm anymore and can easily be copied into individual projects if needed.