Class VanillaEntityItemFrameEnergyStorage

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

public class VanillaEntityItemFrameEnergyStorage extends VanillaEntityItemFrameCapabilityDelegator<net.neoforged.neoforge.energy.IEnergyStorage> implements net.neoforged.neoforge.energy.IEnergyStorage
An energy handler for entity item frames that have an energy handler.
  • Constructor Details

    • VanillaEntityItemFrameEnergyStorage

      public VanillaEntityItemFrameEnergyStorage(net.minecraft.world.entity.decoration.ItemFrame entity)
  • Method Details

    • getCapabilityType

      protected net.neoforged.neoforge.capabilities.ItemCapability<net.neoforged.neoforge.energy.IEnergyStorage,Void> getCapabilityType()
      Specified by:
      getCapabilityType in class VanillaEntityItemFrameCapabilityDelegator<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