Deprecated API
Contents
- Terminally Deprecated
- Interfaces
- Classes
- Enum Classes
- Record Classes
- Fields
- Methods
- Constructors
- Enum Constants
-
Terminally Deprecated ElementsElementDescriptionFor removal in 26.3.Neo: Use
AbstractContainerScreen.getLeftPos()instead.Neo: UseAbstractContainerScreen.getTopPos()instead.Neo: UseAbstractContainerScreen.getHoveredSlot()instead.Neo: UseAbstractContainerScreen.getImageHeight()instead.Neo: UseAbstractContainerScreen.getImageHeight()instead.For removal in 26.3.For removal in 26.3.Neo: To be removed in 26.3. Full pots are automatically added to the maps of their respective empty pots. This does not support adding arbitrary blocks as 'full pots'. If you use this feature, please raise this in the NeoForge issue tracker.Neo: To be removed in 26.3. UseFlowerPotBlock.getFullPots()instead.UseFMLLoader.getCurrent().getLoadingModList()instead.UseFluidType.move(LivingEntity, Vec3, double)insteadUseFluidType.move(LivingEntity, Vec3, double)insteadUseItemAccessEnergyHandlerinstead.UseEmptyEnergyHandlerinstead.UseSimpleEnergyHandlerinstead.UseEnergyHandlerinstead. Code that is written againstIEnergyStoragebut receives anEnergyHandlercan temporarily useIEnergyStorage.of(EnergyHandler)to ease migration.There is no direct equivalent for this method, since each energy handler is expected to perform this check on extraction already. Please open an issue on GitHub if you have a use for an equivalent of this method.There is no direct equivalent for this method, since each energy handler is expected to perform this check on insertion already. Please open an issue on GitHub if you have a use for an equivalent of this method.UseEnergyHandler.extract(int, TransactionContext)instead.Use eitherEnergyHandler.getAmountAsLong()orEnergyHandler.getAmountAsInt()instead.Use eitherEnergyHandler.getCapacityAsLong()orEnergyHandler.getCapacityAsInt()instead.UseEnergyHandler.insert(int, TransactionContext)instead.UseContextAwareReloadListener.getRegistryLookup()insteadUseModifyDefaultComponentsEvent.modify(ItemLike, Initializer)instead, which provides more contextual information.UseModifyDefaultComponentsEvent.modifyMatching(ItemWithComponentsPredicate, Initializer)instead, which provides more contextual information.UseTagsUpdatedEvent.getRegistries()insteadSubscribe to subclasses insteadUseResourceHandlerwith aFluidResourceinstead. Code that is written againstIFluidHandlerbut receives aResourceHandler<FluidResource>can temporarily useIFluidHandler.of(ResourceHandler)to ease migration.UseResourceHandler.getAmountAsInt(int)andResourceHandler.getResource(int)instead. Alternatively use theFluidUtil.getStack(ResourceHandler, int)helper.UseResourceHandler.getCapacityAsInt(int, T)instead, passingFluidResource.EMPTYas the resource to retrieve a general tank limit.UseResourceHandler.size()instead.UseResourceHandler.isValid(int, T)instead, however note that it doesn't make the same strong guarantees regarding how long a resource is valid. In other words: the result ofisValidmight change.UseResourceHandlerwith aFluidResourceinstead. To apply changes to an underlying item container, capture anItemAccess, as provided for example by theCapabilities.Fluid.ITEMcapability. Code that is written againstIFluidHandlerItemcan temporarily useFluidUtil.getFluidHandler(ItemStack)to ease migration.There is no equivalent to this method, since in the new system the container is changed directly via anItemAccess.UseEmptyResourceHandlerinstead.UseItemAccessFluidHandlerinstead. Note thatFluidHandlerItemStackwould remove entirely the data component when emptied, whereasItemAccessFluidHandlerwill set the data component toSimpleFluidContent.EMPTY. Make sure to addSimpleFluidContent.EMPTYto the prototype of your item withItem.Properties.component(DataComponentType, T).UseItemAccessFluidHandlerinstead, with an override ofItemAccessFluidHandler.update(ItemResource, int, FluidResource, int)to returnnullif the fluid amount is 0.UseItemAccessFluidHandlerinstead, with an override ofItemAccessFluidHandler.update(ItemResource, int, FluidResource, int)to return a different item resource if the fluid amount is 0.UseItemAccessFluidHandler, with an override ofItemAccessFluidHandler.update(ItemResource, int, FluidResource, int)to return an empty resource if the fluid amount is not exactly 0 or the capacity of the handler.Deprecated with no direct equivalent, howeverItemAccessFluidHandlercan serve as inspiration. Please open an issue on GitHub if you have a use for an equivalent of this class.UseItemAccessFluidHandlerinstead, with an override ofItemAccessFluidHandler.update(ItemResource, int, FluidResource, int)to return a different item resource if the fluid amount is 0.UseFluidStacksResourceHandlerinstead.UseVoidingResourceHandlerinstead.UseBucketResourceHandlerinstead.The newItemAccess-backed handler implementations will directly mutate the underlying item access, thus there is no need to represent the resulting item stack anymore.UseFluidType.move(LivingEntity, Vec3, double)insteadUseResourceHandlerwith aFluidResourceinstead ofIFluidHandler. For available utils, seeResourceHandlerUtilas well as the newFluidUtil.Deprecated with no equivalent. Please open an issue on GitHub if you have a use for an equivalent of this method.UseFluidType.getBucket(FluidStack)instead.UseFluidUtil.getFirstStackContained(ItemStack)instead.Obtain anItemAccess, and find a handler by callingItemAccess.getCapability(ItemCapability)withCapabilities.Fluid.ITEM. To ease migration, this method currently queries aCapabilities.Fluid.ITEMcapability, and wraps it in a legacyadapter.Use theCapabilities.Fluid.BLOCKcapability directly.UseResourceHandlerUtil.move(ResourceHandler, ResourceHandler, Predicate, int, TransactionContext)with anItemAccess-backed handler as the source. Note that the item access will take care of "stowing" any extra items.UseResourceHandlerUtil.move(ResourceHandler, ResourceHandler, Predicate, int, TransactionContext)with anItemAccess-backed handler as the source. Note that the item access will take care of "stowing" any extra items.UseResourceHandlerUtil.move(ResourceHandler, ResourceHandler, Predicate, int, TransactionContext)with anItemAccess-backed handler as the destination. Note that the item access will take care of "stowing" any extra items.UseResourceHandlerUtil.move(ResourceHandler, ResourceHandler, Predicate, int, TransactionContext)with anItemAccess-backed handler as the destination. Note that the item access will take care of "stowing" any extra items.net.neoforged.neoforge.fluids.FluidUtil.tryFluidTransfer(IFluidHandler, IFluidHandler, int, boolean) UseResourceHandlerwith aFluidResourceinstead.UseItemAccessItemHandlerinstead.UseResourceHandlerwith anItemResourceinstead. Code that is written againstIItemHandlerbut receives aResourceHandler<ItemResource>can temporarily useIItemHandler.of(ResourceHandler)to ease migration.UseResourceHandler.getCapacityAsInt(int, T)instead, passingItemResource.EMPTYas the resource to retrieve a general slot limit.UseResourceHandler.size()instead.UseResourceHandler.getResource(int)andResourceHandler.getAmountAsInt(int)instead. Alternatively use theItemUtil.getStack(ResourceHandler, int)helper.UseResourceHandler.insert(int, T, int, TransactionContext)instead. Note thatResourceHandler.insert(int, T, int, TransactionContext)returns how much was inserted, unlike this method which returns the leftover (i.e. how much was not inserted). Alternatively use theItemUtil.insertItemReturnRemaining(ResourceHandler, ItemStack, boolean, TransactionContext)helper.UseResourceHandler.isValid(int, T)instead, however note that it doesn't make the same strong guarantees regarding how long a resource is valid. In other words: the result ofisValidmight change.Replaced by theIndexModifierinterface for usage inResourceHandlerSlot.UseResourceHandlerSlotinstead.UseResourceHandlerwith anItemResourceinstead ofIItemHandler. For available utils, seeResourceHandlerUtilas well asItemUtil.UseResourceHandler.insert(Resource, int, TransactionContext)instead. Note thatResourceHandler.insertreturns how much was inserted, unlike this method which returns the leftover (i.e. how much was not inserted). Alternatively use theItemUtil.insertItemReturnRemaining(ResourceHandler, ItemStack, boolean, TransactionContext)helper.UseResourceHandlerUtil.insertStacking(ResourceHandler, Resource, int, TransactionContext)instead. Note thatResourceHandlerUtil.insertStackingreturns how much was inserted, unlike this method which returns the leftover (i.e. how much was not inserted).UseItemStacksResourceHandlerinstead.UseResourceHandlerSlotinstead.UseCombinedResourceHandlerinstead.UseEmptyResourceHandlerinstead.UseLivingEntityEquipmentWrapperinstead, with theEquipmentSlot.Type.HUMANOID_ARMORequipment type.UseLivingEntityEquipmentWrapperinstead.UseLivingEntityEquipmentWrapperinstead, with theEquipmentSlot.Type.HANDequipment type.UseDelegatingResourceHandlerinstead.UseVanillaContainerWrapper.of(Container)instead.UsePlayerInventoryWrapperinstead, in particularPlayerInventoryWrapper.getArmorSlots()for the armor slots only.UsePlayerInventoryWrapperinstead.UsePlayerInventoryWrapperinstead, in particularPlayerInventoryWrapper.getMainSlots()for the main slots only.UsePlayerInventoryWrapperinstead, in particularPlayerInventoryWrapper.getHandSlot(InteractionHand)for the offhand only.UseRangedResourceHandlerinstead.ImplementRecipeInputdirectly instead.UseWorldlyContainerWrapperinstead.
-
Deprecated InterfacesInterfaceDescriptionNeo: Use
IShearableinstead.UseEnergyHandlerinstead. Code that is written againstIEnergyStoragebut receives anEnergyHandlercan temporarily useIEnergyStorage.of(EnergyHandler)to ease migration.UseResourceHandlerwith aFluidResourceinstead. Code that is written againstIFluidHandlerbut receives aResourceHandler<FluidResource>can temporarily useIFluidHandler.of(ResourceHandler)to ease migration.UseResourceHandlerwith aFluidResourceinstead. To apply changes to an underlying item container, capture anItemAccess, as provided for example by theCapabilities.Fluid.ITEMcapability. Code that is written againstIFluidHandlerItemcan temporarily useFluidUtil.getFluidHandler(ItemStack)to ease migration.UseResourceHandlerwith aFluidResourceinstead.UseResourceHandlerwith anItemResourceinstead. Code that is written againstIItemHandlerbut receives aResourceHandler<ItemResource>can temporarily useIItemHandler.of(ResourceHandler)to ease migration.Replaced by theIndexModifierinterface for usage inResourceHandlerSlot.
-
Deprecated ClassesClassDescriptionNeo: Use
DatapackBuiltinEntriesProviderinsteadUseItemAccessEnergyHandlerinstead.UseEmptyEnergyHandlerinstead.UseSimpleEnergyHandlerinstead.UseEmptyResourceHandlerinstead.UseItemAccessFluidHandlerinstead. Note thatFluidHandlerItemStackwould remove entirely the data component when emptied, whereasItemAccessFluidHandlerwill set the data component toSimpleFluidContent.EMPTY. Make sure to addSimpleFluidContent.EMPTYto the prototype of your item withItem.Properties.component(DataComponentType, T).UseItemAccessFluidHandlerinstead, with an override ofItemAccessFluidHandler.update(ItemResource, int, FluidResource, int)to returnnullif the fluid amount is 0.UseItemAccessFluidHandlerinstead, with an override ofItemAccessFluidHandler.update(ItemResource, int, FluidResource, int)to return a different item resource if the fluid amount is 0.UseItemAccessFluidHandler, with an override ofItemAccessFluidHandler.update(ItemResource, int, FluidResource, int)to return an empty resource if the fluid amount is not exactly 0 or the capacity of the handler.Deprecated with no direct equivalent, howeverItemAccessFluidHandlercan serve as inspiration. Please open an issue on GitHub if you have a use for an equivalent of this class.UseItemAccessFluidHandlerinstead, with an override ofItemAccessFluidHandler.update(ItemResource, int, FluidResource, int)to return a different item resource if the fluid amount is 0.UseFluidStacksResourceHandlerinstead.UseVoidingResourceHandlerinstead.UseBucketResourceHandlerinstead.The newItemAccess-backed handler implementations will directly mutate the underlying item access, thus there is no need to represent the resulting item stack anymore.UseResourceHandlerwith aFluidResourceinstead ofIFluidHandler. For available utils, seeResourceHandlerUtilas well as the newFluidUtil.UseItemAccessItemHandlerinstead.UseResourceHandlerSlotinstead.UseResourceHandlerwith anItemResourceinstead ofIItemHandler. For available utils, seeResourceHandlerUtilas well asItemUtil.UseItemStacksResourceHandlerinstead.UseResourceHandlerSlotinstead.UseCombinedResourceHandlerinstead.UseEmptyResourceHandlerinstead.UseLivingEntityEquipmentWrapperinstead, with theEquipmentSlot.Type.HUMANOID_ARMORequipment type.UseLivingEntityEquipmentWrapperinstead.UseLivingEntityEquipmentWrapperinstead, with theEquipmentSlot.Type.HANDequipment type.UseDelegatingResourceHandlerinstead.UseVanillaContainerWrapper.of(Container)instead.UsePlayerInventoryWrapperinstead, in particularPlayerInventoryWrapper.getArmorSlots()for the armor slots only.UsePlayerInventoryWrapperinstead.UsePlayerInventoryWrapperinstead, in particularPlayerInventoryWrapper.getMainSlots()for the main slots only.UsePlayerInventoryWrapperinstead, in particularPlayerInventoryWrapper.getHandSlot(InteractionHand)for the offhand only.UseRangedResourceHandlerinstead.ImplementRecipeInputdirectly instead.UseWorldlyContainerWrapperinstead.
-
Deprecated Enum Classes
-
Deprecated Record ClassesRecord ClassDescription
-
Deprecated FieldsFieldDescriptionFor removal in 26.3.Forge: Use
PresetEditorManager.get(ResourceKey)instead.Neo: use thedata mapinsteadNeo: Use theacceptable villager distancesdata map insteadNeo: use thedata mapinsteadNeo: Use the getter to allow overriding in modsNeo: useLivingEntity.PLAYER_NOT_WEARING_DISGUISE_ITEM_FOR_TARGETwith target info insteadNeoforge: useIPlayerExtension.mayFly()to read andNeoForgeMod.CREATIVE_FLIGHTAttribute to modifyUse theinverse mapgenerated 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: useBlockEntity.getType()Neo: Usethe data map, this field will be ignored in a future versionNeo: Use theinverse mapgenerated from the data map, this field will be ignored in a future versionNeo: use thedata mapinstead.
-
Deprecated MethodsMethodDescriptionNeo: call
Camera.setRotation(float, float, float)insteadRegister viaRegisterColorHandlersEvent.BlockTintSourcesNeo: UseAtlasGlyphProvider.Instance.renderType(Font.DisplayMode, boolean)insteadNeo: UseBakedSheetGlyph.EffectInstance.renderType(Font.DisplayMode, boolean)insteadNeo: UseBakedSheetGlyph.GlyphInstance.renderType(Font.DisplayMode, boolean)insteadNeo: UseTextRenderable.renderType(Font.DisplayMode, boolean)insteadNeo: UseAbstractContainerScreen.getLeftPos()instead.Neo: UseAbstractContainerScreen.getTopPos()instead.Neo: UseAbstractContainerScreen.getHoveredSlot()instead.Neo: UseAbstractContainerScreen.getImageHeight()instead.Neo: UseAbstractContainerScreen.getImageHeight()instead.useRegisterMenuScreensEventinsteadNeo: useRegisterKeyMappingsEvent.registerCategory(Category)insteadRegister viaRegisterParticleProvidersEventRegister viaRegisterParticleProvidersEventNeo: UseBlockStateModelPartExtension.ambientOcclusion()instead.Neo: useFluidModel.fluidTintSource()insteadNeo: useFluidModel.Unbaked.fluidTintSource()insteadNeo: useLevelExtractor.getViewBlockingStateAndPos(LocalPlayer, Frustum)insteadNeo: useSpriteSourceList.list(ResourceManager, java.util.Set)insteadNeo: useClientLanguage.appendFrom(String, List, Map, Map)insteadNeo: useUnbakedModelParser.parse(Reader)insteadnet.minecraft.commands.arguments.selector.EntitySelectorParser.allowSelectors(PermissionSetSupplier) Neo: UseRegisterCauldronInteractionEvent.DispatcherinsteadNeo: For internal use only. Use the Register events when registering values.UseBundlerInfo.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_SERIALIZERSinsteadNeo: useRegistryDataLoader.load(ResourceManager, List, List, Executor, List)insteadNeo: Use the RegisterRpcSchemaEventNeo: Use the RegisterEvent to register instead of thisNeo: Use the RegisterEvent to register instead of thisNeo: UseOutgoingRpcMethod.OutgoingRpcMethodBuilder.build()and the RegisterEvent to register instead of thisNeo: UseOutgoingRpcMethod.OutgoingRpcMethodBuilder.build()and the RegisterEvent to register instead of thisNeo: Use the overload that has the player context and triggers the appropriate event.UseServerCommonPacketListenerImpl.createCookie(ClientInformation, net.neoforged.neoforge.network.connection.ConnectionType)instead, keeping the connection type information available.Neo: Use.invalid reference
net.neoforged.neoforge.client.event.AddClientReloadListenerEventNeo: UseServerClockManager.ServerClockInstance.tick(boolean), Passing in if time is advancingForge: Userider sensitive versionNeoForge: Use [IEntityExtension#getBlockBounciness(BlockPos, BlockState) ]Neo: useEntity.getFluidHeight(net.neoforged.neoforge.fluids.FluidType)insteadNeo: useEntity.isEyeInFluid(net.neoforged.neoforge.fluids.FluidType)insteadOverride-Only. External callers should call viaEventHooks.finalizeMobSpawn(Mob, ServerLevelAccessor, DifficultyInstance, EntitySpawnReason, SpawnGroupData).Neo:Player.getDestroySpeed(BlockState, BlockPos)insteadNeo: Modders should useRegisterSpawnPlacementsEventinstead.Neo: useFeatureFlagRegistry.Builder.create(Identifier, boolean)insteadForge: useCreativeModeTab.builder()For removal in 26.3.For removal in 26.3.Neo: UseIItemStackExtension.isPrimaryItemFor(Holder)This method does not respectIItemStackExtension.supportsEnchantment(Holder)since theHolderis not available, which makes the result of calling it invalid.Neo: UseEnchantmentHelper.getTagEnchantmentLevel(Holder, ItemInstance)for NBT enchantments, orItemInstanceExtension.getEnchantmentLevel(Holder)for gameplay.Neo: callIItemStackExtension.canFitInsideContainerItems()instead, prefer overridingIItemExtension.canFitInsideContainerItems(ItemStack)Neo: do not use, useItemResource.of(ItemStack)instead.useIItemExtension.getCraftingRemainder(ItemStack)insteadNeo: do not use, useItemResource.of(ItemStack)instead.net.minecraft.world.item.ItemStack.addAttributeTooltips(Consumer<Component>, TooltipDisplay, Player) Neo: UseItemStack.getTagEnchantments()for NBT enchantments, orIItemStackExtension.getAllEnchantments(HolderLookup.RegistryLookup)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.minecart.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(Level, BlockPos, Direction)and handle both cases.Neo: To be removed in 26.3. Full pots are automatically added to the maps of their respective empty pots. This does not support adding arbitrary blocks as 'full pots'. If you use this feature, please raise this in the NeoForge issue tracker.Neo: To be removed in 26.3. UseFlowerPotBlock.getFullPots()instead.Neo: UseIBlockStateExtension.getLightEmission(BlockGetter, BlockPos)insteadNeo: UseIBlockStateExtension.ignitedByLava(BlockGetter, BlockPos, Direction)insteadPrefer registering usingRegisterGameRuleCategoryEventNeo: use overload with level context insteadForge: UseFlowingFluid.canConvertToSource(FluidState, ServerLevel, BlockPos)instead.Neo: do not use, useFluidResource.of(FluidStack)instead.Forge: useLavaFluid.isFlammable(LevelReader,BlockPos,Direction)insteadnet.minecraft.world.level.storage.loot.LootTable.getRandomItemsRaw(LootContext, Consumer<ItemStack>) UseFMLLoader.getCurrent().getLoadingModList()instead.UseFluidType.move(LivingEntity, Vec3, double)insteadUseFluidType.move(LivingEntity, Vec3, double)insteadThere is no direct equivalent for this method, since each energy handler is expected to perform this check on extraction already. Please open an issue on GitHub if you have a use for an equivalent of this method.There is no direct equivalent for this method, since each energy handler is expected to perform this check on insertion already. Please open an issue on GitHub if you have a use for an equivalent of this method.UseEnergyHandler.extract(int, TransactionContext)instead.Use eitherEnergyHandler.getAmountAsLong()orEnergyHandler.getAmountAsInt()instead.Use eitherEnergyHandler.getCapacityAsLong()orEnergyHandler.getCapacityAsInt()instead.UseEnergyHandler.insert(int, TransactionContext)instead.UseContextAwareReloadListener.getRegistryLookup()insteadUseModifyDefaultComponentsEvent.modify(ItemLike, Initializer)instead, which provides more contextual information.UseModifyDefaultComponentsEvent.modifyMatching(ItemWithComponentsPredicate, Initializer)instead, which provides more contextual information.UseTagsUpdatedEvent.getRegistries()insteadSubscribe to subclasses insteadUseResourceHandler.getAmountAsInt(int)andResourceHandler.getResource(int)instead. Alternatively use theFluidUtil.getStack(ResourceHandler, int)helper.UseResourceHandler.getCapacityAsInt(int, T)instead, passingFluidResource.EMPTYas the resource to retrieve a general tank limit.UseResourceHandler.size()instead.UseResourceHandler.isValid(int, T)instead, however note that it doesn't make the same strong guarantees regarding how long a resource is valid. In other words: the result ofisValidmight change.There is no equivalent to this method, since in the new system the container is changed directly via anItemAccess.UseFluidType.move(LivingEntity, Vec3, double)insteadDeprecated with no equivalent. Please open an issue on GitHub if you have a use for an equivalent of this method.UseFluidType.getBucket(FluidStack)instead.UseFluidUtil.getFirstStackContained(ItemStack)instead.Obtain anItemAccess, and find a handler by callingItemAccess.getCapability(ItemCapability)withCapabilities.Fluid.ITEM. To ease migration, this method currently queries aCapabilities.Fluid.ITEMcapability, and wraps it in a legacyadapter.Use theCapabilities.Fluid.BLOCKcapability directly.UseResourceHandlerUtil.move(ResourceHandler, ResourceHandler, Predicate, int, TransactionContext)with anItemAccess-backed handler as the source. Note that the item access will take care of "stowing" any extra items.UseResourceHandlerUtil.move(ResourceHandler, ResourceHandler, Predicate, int, TransactionContext)with anItemAccess-backed handler as the source. Note that the item access will take care of "stowing" any extra items.UseResourceHandlerUtil.move(ResourceHandler, ResourceHandler, Predicate, int, TransactionContext)with anItemAccess-backed handler as the destination. Note that the item access will take care of "stowing" any extra items.UseResourceHandlerUtil.move(ResourceHandler, ResourceHandler, Predicate, int, TransactionContext)with anItemAccess-backed handler as the destination. Note that the item access will take care of "stowing" any extra items.net.neoforged.neoforge.fluids.FluidUtil.tryFluidTransfer(IFluidHandler, IFluidHandler, int, boolean) UseResourceHandler.getCapacityAsInt(int, T)instead, passingItemResource.EMPTYas the resource to retrieve a general slot limit.UseResourceHandler.size()instead.UseResourceHandler.getResource(int)andResourceHandler.getAmountAsInt(int)instead. Alternatively use theItemUtil.getStack(ResourceHandler, int)helper.UseResourceHandler.insert(int, T, int, TransactionContext)instead. Note thatResourceHandler.insert(int, T, int, TransactionContext)returns how much was inserted, unlike this method which returns the leftover (i.e. how much was not inserted). Alternatively use theItemUtil.insertItemReturnRemaining(ResourceHandler, ItemStack, boolean, TransactionContext)helper.UseResourceHandler.isValid(int, T)instead, however note that it doesn't make the same strong guarantees regarding how long a resource is valid. In other words: the result ofisValidmight change.UseResourceHandler.insert(Resource, int, TransactionContext)instead. Note thatResourceHandler.insertreturns how much was inserted, unlike this method which returns the leftover (i.e. how much was not inserted). Alternatively use theItemUtil.insertItemReturnRemaining(ResourceHandler, ItemStack, boolean, TransactionContext)helper.UseResourceHandlerUtil.insertStacking(ResourceHandler, Resource, int, TransactionContext)instead. Note thatResourceHandlerUtil.insertStackingreturns how much was inserted, unlike this method which returns the leftover (i.e. how much was not inserted).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.Only intended to be used in the case you don't have the transaction context in the method you are in, while expecting a transaction to be open already. If you have access to a transaction context already, be sure to use that rather than using this method.
-
Deprecated ConstructorsConstructorDescriptionUse
CommonListenerCookie(LevelLoadTracker, GameProfile, WorldSessionTelemetryManager, RegistryAccess.Frozen, FeatureFlagSet, String, ServerData, Screen, Map, ChatComponent.State, Map, ServerLinks, Map, boolean, net.neoforged.neoforge.network.connection.ConnectionType)instead,to indicate whether the connection is modded.Neo: useCompileTask(RenderSectionRegion, boolean, java.util.List)insteadNeo: useBuilder(RenderPipeline.Snippet, net.minecraft.resources.Identifier)insteadNeo: useClientLanguage(Map, boolean, Map)insteadForge: Use the mod id variantForge: 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: use overload with ConnectionType contextNeo: Use the constructor with the server and logger insteadUseCommonListenerCookie(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)insteadNeo: UseServerClockInstance(Holder)insteadNeo: useFeatureFlag(FeatureFlagUniverse, int, int, boolean)insteadNeo: Use the other constructors for empty pots and full pots.Neo: use constructor with additional data insteadNeo: Use the version that has a level
-
Deprecated Enum Constants