Class EnergyStorageItemBlockEnergyContainer
java.lang.Object
org.cyclops.integrateddynamics.capability.energystorage.EnergyStorageItemBlockEnergyContainer
- All Implemented Interfaces:
net.minecraftforge.energy.IEnergyStorage
,IEnergyStorageCapacity
,IEnergyStorageMutable
public class EnergyStorageItemBlockEnergyContainer
extends Object
implements IEnergyStorageCapacity, IEnergyStorageMutable
Energy Battery implementation for ItemBlock's.
-
Constructor Summary
ConstructorDescriptionEnergyStorageItemBlockEnergyContainer
(ItemBlockEnergyContainer itemBlockEnergyContainer, net.minecraft.world.item.ItemStack itemStack) EnergyStorageItemBlockEnergyContainer
(ItemBlockEnergyContainer itemBlockEnergyContainer, net.minecraft.world.item.ItemStack itemStack, int rate) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
int
extractEnergy
(int energy, boolean simulate) int
long
protected int
int
long
int
int
getRate()
boolean
int
receiveEnergy
(int energy, boolean simulate) void
setCapacity
(int capacity) void
setEnergy
(int energy) protected void
setItemStackEnergy
(net.minecraft.world.item.ItemStack itemStack, int energy)
-
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 interfacenet.minecraftforge.energy.IEnergyStorage
-
getEnergyStoredLong
public long getEnergyStoredLong() -
getMaxEnergyStoredSingular
public int getMaxEnergyStoredSingular() -
getMaxEnergyStored
public int getMaxEnergyStored()- Specified by:
getMaxEnergyStored
in interfacenet.minecraftforge.energy.IEnergyStorage
-
getMaxEnergyStoredLong
public long getMaxEnergyStoredLong() -
canExtract
public boolean canExtract()- Specified by:
canExtract
in interfacenet.minecraftforge.energy.IEnergyStorage
-
canReceive
public boolean canReceive()- Specified by:
canReceive
in interfacenet.minecraftforge.energy.IEnergyStorage
-
receiveEnergy
public int receiveEnergy(int energy, boolean simulate) - Specified by:
receiveEnergy
in interfacenet.minecraftforge.energy.IEnergyStorage
-
extractEnergy
public int extractEnergy(int energy, boolean simulate) - Specified by:
extractEnergy
in interfacenet.minecraftforge.energy.IEnergyStorage
-
setItemStackEnergy
protected void setItemStackEnergy(net.minecraft.world.item.ItemStack itemStack, int energy) -
setCapacity
public void setCapacity(int capacity) - Specified by:
setCapacity
in interfaceIEnergyStorageCapacity
-
setEnergy
public void setEnergy(int energy) - Specified by:
setEnergy
in interfaceIEnergyStorageMutable
-