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

    Constructors
    Constructor
    Description
    ItemEnergyStorage(net.minecraft.world.item.ItemStack stack, int capacity)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 interface net.neoforged.neoforge.energy.IEnergyStorage
      Overrides:
      receiveEnergy in class net.neoforged.neoforge.energy.EnergyStorage
    • extractEnergy

      public int extractEnergy(int maxExtract, boolean simulate)
      Specified by:
      extractEnergy in interface net.neoforged.neoforge.energy.IEnergyStorage
      Overrides:
      extractEnergy in class net.neoforged.neoforge.energy.EnergyStorage