Class EnergyHelpers
java.lang.Object
org.cyclops.integrateddynamics.core.helper.EnergyHelpers
Helpers related to energy.
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addEnergyStorageProxy
(EnergyHelpers.IEnergyStorageProxy energyStorageProxy) 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.static Optional
<net.neoforged.neoforge.energy.IEnergyStorage> getEnergyStorage
(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction facing) static Optional
<net.neoforged.neoforge.energy.IEnergyStorage> getEnergyStorage
(org.cyclops.cyclopscore.datastructure.DimPos pos, net.minecraft.core.Direction facing) static Optional
<net.neoforged.neoforge.energy.IEnergyStorage> getEnergyStorage
(PartPos pos)
-
Constructor Details
-
EnergyHelpers
public EnergyHelpers()
-
-
Method Details
-
addEnergyStorageProxy
-
getEnergyStorage
-
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.
-