Deprecated API
Contents
-
Terminally Deprecated ElementsElementDescriptionProvided for backwards compatibility - instead you should use
Attribute.appendBlockAdder(CustomAttributeAdder).Kept for backwards compatibility, instead you should callDefaultedAttribute(Class, Object)followed byDefaultedAttribute.appendBlockAdder(CustomAttributeAdder).AsFluidAmount.ofWhole(long)should be used instead.UseFluidAmount.parse(String)instead.AsFluidAmount.MAX_BUCKETSshould generally be used instead, however if you really need the absolute value then you can useFluidAmount.ABSOLUTE_MAXIMUM.AsFluidAmount.MIN_BUCKETSshould generally be used instead, however if you really need the absolute minimum value then you can useFluidAmount.ABSOLUTE_MINIMUM.Replaced byFixedFluidInvView.getMaxAmount_F(int)Because this functionality has been fully replaced byConvertibleand it's usage inAttributeList.Replaced byFluidExtractable.extract(FluidAmount)Replaced byFluidExtractable.extract(FluidFilter, FluidAmount).Replaced byFluidExtractable.extract(FluidKey, FluidAmount)alexiil.mc.lib.attributes.fluid.FluidInvAmountChangeListener_F.asOld(FluidInvAmountChangeListener_F) This has been completely replaced by item-based attribute accessors andFluidContainerRegistry.This has been replaced by the item-based attributes system.This has been replaced by the item-based attributes system.As this has been moved toFixedFluidInv.insertFluid(int, FluidVolume, Simulation)The boolean return has been deprecated, and the main method has been moved toFluidInvUtil.interactCursorWithTank(FixedFluidInv, ServerPlayerEntity)The boolean return has been deprecated, and the main method has been moved toFluidInvUtil.interactCursorWithTank(FluidInsertable, FluidExtractable, ServerPlayerEntity)The boolean return has been deprecated, and the main method has been moved toFluidInvUtil.interactCursorWithTank(FluidTransferable, ServerPlayerEntity)This has been replaced byFluidInvUtil.interactItemWithTank(FixedFluidInv, Reference, LimitedConsumer).UseFluidInvUtil.interactItemWithTank(FixedFluidInv, Reference, LimitedConsumer)instead: all interactWithTank methods have been moved toFluidInvUtil.The boolean return has been deprecated, and the main method has been moved toFluidInvUtil.interactHandWithTank(FixedFluidInv, PlayerEntity, Hand)This has been replaced byFluidInvUtil.interactItemWithTank(FluidInsertable, FluidExtractable, Reference, LimitedConsumer).UseFluidInvUtil.interactItemWithTank(FluidInsertable, FluidExtractable, Reference, LimitedConsumer)instead: all interactWithTank methods have been moved toFluidInvUtil.The boolean return has been deprecated, and the main method has been moved toFluidInvUtil.interactWithTank(FluidInsertable, FluidExtractable, PlayerEntity, Reference)The boolean return has been deprecated, and the main method has been moved toFluidInvUtil.interactHandWithTank(FluidInsertable, FluidExtractable, PlayerEntity, Hand)This has been replaced byFluidInvUtil.interactItemWithTank(FluidTransferable, Reference, LimitedConsumer).UseFluidInvUtil.interactItemWithTank(FluidTransferable, Reference, LimitedConsumer)instead: all interactWithTank methods have been moved toFluidInvUtil.The boolean return has been deprecated, and the main method has been moved toFluidInvUtil.interactHandWithTank(FluidTransferable, PlayerEntity, Hand)Replaced byGroupedFluidInvView.FluidInvStatistic.amount_Finstead.Replaced byGroupedFluidInvView.FluidInvStatistic.spaceAddable_Finstead.Replaced byGroupedFluidInvView.FluidInvStatistic.spaceTotal_Finstead.Replaced byGroupedFluidInvView.getAmount_F(FluidFilter)Replaced byGroupedFluidInvView.getAmount_F(FluidKey)Replaced byGroupedFluidInvView.getCapacity_F(FluidKey)Replaced byGroupedFluidInvView.getSpace_F(FluidKey)Replaced byGroupedFluidInvView.getTotalCapacity_F()Replaced byJumboFixedFluidInv(int, FluidAmount).Replaced bySimpleFixedFluidInv(int, FluidAmount).Replaced bySimpleFixedFluidInv.getMaxAmount_F(int).Replaced bySimpleFixedFluidInv.tankCapacity_FThis has been replaced withFixedFluidInv.getMappedInv(int...)followed byFixedFluidInv.getExtractable(). (And optionallyFluidExtractable.getPureExtractable()if you only want to expose it as an extractable).This has been replaced withFixedFluidInv.getMappedInv(int...)followed byFixedFluidInv.getInsertable(). (And optionallyFluidInsertable.getPureInsertable()if you only want to expose it as an insertable).Because this is ambiguous as the name could refer to the count, or the filter, so instead you should useLimitedFixedFluidInv.FluidTankLimitRule.noInsertionFilter()UseFluidVolumeRenderer.renderSimpleFluid(List, VertexConsumer, MatrixStack, Sprite, Sprite, int)instead, which takes both the still and flowing sprites.BecauseDefaultFluidVolumeRendererdoes everything that this does.Replaced bySingleFluidTankView.getMaxAmount_F().because it's recommended to create aColouredFluidKey.ColouredFluidKeyBuilderinstead and pass that toBiomeSourcedFluidKey(ColouredFluidKeyBuilder).As the flowing sprite ID is needed as well.Because most of the time you should useFluidKey.unitSetrather than this.Replaced byFluidUnit(FluidAmount, String).UseObject.equals(Object)instead of this.Fluids now usefractionsinstead of a single base unit - which makes this completely deprecated with no replacement.Replaced byFluidAmount.BOTTLEReplaced byFluidAmount.BUCKETReplaced byFluidVolume.getAmount_F()andFluidVolume.amount().Replaced byFluidVolume.getRawAmount_F().Replaced byFluidVolume.getFullTooltip().becauseFluidVolume.mergeInternal(FluidVolume, FluidMergeResult)allows every method to share the sameFluidAmount.FluidMergeResultobject, which reduces the chance to make a mistake when merging the two amounts. In addition it's a bit wasteful to re-compute the same value more than once.So instead of overriding this it's recommended that you only override
FluidVolume.mergeInternal(FluidVolume, FluidMergeResult).Replaced byFluidVolume.split(FluidAmount)Because anyFluidKeycan map to a singleFluid, andSimpleFluidKeyhas a much better name than this.As the flowing sprite ID is needed as well.alexiil.mc.lib.attributes.fluid.volume.NormalFluidKey.NormalFluidKeyBuilder(Fluid, Identifier, Text) As the flowing sprite ID is needed as well.Because anyFluidKeycan map to a singleFluid, andSimpleFluidVolumehas a much better name than this.Replaced byPotionFluidKey.withAmount(FluidAmount).Replaced byFluidVolume.getFullTooltip().Because this functionality has been fully replaced byConvertibleand it's usage inAttributeList, so you can always just offer this object directly to the attribute list.This used to be necessary in 0.4.x, but since 0.5.0DirectFixedItemInv.getInvStack(int)just returns the itemstack in the slot index.This used to be necessary in 0.4.x, but since 0.5.0 this is unnecessary.You should use eitherDirectFixedItemInvorFullFixedItemInvinstead of this!Full explanation: As of LBA 0.5.0 there's been a large change to how inventories work to be much closer to vanilla - inventories no longer return immutable stacks from
FixedItemInvView.getInvStack(int), and 2 new sub-interfaces have been created to handle the different ways of using this, eitherFixedItemInv.ModifiableFixedItemInv(which exposes a markDirty() method just like vanillaInventorydoes), orFixedItemInv.CopyingFixedItemInv(which returns copies of the internalItemStackand supports complete filtering and listener capabilities).You should replace this class with either:
FullFixedItemInvif you either need exact per-slot listening or the full filtration capabilitiesDirectFixedItemInvif you'd rather use a more vanilla oriented approach of being able to directly modify items in an inventory.
You should use eitherDirectFixedItemInvorFullFixedItemInvinstead of this!Full explanation: As of LBA 0.5.0 there's been a large change to how inventories work to be much closer to vanilla - inventories no longer return immutable stacks from
FixedItemInvView.getInvStack(int), and 2 new sub-interfaces have been created to handle the different ways of using this, eitherFixedItemInv.ModifiableFixedItemInv(which exposes a markDirty() method just like vanillaInventorydoes), orFixedItemInv.CopyingFixedItemInv(which returns copies of the internalItemStackand supports complete filtering and listener capabilities).You should replace this class with either:
FullFixedItemInvif you either need exact per-slot listening or the full filtration capabilitiesDirectFixedItemInvif you'd rather use a more vanilla oriented approach of being able to directly modify items in an inventory.
UseGroupedItemInvFixedWrapperinstead of this!UseGroupedItemInvFixedWrapperinstead.Because this has been moved toFixedItemInv.extractStack(int, ItemFilter, ItemStack, int, Simulation).Because this has been moved toFixedItemInv.insertStack(int, ItemStack, Simulation).UsePlayerInvUtil.referenceHand(PlayerEntity,Hand)insteadBecause this is ambiguous as the name could refer to the count, or the filter, so instead you should useLimitedFixedItemInv.ItemSlotLimitRule.noInsertionFilter().
-
Deprecated InterfacesInterfaceDescriptionThis has been completely replaced by item-based attribute accessors and
FluidContainerRegistry.
-
Deprecated ClassesClassDescriptionThis has been replaced with
FixedFluidInv.getMappedInv(int...)followed byFixedFluidInv.getExtractable(). (And optionallyFluidExtractable.getPureExtractable()if you only want to expose it as an extractable).This has been replaced withFixedFluidInv.getMappedInv(int...)followed byFixedFluidInv.getInsertable(). (And optionallyFluidInsertable.getPureInsertable()if you only want to expose it as an insertable).BecauseDefaultFluidVolumeRendererdoes everything that this does.Because anyFluidKeycan map to a singleFluid, andSimpleFluidKeyhas a much better name than this.Because anyFluidKeycan map to a singleFluid, andSimpleFluidVolumehas a much better name than this.You should use eitherDirectFixedItemInvorFullFixedItemInvinstead of this!Full explanation: As of LBA 0.5.0 there's been a large change to how inventories work to be much closer to vanilla - inventories no longer return immutable stacks from
FixedItemInvView.getInvStack(int), and 2 new sub-interfaces have been created to handle the different ways of using this, eitherFixedItemInv.ModifiableFixedItemInv(which exposes a markDirty() method just like vanillaInventorydoes), orFixedItemInv.CopyingFixedItemInv(which returns copies of the internalItemStackand supports complete filtering and listener capabilities).You should replace this class with either:
FullFixedItemInvif you either need exact per-slot listening or the full filtration capabilitiesDirectFixedItemInvif you'd rather use a more vanilla oriented approach of being able to directly modify items in an inventory.
UseGroupedItemInvFixedWrapperinstead of this!UseGroupedItemInvFixedWrapperinstead.
-
Deprecated FieldsFieldDescriptionAs
FluidAmount.MAX_BUCKETSshould generally be used instead, however if you really need the absolute value then you can useFluidAmount.ABSOLUTE_MAXIMUM.AsFluidAmount.MIN_BUCKETSshould generally be used instead, however if you really need the absolute minimum value then you can useFluidAmount.ABSOLUTE_MINIMUM.Replaced byGroupedFluidInvView.FluidInvStatistic.amount_Finstead.Replaced byGroupedFluidInvView.FluidInvStatistic.spaceAddable_Finstead.Replaced byGroupedFluidInvView.FluidInvStatistic.spaceTotal_Finstead.Replaced bySimpleFixedFluidInv.tankCapacity_FBecause most of the time you should useFluidKey.unitSetrather than this.Fluids now usefractionsinstead of a single base unit - which makes this completely deprecated with no replacement.Replaced byFluidAmount.BOTTLEReplaced byFluidAmount.BUCKET
-
Deprecated MethodsMethodDescriptionProvided for backwards compatibility - instead you should use
Attribute.appendBlockAdder(CustomAttributeAdder).UseFluidAmount.parse(String)instead.Replaced byFixedFluidInvView.getMaxAmount_F(int)Because this functionality has been fully replaced byConvertibleand it's usage inAttributeList.Replaced byFluidExtractable.extract(FluidAmount)Replaced byFluidExtractable.extract(FluidFilter, FluidAmount).Replaced byFluidExtractable.extract(FluidKey, FluidAmount)This is an override forLimitedConsumer, for the full javadoc you probably want to callFluidInsertable.insert(FluidVolume)directly.This is an override forLimitedConsumer, for the full javadoc you probably want to callFluidInsertable.attemptInsertion(FluidVolume, Simulation)directly.This is an override forLimitedConsumer, for the full javadoc you probably want to callattemptInsertion(FluidVolume, Simulation.SIMULATE) directly.alexiil.mc.lib.attributes.fluid.FluidInvAmountChangeListener_F.asOld(FluidInvAmountChangeListener_F) This has been replaced by the item-based attributes system.This has been replaced by the item-based attributes system.As this has been moved toFixedFluidInv.insertFluid(int, FluidVolume, Simulation)The boolean return has been deprecated, and the main method has been moved toFluidInvUtil.interactCursorWithTank(FixedFluidInv, ServerPlayerEntity)The boolean return has been deprecated, and the main method has been moved toFluidInvUtil.interactCursorWithTank(FluidInsertable, FluidExtractable, ServerPlayerEntity)The boolean return has been deprecated, and the main method has been moved toFluidInvUtil.interactCursorWithTank(FluidTransferable, ServerPlayerEntity)This has been replaced byFluidInvUtil.interactItemWithTank(FixedFluidInv, Reference, LimitedConsumer).UseFluidInvUtil.interactItemWithTank(FixedFluidInv, Reference, LimitedConsumer)instead: all interactWithTank methods have been moved toFluidInvUtil.The boolean return has been deprecated, and the main method has been moved toFluidInvUtil.interactHandWithTank(FixedFluidInv, PlayerEntity, Hand)This has been replaced byFluidInvUtil.interactItemWithTank(FluidInsertable, FluidExtractable, Reference, LimitedConsumer).UseFluidInvUtil.interactItemWithTank(FluidInsertable, FluidExtractable, Reference, LimitedConsumer)instead: all interactWithTank methods have been moved toFluidInvUtil.The boolean return has been deprecated, and the main method has been moved toFluidInvUtil.interactWithTank(FluidInsertable, FluidExtractable, PlayerEntity, Reference)The boolean return has been deprecated, and the main method has been moved toFluidInvUtil.interactHandWithTank(FluidInsertable, FluidExtractable, PlayerEntity, Hand)This has been replaced byFluidInvUtil.interactItemWithTank(FluidTransferable, Reference, LimitedConsumer).UseFluidInvUtil.interactItemWithTank(FluidTransferable, Reference, LimitedConsumer)instead: all interactWithTank methods have been moved toFluidInvUtil.The boolean return has been deprecated, and the main method has been moved toFluidInvUtil.interactHandWithTank(FluidTransferable, PlayerEntity, Hand)Replaced byGroupedFluidInvView.getAmount_F(FluidFilter)Replaced byGroupedFluidInvView.getAmount_F(FluidKey)Replaced byGroupedFluidInvView.getCapacity_F(FluidKey)Replaced byGroupedFluidInvView.getSpace_F(FluidKey)Replaced byGroupedFluidInvView.getTotalCapacity_F()Replaced bySimpleFixedFluidInv.getMaxAmount_F(int).Because this is ambiguous as the name could refer to the count, or the filter, so instead you should useLimitedFixedFluidInv.FluidTankLimitRule.noInsertionFilter()UseFluidVolumeRenderer.renderSimpleFluid(List, VertexConsumer, MatrixStack, Sprite, Sprite, int)instead, which takes both the still and flowing sprites.Replaced bySingleFluidTankView.getMaxAmount_F().Because I think fluids are meant to be all statically created?UseObject.equals(Object)instead of this.Replaced byFluidVolume.getAmount_F()andFluidVolume.amount().Replaced byFluidVolume.getRawAmount_F().Replaced byFluidVolume.getFullTooltip().becauseFluidVolume.mergeInternal(FluidVolume, FluidMergeResult)allows every method to share the sameFluidAmount.FluidMergeResultobject, which reduces the chance to make a mistake when merging the two amounts. In addition it's a bit wasteful to re-compute the same value more than once.So instead of overriding this it's recommended that you only override
FluidVolume.mergeInternal(FluidVolume, FluidMergeResult).Replaced byFluidVolume.split(FluidAmount)As the flowing sprite ID is needed as well.Replaced byPotionFluidKey.withAmount(FluidAmount).Replaced byFluidVolume.getFullTooltip().Because this functionality has been fully replaced byConvertibleand it's usage inAttributeList, so you can always just offer this object directly to the attribute list.This used to be necessary in 0.4.x, but since 0.5.0DirectFixedItemInv.getInvStack(int)just returns the itemstack in the slot index.This used to be necessary in 0.4.x, but since 0.5.0 this is unnecessary.This is an override forLimitedConsumer, for the full javadoc you probably want to callItemInsertable.insert(ItemStack)directly.This is an override forLimitedConsumer, for the full javadoc you probably want to callItemInsertable.attemptInsertion(ItemStack, Simulation)directly.Because this has been moved toFixedItemInv.extractStack(int, ItemFilter, ItemStack, int, Simulation).Because this has been moved toFixedItemInv.insertStack(int, ItemStack, Simulation).UsePlayerInvUtil.referenceHand(PlayerEntity,Hand)insteadBecause this is ambiguous as the name could refer to the count, or the filter, so instead you should useLimitedFixedItemInv.ItemSlotLimitRule.noInsertionFilter().
-
Deprecated ConstructorsConstructorDescriptionKept for backwards compatibility, instead you should call
Attribute(Class)followed byAttribute.appendBlockAdder(CustomAttributeAdder).Kept for backwards compatibility, instead you should callDefaultedAttribute(Class, Object)followed byDefaultedAttribute.appendBlockAdder(CustomAttributeAdder).AsFluidAmount.ofWhole(long)should be used instead.Replaced byJumboFixedFluidInv(int, FluidAmount).Replaced bySimpleFixedFluidInv(int, FluidAmount).because it's recommended to create aColouredFluidKey.ColouredFluidKeyBuilderinstead and pass that toBiomeSourcedFluidKey(ColouredFluidKeyBuilder).As the flowing sprite ID is needed as well.Replaced byFluidUnit(FluidAmount, String).alexiil.mc.lib.attributes.fluid.volume.NormalFluidKey.NormalFluidKeyBuilder(Fluid, Identifier, Text) As the flowing sprite ID is needed as well.You should use eitherDirectFixedItemInvorFullFixedItemInvinstead of this!Full explanation: As of LBA 0.5.0 there's been a large change to how inventories work to be much closer to vanilla - inventories no longer return immutable stacks from
FixedItemInvView.getInvStack(int), and 2 new sub-interfaces have been created to handle the different ways of using this, eitherFixedItemInv.ModifiableFixedItemInv(which exposes a markDirty() method just like vanillaInventorydoes), orFixedItemInv.CopyingFixedItemInv(which returns copies of the internalItemStackand supports complete filtering and listener capabilities).You should replace this class with either:
FullFixedItemInvif you either need exact per-slot listening or the full filtration capabilitiesDirectFixedItemInvif you'd rather use a more vanilla oriented approach of being able to directly modify items in an inventory.
-
Deprecated Enum Constants
Attribute(Class)followed byAttribute.appendBlockAdder(CustomAttributeAdder).