java.lang.Object
org.cyclops.commoncapabilities.modcompat.vanilla.capability.VanillaEntityItemCapabilityDelegator<net.neoforged.neoforge.energy.IEnergyStorage>
org.cyclops.commoncapabilities.modcompat.vanilla.capability.energystorage.VanillaEntityItemEnergyStorage
All Implemented Interfaces:
net.neoforged.neoforge.energy.IEnergyStorage

public class VanillaEntityItemEnergyStorage extends VanillaEntityItemCapabilityDelegator<net.neoforged.neoforge.energy.IEnergyStorage> implements net.neoforged.neoforge.energy.IEnergyStorage
An energy handler for entity items that have an energy handler.
  • Constructor Details

    • VanillaEntityItemEnergyStorage

      public VanillaEntityItemEnergyStorage(net.minecraft.world.entity.item.ItemEntity entity)
  • Method Details

    • getCapabilityType

      protected net.neoforged.neoforge.capabilities.ItemCapability<net.neoforged.neoforge.energy.IEnergyStorage,Void> getCapabilityType()
      Specified by:
      getCapabilityType in class VanillaEntityItemCapabilityDelegator<net.neoforged.neoforge.energy.IEnergyStorage>
    • receiveEnergy

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

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

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

      public int getMaxEnergyStored()
      Specified by:
      getMaxEnergyStored in interface net.neoforged.neoforge.energy.IEnergyStorage
    • 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