Deprecated API
Contents
-
Terminally Deprecated ElementsElementDescriptionUse extension methods in
IGuiGraphicsExtensioninsteadUseItem.inventoryTick(ItemStack, Level, Entity, int, boolean)by checking that the slot argument is an armor slot. Armor slots are 36, 37, 38 and 39.UseItem.inventoryTick(ItemStack, Level, Entity, int, boolean)by checking that the slot argument is an armor slot. Armor slots are 36, 37, 38 and 39.UseFluidStack.getHoverName()instead.PreferFluidStack.getHoverName().
-
Deprecated Interfaces
-
Deprecated ClassesClassDescriptionNeoForge: Use
AdvancementProviderinstead, provides ease of access for theExistingFileHelperin the generatorForge: UseDatapackBuiltinEntriesProviderinsteadUse extension methods inIGuiGraphicsExtensioninstead
-
Deprecated Enum Classes
-
Deprecated Record ClassesRecord ClassDescription
-
Deprecated FieldsFieldDescriptionForge: Use
PresetEditorManager.get(ResourceKey)instead.Neo: use thedata mapinsteadNeo: use thedata mapinsteadNeoforge: useIPlayerExtension.mayFly()to read andNeoForgeMod.CREATIVE_FLIGHTAttribute to modifyForge: This map is patched out of vanilla code. Listen toBlockEvent.BlockToolModificationEventor overrideIBlockExtension.getToolModifiedState(BlockState, UseOnContext, net.neoforged.neoforge.common.ToolAction, boolean).Neo: Use thecompostabledata map instead, as this field will be ignored starting with 1.20.5.Neo: use thedata mapinstead.
-
Deprecated MethodsMethodDescriptionRegister via
RegisterColorHandlersEvent.BlockRegister viaRegisterColorHandlersEvent.ItemNeo: UseIAbstractWidgetExtension.onClick(double, double, int)instead.Forge: Use gradient overload insteaduseRegisterMenuScreensEventinsteadRegister viaRegisterParticleProvidersEventRegister viaRegisterParticleProvidersEventRegister viaRegisterParticleProvidersEventNeo: useParticleEngine.render(LightTexture, Camera, float, net.minecraft.client.renderer.culling.Frustum, java.util.function.Predicate)with additional parametersSet 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 item aware function belowForge: Use variant with RenderTypeGroupForge: For internal use only. Use the Register events when registering values.Forge: UseRegisterGameTestsEventto register game testsForge: UseRegisterGameTestsEventto register game testsForge: UseRegisterGameTestsEventto 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_SERIALIZERSinsteadUseServerCommonPacketListenerImpl.createCookie(ClientInformation, net.neoforged.neoforge.network.connection.ConnectionType)instead, keeping the connection type information available.Forge: Userider sensitive versionForge: useCreativeModeTab.builder()Neo: UseIItemStackExtension.getEnchantmentLevel(Enchantment)for gameplay logic. Use the data component when modifying the enchantments.Neo: Use ItemStack sensitive version.Neo: do not use, usethe eventinsteadForge:invalid reference
Use damage source sensitive versionForge: Use damage source sensitive versionForge: 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: get burn times by callingIItemStackExtension.getBurnTime(RecipeType)Forge: UseIBlockStateExtension.getLightEmission(BlockGetter, BlockPos)insteadnet.minecraft.world.level.levelgen.synth.ImprovedNoise.noise(double, double, double, double, double) Forge: UseFlowingFluid.canConvertToSource(FluidState, Level, BlockPos)instead.Forge: useLavaFluid.isFlammable(LevelReader,BlockPos,Direction)insteadnet.minecraft.world.level.storage.loot.LootTable.getRandomItemsRaw(LootContext, Consumer<ItemStack>) UseItem.inventoryTick(ItemStack, Level, Entity, int, boolean)by checking that the slot argument is an armor slot. Armor slots are 36, 37, 38 and 39.UseItem.inventoryTick(ItemStack, Level, Entity, int, boolean)by checking that the slot argument is an armor slot. Armor slots are 36, 37, 38 and 39.UseFluidStack.getHoverName()instead.PreferFluidStack.getHoverName().
-
Deprecated ConstructorsConstructorDescriptionUse
CommonListenerCookie(GameProfile, WorldSessionTelemetryManager, RegistryAccess.Frozen, FeatureFlagSet, String, ServerData, Screen, Map, ChatComponent.State, boolean, net.neoforged.neoforge.network.connection.ConnectionType)instead,to indicate whether the connection is modded.Forge: 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 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 variantForge: 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.Forge: UseDeferredSpawnEggIteminstead for suppliersNeo: use the constructorto support conditionsinvalid reference
with a default value and id setter