Class ExpandIEnergyStorage

java.lang.Object
com.blamejared.crafttweaker.natives.capability.ExpandIEnergyStorage

@ZenRegister public class ExpandIEnergyStorage extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    canExtract(net.minecraftforge.energy.IEnergyStorage internal)
    Checks if energy can be extracted from this storage.
    static boolean
    canReceive(net.minecraftforge.energy.IEnergyStorage internal)
    Checks if this storage can receive energy.
    static int
    extractEnergy(net.minecraftforge.energy.IEnergyStorage internal, int maxExtract, boolean simulate)
    Extracts energy from the storage.
    static int
    getEnergyStored(net.minecraftforge.energy.IEnergyStorage internal)
    Gets the amount of energy stored.
    static int
    getMaxEnergyStored(net.minecraftforge.energy.IEnergyStorage internal)
    Gets the max energy that can be stored.
    static int
    receiveEnergy(net.minecraftforge.energy.IEnergyStorage internal, int maxReceive, boolean simulate)
    Adds energy to the storage.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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.