Class EnergyStorageItemBlockEnergyContainer

java.lang.Object
org.cyclops.integrateddynamics.capability.energystorage.EnergyStorageItemBlockEnergyContainer
All Implemented Interfaces:
net.neoforged.neoforge.energy.IEnergyStorage, IEnergyStorageCapacity, IEnergyStorageMutable

public class EnergyStorageItemBlockEnergyContainer extends Object implements IEnergyStorageCapacity, IEnergyStorageMutable
Energy Battery implementation for ItemBlock's.
  • Constructor Details

    • EnergyStorageItemBlockEnergyContainer

      public EnergyStorageItemBlockEnergyContainer(ItemBlockEnergyContainer itemBlockEnergyContainer, net.minecraft.world.item.ItemStack itemStack, int rate)
    • EnergyStorageItemBlockEnergyContainer

      public EnergyStorageItemBlockEnergyContainer(ItemBlockEnergyContainer itemBlockEnergyContainer, net.minecraft.world.item.ItemStack itemStack)
  • Method Details

    • getRate

      public int getRate()
    • isCreative

      public boolean isCreative()
    • getEnergyStoredSingular

      protected int getEnergyStoredSingular()
    • getEnergyStored

      public int getEnergyStored()
      Specified by:
      getEnergyStored in interface net.neoforged.neoforge.energy.IEnergyStorage
    • getEnergyStoredLong

      public long getEnergyStoredLong()
    • getMaxEnergyStoredSingular

      public int getMaxEnergyStoredSingular()
    • getMaxEnergyStored

      public int getMaxEnergyStored()
      Specified by:
      getMaxEnergyStored in interface net.neoforged.neoforge.energy.IEnergyStorage
    • getMaxEnergyStoredLong

      public long getMaxEnergyStoredLong()
    • canExtract

      public boolean canExtract()
      Specified by:
      canExtract in interface net.neoforged.neoforge.energy.IEnergyStorage
    • canReceive

      public boolean canReceive()
      Specified by:
      canReceive in interface net.neoforged.neoforge.energy.IEnergyStorage
    • receiveEnergy

      public int receiveEnergy(int energy, boolean simulate)
      Specified by:
      receiveEnergy in interface net.neoforged.neoforge.energy.IEnergyStorage
    • extractEnergy

      public int extractEnergy(int energy, boolean simulate)
      Specified by:
      extractEnergy in interface net.neoforged.neoforge.energy.IEnergyStorage
    • setItemStackEnergy

      protected void setItemStackEnergy(net.minecraft.world.item.ItemStack itemStack, int energy)
    • setCapacity

      public void setCapacity(int capacity)
      Specified by:
      setCapacity in interface IEnergyStorageCapacity
    • setEnergy

      public void setEnergy(int energy)
      Specified by:
      setEnergy in interface IEnergyStorageMutable