Class EnergyHelpers

java.lang.Object
org.cyclops.integrateddynamics.core.helper.EnergyHelpers

public class EnergyHelpers extends Object
Helpers related to energy.
  • Constructor Details

    • EnergyHelpers

      public EnergyHelpers()
  • Method Details

    • addEnergyStorageProxy

      public static void addEnergyStorageProxy(EnergyHelpers.IEnergyStorageProxy energyStorageProxy)
    • getEnergyStorage

      public static Optional<net.neoforged.neoforge.energy.IEnergyStorage> getEnergyStorage(PartPos pos)
    • getEnergyStorage

      public static Optional<net.neoforged.neoforge.energy.IEnergyStorage> getEnergyStorage(org.cyclops.cyclopscore.datastructure.DimPos pos, net.minecraft.core.Direction facing)
    • getEnergyStorage

      public static Optional<net.neoforged.neoforge.energy.IEnergyStorage> getEnergyStorage(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction facing)
    • fillNeigbours

      public static int fillNeigbours(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, int energy, boolean simulate)
      Attempty to fill the neighbouring tiles with energy.
      Parameters:
      world - The world.
      pos - The filler's position.
      energy - The energy to add.
      simulate - If the filling should be simulated.
      Returns:
      The amount of energy that was filled somewhere.