Package me.desht.pneumaticcraft.api.item
Interface ItemVolumeModifier
- All Known Implementing Classes:
HoldingEnchantableProvider.COFHVolumeModifier
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A functional interface to modify a given Pneumatic item's effective volume based on attributes of the item stack
(generally values in its NBT, e.g. upgrades or enchantments). Instances of this can be registered
with
IItemRegistry.registerPneumaticVolumeModifier(ItemVolumeModifier).-
Method Summary
Modifier and TypeMethodDescriptiondefault voidAdd some information regarding this volume modifier for GUI display purposes; this information will be displayed in the Charging Station upgrade screen for the item in the Charging Station.intgetNewVolume(net.minecraft.world.item.ItemStack stack, int oldVolume) Given an item stack, which is a pneumatic item, and its current volume, return a new, modified volume
-
Method Details
-
getNewVolume
int getNewVolume(net.minecraft.world.item.ItemStack stack, int oldVolume) Given an item stack, which is a pneumatic item, and its current volume, return a new, modified volume- Parameters:
stack- the itemoldVolume- the initial volume- Returns:
- the modified volume
-
addInfo
default void addInfo(net.minecraft.world.item.ItemStack stack, List<net.minecraft.network.chat.Component> text) Add some information regarding this volume modifier for GUI display purposes; this information will be displayed in the Charging Station upgrade screen for the item in the Charging Station.- Parameters:
stack- the itemtext- information text to be appended to
-