Migration Guide
This migration guide only covers breaking changes to existing code made to the Unified API between Minecraft versions. You'll want to check out the changelog for a full list of what's actually changed in the API.
1.21.11 to 26.1
Registries
UnifiedRegistries.DeferredRegistry- allows you to register content to any vanilla or modded registry
UnifiedRegistries.Items- whilst optional, you should use
SuppliedItemrather thanSupplier<Item>
- whilst optional, you should use
UnifiedRegistries.Blocks- whilst optional, you should use
SuppliedBlockrather thanSupplier<Block>
- whilst optional, you should use
- removed
UnifiedRegistries.MobEffects - this was made redundant by
UnifiedRegistries.DeferredRegistry
- this was made redundant by
- removed
UnifiedRegistries.ParticleTypes - this was made redundant by
UnifiedRegistries.DeferredRegistry
- this was made redundant by
Helpers
- replaced
UnifiedHelpers.PLATFORMwithUnifiedPlatform.get() - replaced
getEnvironmentwithisClientSideandisServerSide
- replaced
- renamed
PlatformType getPlatformtoLoaderType getLoader
- renamed
- removed
UnifiedHelpers.LOOT_TABLES - this has been replaced by the more powerful
UnifiedEvents.LootTables
- this has been replaced by the more powerful
- removed
UnifiedHelpers.FURNACE_FUELS - this has been replaced by the more powerful
UnifiedHelpers.DATA_COMPONENTSandUnifiedDataComponents.FURNACE_FUEL
- this has been replaced by the more powerful
- the equivalent of
FURNACE_FUELS.addwould beDATA_COMPONENTS.addFurnaceFuel
- the equivalent of
- removed
UnifiedHelpers.STRIPPABLES - this has been replaced by the more powerful
UnifiedHelpers.BLOCK_CONVERSIONS
- this has been replaced by the more powerful
- the equivalent of
STRIPPABLES.addwould beBLOCK_CONVERSIONS.addStrippable
- the equivalent of
UnifiedHelpers.CREATIVE_ENTRIES- all methods which previously accepted an ItemStack now require an ItemStackTemplate
- renamed
addtoinsert
- renamed
- renamed
addAftertoinsertAfter
- renamed
- renamed
addBeforetoinsertBefore
- renamed
UnifiedHelpers.NETWORKING- renamed
registerPlayC2StoregisterPlayToServer
- renamed
- renamed
registerPlayS2CtoregisterPlayToClient
- renamed
- renamed
registerConfigC2StoregisterConfigToServer
- renamed
- renamed
registerConfigS2CtoregisterConfigToClient
- renamed
- removed
UnifiedClientHelpers.BLOCK_LAYERS, as 26.1 vanilla handles this behavior automatically now - added
UnifiedClientHelpers.LEGACY_BABY_ARMOR - the
addmethod can be used to add EquipmentAsset resource keys to a list which reverts to pre-26.1 baby armor rendering, providing a fallback for armor sets lacking dedicated baby textures
- the
Events
- renamed
UnifiedEvents.ItemComponentstoUnifiedEvents.DefaultDataComponents modifyno longer provides an Item predicate
- if you'd like to continue using the predicate, instead use
modifyFiltered
- if you'd like to continue using the predicate, instead use
- both methods provide a
TriConsumerwith aHolderLookup.Provider
- both methods provide a
- renamed
UnifiedClientEvents.TickstoUnifiedClientEvents.Instance - replaced
atStartandatEndwithonTick, which acceptsEventType
- replaced
UnifiedEvents.Players.onRespawn- now provides a BiConsumer with
oldPlayerandnewPlayer
- now provides a BiConsumer with
- previously, only the new player was provided, so usages of this event must be adjusted
Utilities
- renamed
UnifiedItemComponentstoUnifiedDataComponents - renamed
PackInfotoPackType - renamed
PlatformInfotoLoaderType