Deprecated API
Contents
-
Terminally Deprecated ElementsElementDescriptionFor blocks, calling
BlockRenderLayerMap.putBlock(Block, RenderLayer)is enough. Other items always use a translucent render layer.For blocks, callingBlockRenderLayerMap.putBlocks(RenderLayer, Block...)is enough. Other items always use a translucent render layer.Do not use, will be removed in a future release.ApiLookupMap.LookupConstructorshould be used instead of lookup factory, to expose the identifier.ApiLookupMap.LookupConstructorshould be used instead as it also passes the identifier.This never did anything useful.Replaced withItemTags.AXES.Replaced withConventionalItemTags.EMPTY_BUCKETS.Replaced withItemTags.HOES.Replaced withConventionalItemTags.LAVA_BUCKETS.Replaced withConventionalItemTags.MILK_BUCKETS.Replaced withItemTags.PICKAXES.Replaced withItemTags.SHOVELS.Replaced withItemTags.SWORDS.Replaced withConventionalItemTags.WATER_BUCKETS.UseContainerItemContext.withConstant(ItemVariant, long)instead.UseContainerItemContext.withConstant(ItemStack)instead.Deprecated for removal without direct replacement. UseStorage.insert(T, long, net.fabricmc.fabric.api.transfer.v1.transaction.TransactionContext),Storage.extract(T, long, net.fabricmc.fabric.api.transfer.v1.transaction.TransactionContext)orStorage.iterator()instead.Either use transactions directly, or useStorageUtil.simulateExtract(net.fabricmc.fabric.api.transfer.v1.storage.Storage<T>, T, long, net.fabricmc.fabric.api.transfer.v1.transaction.TransactionContext).Either use transactions directly, or useStorageUtil.simulateInsert(net.fabricmc.fabric.api.transfer.v1.storage.Storage<T>, T, long, net.fabricmc.fabric.api.transfer.v1.transaction.TransactionContext).
-
Deprecated InterfacesInterfaceDescriptionUse
AttackBlockCallbackinstead and check for the block. This gives more control over the different cancellation outcomes.Please migrate to v1. Please useKeyBindingHelperinstead.UseModelLoadingPluginand related classes instead.useExtraModelProvider, which supports loading of plainIdentifiersRegister aModelLoadingPlugininstead.UseModelLoadingPluginand related classes instead.UseModelLoadingPluginand related classes instead.UseModelLoadingPluginand related classes instead.Replaced byColorProviderRegistryReplaced byInvalidateRenderStateCallbackThis module has been moved into fabric-rendering-v1. UseBlockEntityRendererRegistryinsteadnet.fabricmc.fabric.api.client.rendereregistry.v1.EntityModelLayerRegistry.TexturedModelDataProviderThis module has been moved into fabric-rendering-v1. UseEntityRendererRegistryinsteadThis module has been moved into fabric-rendering-v1. UseLivingEntityFeatureRendererRegistrationCallbackinsteadThis module has been moved into fabric-rendering-v1. UseLivingEntityFeatureRendererRegistrationCallback.RegistrationHelperinsteadPlease useBuiltinItemRendererRegistry.DynamicItemRendererinstead.UseScreenRegistry.Factoryinstead.UseScreenRegistryinstead.Please migrate to v2. Please useCommandRegistrationCallbackinstead.UseScreenHandlerRegistry.ExtendedClientHandlerFactoryinstead.UseScreenHandlerRegistryinstead.Use the more generalServerLivingEntityEvents.ALLOW_DEATHevent instead and check forinstanceof ServerPlayerEntity.Please useItemTooltipCallback0.3.0ApiLookupMap.LookupConstructorshould be used instead as it also passes the identifier.Replaced withExtendedScreenHandlerType.ExtendedFactory.Replaced by access widener forin Fabric Transitive Access Wideners (v1).invalid @link
ScreenHandlerType.Factory
-
Deprecated ClassesClassDescriptionPlease migrate to v1. Please use
KeyBindingHelper.registerKeyBinding(KeyBinding)instead.UseFabricBakedModelManager.getModel(Identifier)instead.This module has been moved into fabric-rendering-v1. UseEntityModelLayerRegistryinstead.Replaced with transitive access wideners in Fabric Transitive Access Wideners (v1).Replaced by access wideners forHandledScreens.register(ScreenHandlerType, HandledScreens.Provider)andin Fabric Transitive Access Wideners (v1).invalid @link
HandledScreens.ProviderReplaced by access widener forCriteria.register(Criterion)in Fabric Transitive Access Wideners (v1).useWoodTypeBuilderReplaced by access wideners forModelPredicateProviderRegistryregistration methods in Fabric Transitive Access Wideners (v1).Replaced by access widener forVillagerProfession(java.lang.String, java.util.function.Predicate<net.minecraft.registry.entry.RegistryEntry<net.minecraft.world.poi.PointOfInterestType>>, java.util.function.Predicate<net.minecraft.registry.entry.RegistryEntry<net.minecraft.world.poi.PointOfInterestType>>, com.google.common.collect.ImmutableSet<net.minecraft.item.Item>, com.google.common.collect.ImmutableSet<net.minecraft.block.Block>, net.minecraft.sound.SoundEvent)in Fabric Transitive Access Wideners (v1).Replaced by access wideners forVillagerType.create(java.lang.String)andVillagerType.BIOME_TO_TYPEin Fabric Transitive Access Wideners (v1).Please migrate to v2. Please useCommandRegistrationCallbackinstead.Replaced by- Creating simple screen handler types directly with
ScreenHandlerTypeusing an access widener in Fabric Transitive Access Wideners (v1) - Creating extended screen handler types with
ExtendedScreenHandlerType - Registering using
Registries.SCREEN_HANDLERdirectly
Use the constants inNbtElementinstead. - Creating simple screen handler types directly with
-
Deprecated Exception Classes
-
Deprecated FieldsFieldDescriptionUse the more general
ServerLivingEntityEvents.ALLOW_DEATHevent instead and check forinstanceof ServerPlayerEntity.Please useClientTickEvents.END_CLIENT_TICK.Please useServerLifecycleEvents.SERVER_STARTEDPlease useServerLifecycleEvents.SERVER_STOPPINGPlease useServerTickEvents.END_SERVER_TICKReplaced withItemTags.AXES.Replaced withConventionalItemTags.EMPTY_BUCKETS.Replaced withItemTags.HOES.Replaced withConventionalItemTags.LAVA_BUCKETS.Replaced withConventionalItemTags.MILK_BUCKETS.Replaced withItemTags.PICKAXES.Replaced withItemTags.SHOVELS.Replaced withItemTags.SWORDS.Replaced withConventionalItemTags.WATER_BUCKETS.
-
Deprecated MethodsMethodDescriptionFor blocks, calling
BlockRenderLayerMap.putBlock(Block, RenderLayer)is enough. Other items always use a translucent render layer.For blocks, callingBlockRenderLayerMap.putBlocks(RenderLayer, Block...)is enough. Other items always use a translucent render layer.UseModelLoadingRegistry.registerModelProvider(ExtraModelProvider)instead, which supports loading of plainIdentifiersPlease useBuiltinItemRendererRegistry.register(ItemConvertible, DynamicItemRenderer)instead.Please useBuiltinItemRendererRegistry.register(ItemConvertible, DynamicItemRenderer)instead.UseWorldRenderContext.consumers()directly.Please useFabricDataGenerator.createPack()This is not to be used in events anymore.Do not use, will be removed in a future release.Always returnsfalse, do not use. This is not to be used in events anymore, standard Java profilers will do fine.Please migrate toFabricRegistryBuilder.createDefaulted(RegistryKey, Identifier)Please migrate toFabricRegistryBuilder.createSimple(RegistryKey)ApiLookupMap.LookupConstructorshould be used instead of lookup factory, to expose the identifier.Please useFabricBlockSettings.luminance(int).Please useFabricBlockSettings.luminance(ToIntFunction).Please migrate toFabricBlockSettings.mapColor(MapColor)Please migrate toFabricBlockSettings.mapColor(DyeColor)UseFabricBlockSettings.create()instead.This never did anything useful.UseMaterialFinder.blendMode(BlendMode)instead.UseMaterialFinder.blendMode(BlendMode)instead.UseMaterialFinder.ambientOcclusion(TriState)instead.UseMaterialFinder.disableColorIndex(boolean)instead.UseMaterialFinder.disableDiffuse(boolean)instead.UseMaterialFinder.emissive(boolean)instead.UseMutableQuadView.fromVanilla(int[], int)instead.UseMutableQuadView.uv(int, float, float)instead.UseMutableQuadView.uv(int, Vector2f)instead.UseMutableQuadView.spriteBake(Sprite, int)instead.UseMutableQuadView.color(int, int)instead.UseMutableQuadView.color(int, int, int, int)instead.UseQuadEmitter.uvUnitSquare()instead.UseMutableQuadView.copyFrom(QuadView)instead. UnlikecopyFrom, this method will not copy the material.UseQuadView.color(int)instead.UseQuadView.u(int)instead.UseQuadView.v(int)instead.UseQuadView.toBakedQuad(Sprite)instead.UseQuadView.toVanilla(int[], int)instead.UseSpriteFinder.find(QuadView)instead.UseemitBlockQuadsoremitItemQuadson the baked model that you want to consume instead.UseemitBlockQuadsoremitItemQuadson the baked model that you want to consume instead.UseMesh.outputTo(QuadEmitter)instead.Please useResourceManagerHelper.registerBuiltinResourcePack(Identifier, ModContainer, ResourcePackActivationType)instead, thesub pathshould be removed in a future release in favor of the identifier path.Replaced with creating anExtendedScreenHandlerTypemanually and registering it in the vanilla registry.Replaced by access widener forin Fabric Transitive Access Wideners (v1).invalid @link
ScreenHandlerType#ScreenHandlerType(ScreenHandlerType.Factory)UseContainerItemContext.withConstant(ItemVariant, long)instead.UseContainerItemContext.withConstant(ItemStack)instead.Deprecated for removal without direct replacement. UseStorage.insert(T, long, net.fabricmc.fabric.api.transfer.v1.transaction.TransactionContext),Storage.extract(T, long, net.fabricmc.fabric.api.transfer.v1.transaction.TransactionContext)orStorage.iterator()instead.Either use transactions directly, or useStorageUtil.simulateExtract(net.fabricmc.fabric.api.transfer.v1.storage.Storage<T>, T, long, net.fabricmc.fabric.api.transfer.v1.transaction.TransactionContext).Either use transactions directly, or useStorageUtil.simulateInsert(net.fabricmc.fabric.api.transfer.v1.storage.Storage<T>, T, long, net.fabricmc.fabric.api.transfer.v1.transaction.TransactionContext).Only use if you absolutely need it, there is almost always a better way.
-
Deprecated ConstructorsConstructorDescriptionYou should not be calling this constructor!You should not be calling this constructor!