Class ItemEnergyStorage
java.lang.Object
net.neoforged.neoforge.energy.EnergyStorage
com.refinedmods.refinedstorage.energy.ItemEnergyStorage
- All Implemented Interfaces:
net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.Tag>
,net.neoforged.neoforge.energy.IEnergyStorage
public class ItemEnergyStorage
extends net.neoforged.neoforge.energy.EnergyStorage
-
Field Summary
Fields inherited from class net.neoforged.neoforge.energy.EnergyStorage
capacity, energy, maxExtract, maxReceive
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
extractEnergy
(int maxExtract, boolean simulate) int
receiveEnergy
(int maxReceive, boolean simulate) Methods inherited from class net.neoforged.neoforge.energy.EnergyStorage
canExtract, canReceive, deserializeNBT, getEnergyStored, getMaxEnergyStored, serializeNBT
-
Constructor Details
-
ItemEnergyStorage
public ItemEnergyStorage(net.minecraft.world.item.ItemStack stack, int capacity)
-
-
Method Details
-
receiveEnergy
public int receiveEnergy(int maxReceive, boolean simulate) - Specified by:
receiveEnergy
in interfacenet.neoforged.neoforge.energy.IEnergyStorage
- Overrides:
receiveEnergy
in classnet.neoforged.neoforge.energy.EnergyStorage
-
extractEnergy
public int extractEnergy(int maxExtract, boolean simulate) - Specified by:
extractEnergy
in interfacenet.neoforged.neoforge.energy.IEnergyStorage
- Overrides:
extractEnergy
in classnet.neoforged.neoforge.energy.EnergyStorage
-