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 Summary
ConstructorDescriptionVanillaEntityItemFrameEnergyStorage
(net.minecraft.world.entity.decoration.ItemFrame entity) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
int
extractEnergy
(int maxExtract, boolean simulate) protected net.neoforged.neoforge.capabilities.ItemCapability
<net.neoforged.neoforge.energy.IEnergyStorage, Void> int
int
int
receiveEnergy
(int maxReceive, boolean simulate) Methods inherited from class org.cyclops.commoncapabilities.modcompat.vanilla.capability.VanillaEntityItemFrameCapabilityDelegator
getCapability, getCapability, getEntity, getItemStack, updateItemStack
-
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 classVanillaEntityItemFrameCapabilityDelegator<net.neoforged.neoforge.energy.IEnergyStorage>
-
receiveEnergy
public int receiveEnergy(int maxReceive, boolean simulate) - Specified by:
receiveEnergy
in interfacenet.neoforged.neoforge.energy.IEnergyStorage
-
extractEnergy
public int extractEnergy(int maxExtract, boolean simulate) - Specified by:
extractEnergy
in interfacenet.neoforged.neoforge.energy.IEnergyStorage
-
getEnergyStored
public int getEnergyStored()- Specified by:
getEnergyStored
in interfacenet.neoforged.neoforge.energy.IEnergyStorage
-
getMaxEnergyStored
public int getMaxEnergyStored()- Specified by:
getMaxEnergyStored
in interfacenet.neoforged.neoforge.energy.IEnergyStorage
-
canExtract
public boolean canExtract()- Specified by:
canExtract
in interfacenet.neoforged.neoforge.energy.IEnergyStorage
-
canReceive
public boolean canReceive()- Specified by:
canReceive
in interfacenet.neoforged.neoforge.energy.IEnergyStorage
-