mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-18 19:39:14 +00:00
#925 EnderIO Machines will not accept power from Universal Cables (Mekanism)
This commit is contained in:
1 parent
a3ac86e3f8
commit
2a6b99bd15
1 file changed
+4
-4
@@ -113,17 +113,17 @@ public class PowerHandlerUtil {
|
||||
}
|
||||
|
||||
public static int recieveRedstoneFlux(ForgeDirection from, PowerHandler powerHandler, int maxReceive, boolean simulate, boolean tickPH) {
|
||||
int canRecieve = (int) getMaxEnergyRecievedMj(powerHandler, maxReceive / 10, from);
|
||||
double canRecieve = getMaxEnergyRecievedMj(powerHandler, maxReceive / 10d, from);
|
||||
if(!simulate) {
|
||||
if(tickPH) {
|
||||
doBuildCraftEnergyTick(powerHandler, from);
|
||||
}
|
||||
powerHandler.setEnergy(powerHandler.getEnergyStored() + canRecieve);
|
||||
}
|
||||
return canRecieve * 10;
|
||||
return (int)(canRecieve * 10);
|
||||
}
|
||||
|
||||
public static float getMaxEnergyRecievedMj(PowerHandler ph, float max, ForgeDirection from) {
|
||||
public static double getMaxEnergyRecievedMj(PowerHandler ph, double max, ForgeDirection from) {
|
||||
if(ph == null) {
|
||||
return 0;
|
||||
}
|
||||
@@ -133,7 +133,7 @@ public class PowerHandlerUtil {
|
||||
if(canRecieve <= ph.getMinEnergyReceived()) {
|
||||
return 0;
|
||||
}
|
||||
return (float) canRecieve;
|
||||
return canRecieve;
|
||||
}
|
||||
|
||||
public static void doBuildCraftEnergyTick(PowerHandler ph, ForgeDirection from) {
|
||||
|
||||
Reference in new issue
Block a user