Class ExpandIEnergyStorage
java.lang.Object
com.blamejared.crafttweaker.natives.capability.ExpandIEnergyStorage
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancanExtract(net.minecraftforge.energy.IEnergyStorage internal) Checks if energy can be extracted from this storage.static booleancanReceive(net.minecraftforge.energy.IEnergyStorage internal) Checks if this storage can receive energy.static intextractEnergy(net.minecraftforge.energy.IEnergyStorage internal, int maxExtract, boolean simulate) Extracts energy from the storage.static intgetEnergyStored(net.minecraftforge.energy.IEnergyStorage internal) Gets the amount of energy stored.static intgetMaxEnergyStored(net.minecraftforge.energy.IEnergyStorage internal) Gets the max energy that can be stored.static intreceiveEnergy(net.minecraftforge.energy.IEnergyStorage internal, int maxReceive, boolean simulate) Adds energy to the storage.
-
Constructor Details
-
ExpandIEnergyStorage
public ExpandIEnergyStorage()
-
-
Method Details
-
receiveEnergy
public static int receiveEnergy(net.minecraftforge.energy.IEnergyStorage internal, int maxReceive, boolean simulate) Adds energy to the storage.- Parameters:
maxReceive- The max amount of energy to be inserted.simulate- If the energy should actually be inserted or not.- Returns:
- the amount of energy that was accepted.
- DocParam:
- maxReceive 300, simulate false
-
extractEnergy
public static int extractEnergy(net.minecraftforge.energy.IEnergyStorage internal, int maxExtract, boolean simulate) Extracts energy from the storage.- Parameters:
maxExtract- The max amount of energy to be extracted.simulate- If the energy should actually be extracted or not.- Returns:
- the amount of energy that was extracted.
- DocParam:
- maxExtract 400, simulate false
-
getEnergyStored
public static int getEnergyStored(net.minecraftforge.energy.IEnergyStorage internal) Gets the amount of energy stored.- Returns:
- The amount of energy stored.
-
getMaxEnergyStored
public static int getMaxEnergyStored(net.minecraftforge.energy.IEnergyStorage internal) Gets the max energy that can be stored.- Returns:
- The max energy that can be stored.
-
canExtract
public static boolean canExtract(net.minecraftforge.energy.IEnergyStorage internal) Checks if energy can be extracted from this storage.- Returns:
- true if the storage can be extracted from, false otherwise.
-
canReceive
public static boolean canReceive(net.minecraftforge.energy.IEnergyStorage internal) Checks if this storage can receive energy.- Returns:
- true if this storage can receive energy, false otherwise.
-