Porting from 26.2 to 26.3
This page is a guide for modders who want to port their mod from Architectury API 21.1 to 22. It covers the breaking changes and new features introduced in Architectury 22 for Minecraft 26.3.
Dependency versions
Architectury API 22 for Minecraft 26.3 raises the minimum loader versions.
- Minecraft
26.3 - Fabric Loader
0.19.5 - Fabric API
0.160.5 - NeoForge
26.3.0.0-beta
Additions
BlockTransformerHooksaddStrippable(Block, Block),addFlattenable(Block, BlockState)andaddTillable(Block, BlockState), replacing the three per-tool hook classes.
ExtendedMenuDataProvider<D>- New interface, the codec-based replacement for
ExtendedMenuProvider.
- New interface, the codec-based replacement for
MenuRegistryofExtended(ExtendedMenuDataFactory<T, D>, StreamCodec<? super RegistryFriendlyByteBuf, D>)to create an extendedMenuTypewhose data is serialized by a codec.openExtendedMenu(ServerPlayer, ExtendedMenuDataProvider<D>)to open it.ExtendedMenuDataFactory<T, D>, a menu factory receiving the decoded data instead of a buffer.
FuelRegistryregister(int time, float speedMultiplier, ItemLike... items)to control how fast a fuel smelts,1.0being the normal speed. The existingregister(int, ItemLike...)now delegates to it with1.0.
BiomeHooksextractMobSpawnSettings(Biome)andextractCreatureProbability(Biome)SpawnSettingsWrapped(MobSpawnSettings, float)
Deprecations
ExtendedMenuProvider- Use
ExtendedMenuDataProvider<D>instead.- Will be removed in Architectury 23.
- Use
MenuRegistryofExtended(ExtendedMenuTypeFactory<T>)- Use
ofExtended(ExtendedMenuDataFactory<T, D>, StreamCodec)instead. - Will be removed in Architectury 23.
- Use
openExtendedMenu(ServerPlayer, MenuProvider, Consumer<FriendlyByteBuf>)openExtendedMenu(ServerPlayer, ExtendedMenuProvider)- Use
openExtendedMenu(ServerPlayer, ExtendedMenuDataProvider)instead. - Will be removed in Architectury 23.
- Use
ExtendedMenuTypeFactory<T>- Use
ExtendedMenuDataFactory<T, D>instead. - Will be removed in Architectury 23.
- Use
Breaking Changes
LootEventModifyLootTable#modifyLootTable(HolderLookup.Provider, ResourceKey, LootTableModificationContext, boolean)->modifyLootTable(HolderGetter.Provider, ResourceKey, LootTableModificationContext, boolean)ReplaceLootTable#replaceLootTable(HolderLookup.Provider, ResourceKey, LootTable)->replaceLootTable(HolderGetter.Provider, ResourceKey, LootTable)
FuelRegistryget(ItemStack, RecipeType<?>, FuelValues)->get(ItemStack, ServerLevel)
GenerationProperties- Carvers are typed as
WorldCarverinstead ofConfiguredWorldCarver<?>, following the vanilla rename.getCarvers(),addCarver(Holder),addCarver(ResourceKey)andremoveCarver(ResourceKey)all changed accordingly.
- Carvers are typed as
BiomeHooks.GenerationSettingsWrappedgetCarvers()returnsIterable<Holder<WorldCarver>>.
Removal
AxeItemHooksaddStrippable(Block, Block)- Use
BlockTransformerHooks.addStrippable(Block, Block)instead.
- Use
ShovelItemHooksaddFlattenable(Block, BlockState)- Use
BlockTransformerHooks.addFlattenable(Block, BlockState)instead.
- Use
HoeItemHooksaddTillable(Block, Predicate<UseOnContext>, Consumer<UseOnContext>, Function<UseOnContext, BlockState>)- Use
BlockTransformerHooks.addTillable(Block, BlockState)instead.
- Use
DyeColorHooksgetColorValue(DyeColor)- Use the vanilla
DyeColor#getTextureDiffuseColor()instead. Both loaders resolved the hook to that call already.
- Use the vanilla
EventFactorycreateInteractionResult(Class<T>)createInteractionResult(T...)
LootEventModifyLootTable#modifyLootTable(ResourceKey, LootTableModificationContext, boolean)- Use
modifyLootTable(HolderGetter.Provider, ResourceKey, LootTableModificationContext, boolean)instead.
- Use
ModgetFilePath()- Use
getFilePaths()instead.
- Use
RegistrarManagerget(Registry<T>)- Use
get(ResourceKey<Registry<T>>)instead.
- Use
getId(T, Registry<T>)- Use
getId(T, ResourceKey<Registry<T>>)instead.
- Use
RegistrarManager.RegistryProviderget(Registry<T>)- Use
get(ResourceKey<Registry<T>>)instead.
- Use