Some changes to external apis for EnumFacing

This commit is contained in:
Ben Spiers committed 2016-01-22 00:21:12 +00:00
1 parent 245d5ed471
commit 569305d3cd
4 files changed
+10 -11

No files matched your search

@@ -1,6 +1,6 @@
package cofh.api.energy;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraft.util.EnumFacing;
/**
* Implement this interface on TileEntities which should connect to energy transportation blocks. This is intended for blocks which generate energy but do not
@@ -16,6 +16,6 @@ public interface IEnergyConnection {
/**
* Returns TRUE if the TileEntity can connect on a given side.
*/
boolean canConnectEnergy(ForgeDirection from);
boolean canConnectEnergy(EnumFacing from);
}
@@ -1,6 +1,6 @@
package cofh.api.energy;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraft.util.EnumFacing;
/**
* Implement this interface on Tile Entities which should receive energy, generally storing it in one or more internal {@link IEnergyStorage} objects.
@@ -23,16 +23,16 @@ public interface IEnergyReceiver extends IEnergyConnection {
* If TRUE, the charge will only be simulated.
* @return Amount of energy that was (or would have been, if simulated) received.
*/
int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate);
int receiveEnergy(EnumFacing from, int maxReceive, boolean simulate);
/**
* Returns the amount of energy currently stored.
*/
int getEnergyStored(ForgeDirection from);
int getEnergyStored(EnumFacing from);
/**
* Returns the maximum amount of energy that can be stored.
*/
int getMaxEnergyStored(ForgeDirection from);
int getMaxEnergyStored(EnumFacing from);
}
@@ -1,8 +1,7 @@
package ic2.api.energy.tile;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraft.util.EnumFacing;
/**
* For internal/multi-block usage only.
@@ -22,6 +21,6 @@ public interface IEnergyAcceptor extends IEnergyTile {
* @param emitter energy emitter, may also be null or an IMetaDelegate
* @param direction direction the energy is being received from
*/
boolean acceptsEnergyFrom(TileEntity emitter, ForgeDirection direction);
boolean acceptsEnergyFrom(TileEntity emitter, EnumFacing direction);
}
@@ -1,6 +1,6 @@
package ic2.api.energy.tile;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraft.util.EnumFacing;
/**
* Allows a tile entity (mostly a machine) to receive energy.
@@ -40,6 +40,6 @@ public interface IEnergySink extends IEnergyAcceptor {
* @param amount energy to be transferred
* @return Energy not consumed (leftover)
*/
double injectEnergy(ForgeDirection directionFrom, double amount, double voltage);
double injectEnergy(EnumFacing directionFrom, double amount, double voltage);
}