Deprecated API
Contents
-
Terminally Deprecated ElementsElementDescriptionNeo: Use
CrashReportCategory.setStackTrace(StackTraceElement[])
instead.Neo: The additional mod ID parameter is unused; use the one-parameter constructor instead.Neo: Avoid using this method to get the mod ID, as this method will be removed in 1.21.2.Planned on being removed in 1.21.1 due to extreme maintenance burden to make this event fire consistently for most screens.Please migrate toItemModel
s, or if this is not possible contact us at NeoForge.Use extension methods inIGuiGraphicsExtension
insteadUseinvalid reference
GuiGraphics#blit(ResourceLocation, int, int, int, int, int, int)
ExtendExtendedUnbakedModel
directly instead, and useSimpleBakedModel.Builder
if appropriate.UseSimpleBakedModel.Builder
instead.UseKeyModifier.getActiveModifiers()
instead.Use a data component/attachment to store info, orEntity.load(CompoundTag)
as a replacement.Use a data component/attachment to store info. (Entity.setData(AttachmentType, Object)
)UseTagBuilder.remove(TagEntry)
instead.UseITagBuilderExtension.removeElement(ResourceLocation)
instead.UseITagBuilderExtension.removeElement(ResourceLocation)
instead.UseFluidStack.getHoverName()
instead.PreferFluidStack.getHoverName()
.
-
Deprecated Interfaces
-
Deprecated ClassesClassDescriptionForge: Use
DatapackBuiltinEntriesProvider
insteadPlanned on being removed in 1.21.1 due to extreme maintenance burden to make this event fire consistently for most screens.Use extension methods inIGuiGraphicsExtension
insteadExtendExtendedUnbakedModel
directly instead, and useSimpleBakedModel.Builder
if appropriate.
-
Deprecated Enum Classes
-
Deprecated Record ClassesRecord ClassDescription
-
Deprecated FieldsFieldDescriptionForge: Use
PresetEditorManager.get(ResourceKey)
instead.Neo: use thedata map
insteadNeo: use thedata map
insteadNeo: useLivingEntity.PLAYER_NOT_WEARING_DISGUISE_ITEM_FOR_TARGET
with target info insteadNeoforge: useIPlayerExtension.mayFly()
to read andNeoForgeMod.CREATIVE_FLIGHT
Attribute to modifyForge: This map is patched out of vanilla code. Listen toBlockEvent.BlockToolModificationEvent
or overrideIBlockExtension.getToolModifiedState(BlockState, UseOnContext, net.neoforged.neoforge.common.ItemAbility, boolean)
.Use theinverse map
generated from the data map, this field will be ignored in a future versionNeo: Use thedata map
, this field will be ignored in a future versionNeo: Use thecompostable
data map insteadNeo: Usethe data map
, this field will be ignored in a future versionNeo: Use theinverse map
generated from the data map, this field will be ignored in a future versionNeo: use thedata map
instead.
-
Deprecated MethodsMethodDescriptionNeo: call
Camera.setRotation(float, float, float)
insteadRegister viaRegisterColorHandlersEvent.Block
Neo: UseIAbstractWidgetExtension.onClick(double, double, int)
instead.Neo: UseBakedGlyph.renderType(Font.DisplayMode, boolean)
insteaduseRegisterMenuScreensEvent
insteadRegister viaRegisterParticleProvidersEvent
Register viaRegisterParticleProvidersEvent
Register viaRegisterParticleProvidersEvent
Neo: use overload that accepts BlockStateNeo: useUnbakedModelParser.parse(Reader)
insteadForge: UseIBakedModelExtension.getRenderPasses(ItemStack)
andinvalid reference
net.minecraft.client.resources.model.BakedModel#getRenderTypes(ItemStack)
Set your render type in your block model's JSON (eg."render_type": "cutout"
) or overrideIBakedModelExtension.getRenderTypes(BlockState, net.minecraft.util.RandomSource, net.neoforged.neoforge.client.model.data.ModelData)
Set your render type in your block model's JSON (eg."render_type": "cutout"
) or overrideIBakedModelExtension.getRenderTypes(BlockState, net.minecraft.util.RandomSource, net.neoforged.neoforge.client.model.data.ModelData)
Set your render type in your block model's JSON (eg."render_type": "cutout"
) or overrideIBakedModelExtension.getRenderTypes(BlockState, net.minecraft.util.RandomSource, net.neoforged.neoforge.client.model.data.ModelData)
Forge: Use variant with RenderTypeGroupForge: For internal use only. Use the Register events when registering values.Neo: UseCrashReportCategory.setStackTrace(StackTraceElement[])
instead.Neo: Avoid using this method to get the mod ID, as this method will be removed in 1.21.2.Forge: UseRegisterGameTestsEvent
to register game testsForge: UseRegisterGameTestsEvent
to register game testsForge: UseRegisterGameTestsEvent
to register game testsUseBundlerInfo.unbundlePacket(Packet, Consumer, io.netty.channel.ChannelHandlerContext)
instead, as it supports packet filtering and is more efficient.Neo: use overload with ConnectionType contextNeoForge: UseNeoForgeRegistries.ENTITY_DATA_SERIALIZERS
insteadUseServerCommonPacketListenerImpl.createCookie(ClientInformation, net.neoforged.neoforge.network.connection.ConnectionType)
instead, keeping the connection type information available.Neo: Useinvalid reference
net.neoforged.neoforge.client.event.AddClientReloadListenerEvent
Forge: Userider sensitive version
Neo: useLivingEntity.travelInFluid(Vec3, FluidState)
insteadNeo:Player.getDestroySpeed(BlockState, BlockPos)
insteadNeo: Modders should useRegisterSpawnPlacementsEvent
instead.Neo: useFeatureFlagRegistry.Builder.create(ResourceLocation, boolean)
insteadForge: useCreativeModeTab.builder()
Neo: UseIItemStackExtension.isPrimaryItemFor(Holder)
This method does not respectIItemStackExtension.supportsEnchantment(Holder)
since theHolder
is not available, which makes the result of calling it invalid.Neo: UseEnchantmentHelper.getTagEnchantmentLevel(Holder, ItemStack)
for NBT enchantments, orIItemStackExtension.getEnchantmentLevel(Holder)
for gameplay.Neo: do not use, usethe event
insteadNeo: Useinvalid reference
net.neoforged.neoforge.client.util.TooltipUtil#addAttributeTooltips
Neo: UseItemStack.getTagEnchantments()
for NBT enchantments, orIItemStackExtension.getAllEnchantments(net.minecraft.core.HolderLookup.RegistryLookup<net.minecraft.world.item.enchantment.Enchantment>)
for gameplay.Forge: Use damage source sensitive versionUse ItemStack sensitive versionProjectileWeaponItem.getAllSupportedProjectiles(ItemStack)
Use ItemStack sensitive versionProjectileWeaponItem.getSupportedHeldProjectiles(ItemStack)
NeoForge: UseRarity.getStyleModifier()
Forge: UseBaseRailBlock.getRailDirection(BlockState, BlockGetter, BlockPos, net.minecraft.world.entity.vehicle.AbstractMinecart)
for enhanced ability If you do change this property be aware that other functions in this/subclasses may break as they can make assumptions about this propertyNeo: use overload with level context insteadUse IItemHandler capability instead. To preserve Container-specific interactions, useHopperBlockEntity.getContainerOrHandlerAt(net.minecraft.world.level.Level, net.minecraft.core.BlockPos, net.minecraft.core.Direction)
and handle both cases.Neo: UseIBlockStateExtension.getLightEmission(BlockGetter, BlockPos)
insteadnet.minecraft.world.level.levelgen.synth.ImprovedNoise.noise(double, double, double, double, double) Neo: use overload with level context insteadForge: UseFlowingFluid.canConvertToSource(FluidState, ServerLevel, BlockPos)
instead.Forge: useLavaFluid.isFlammable(LevelReader,BlockPos,Direction)
insteadnet.minecraft.world.level.storage.loot.LootTable.getRandomItemsRaw(LootContext, Consumer<ItemStack>) Please migrate toItemModel
s, or if this is not possible contact us at NeoForge.Useinvalid reference
GuiGraphics#blit(ResourceLocation, int, int, int, int, int, int)
UseKeyModifier.getActiveModifiers()
instead.Use a data component/attachment to store info, orEntity.load(CompoundTag)
as a replacement.Use a data component/attachment to store info. (Entity.setData(AttachmentType, Object)
)UseTagBuilder.remove(TagEntry)
instead.UseITagBuilderExtension.removeElement(ResourceLocation)
instead.UseITagBuilderExtension.removeElement(ResourceLocation)
instead.UseFluidStack.getHoverName()
instead.PreferFluidStack.getHoverName()
.Vanilla has deprecated intrusive holders and is in the process of moving away from them, you should not use this unless you have no better option.
-
Deprecated ConstructorsConstructorDescriptionUse
CommonListenerCookie(GameProfile, WorldSessionTelemetryManager, RegistryAccess.Frozen, FeatureFlagSet, String, ServerData, Screen, Map, ChatComponent.State, Map, ServerLinks, net.neoforged.neoforge.network.connection.ConnectionType)
instead,to indicate whether the connection is modded.Neo: useModelBakery(EntityModelSet, Map, Map, Map, UnbakedModel, Map)
ModelBakery instead}Neo: useBakingResult(BakedModel, Map, ItemModel, Map, Map, Map)
} insteadForge: Use variant with RenderTypeGroupForge: Use the mod id variantForge: Use the mod id variantnet.minecraft.data.tags.CatVariantTagsProvider(PackOutput, CompletableFuture<HolderLookup.Provider>) Forge: Use the mod id variantnet.minecraft.data.tags.DamageTypeTagsProvider(PackOutput, CompletableFuture<HolderLookup.Provider>) Forge: Use the mod id variantForge: Use the mod id variantnet.minecraft.data.tags.EntityTypeTagsProvider(PackOutput, CompletableFuture<HolderLookup.Provider>) Forge: Use the mod id variantForge: Use the mod id variantForge: Use the mod id variantNeo: Use the mod id variantnet.minecraft.data.tags.InstrumentTagsProvider(PackOutput, CompletableFuture<HolderLookup.Provider>) Forge: Use the mod id variantForge: Use the mod id variantForge: Use the mod id variantForge: Use the mod id variantForge: Use the mod id variantForge: Use the mod id variantForge: Use the mod id variantNeo: The additional mod ID parameter is unused; use the one-parameter constructor instead.Forge: Use the mod id variantNeo: use overload with ConnectionType contextUseCommonListenerCookie(GameProfile, int, ClientInformation, boolean, net.neoforged.neoforge.network.connection.ConnectionType)
instead, to indicate whether the connection is modded.Neo: useMetadata(Component,PackCompatibility,FeatureFlagSet,List,boolean)
insteadForge: UseTagFile(List, boolean, List)
which has support for remove entries.Neo: useFeatureFlag(FeatureFlagUniverse, int, int, boolean)
insteadNeo: use constructor with additional data insteadNeo: use the constructorinvalid reference
with a default value and id setter