mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-19 11:59:17 +00:00
#1397 Completed refactor splitting machines into no powered, power receivers, power generators and power handlers (power in and out)
This commit is contained in:
1 parent
10c928591e
commit
d4b5fd5a61
56 files changed
+458
-405
No files matched your search
@@ -10,9 +10,8 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
import crazypants.enderio.machine.IMachineRecipe.ResultStack;
|
||||
import crazypants.enderio.network.PacketHandler;
|
||||
import crazypants.enderio.power.IInternalPowerReceiver;
|
||||
import crazypants.enderio.power.PowerHandlerUtil;
|
||||
|
||||
public abstract class AbstractPoweredTaskEntity extends AbstractMachineEntity implements IInternalPowerReceiver {
|
||||
public abstract class AbstractPoweredTaskEntity extends AbstractPowerConsumerEntity implements IInternalPowerReceiver {
|
||||
|
||||
protected IPoweredTask currentTask = null;
|
||||
protected IMachineRecipe lastCompletedRecipe;
|
||||
@@ -71,26 +70,6 @@ public abstract class AbstractPoweredTaskEntity extends AbstractMachineEntity im
|
||||
return currentTask == null ? 0 : currentTask.getProgress();
|
||||
}
|
||||
|
||||
//RF API Power
|
||||
|
||||
@Override
|
||||
public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate) {
|
||||
if(isSideDisabled(from.ordinal())) {
|
||||
return 0;
|
||||
}
|
||||
return PowerHandlerUtil.recieveInternal(this, maxReceive, from, simulate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEnergyStored(ForgeDirection from) {
|
||||
return getEnergyStored();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxEnergyStored(ForgeDirection from) {
|
||||
return getMaxEnergyStored();
|
||||
}
|
||||
|
||||
public IPoweredTask getCurrentTask() {
|
||||
return currentTask;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user