Power system re-write, recipe fixes.
Please note that this version breaks all wires placed in worlds before.
This commit is contained in:
parent
25c581e129
commit
d982cc4028
33 changed files with 507 additions and 859 deletions
|
@ -13,6 +13,7 @@ import reborncore.common.util.ItemUtils;
|
|||
import techreborn.api.reactor.FusionReactorRecipe;
|
||||
import techreborn.api.reactor.FusionReactorRecipeHelper;
|
||||
import techreborn.init.ModBlocks;
|
||||
import techreborn.power.PowerNet;
|
||||
|
||||
public class TileEntityFusionController extends TilePowerAcceptor implements IInventoryProvider
|
||||
{
|
||||
|
@ -36,8 +37,7 @@ public class TileEntityFusionController extends TilePowerAcceptor implements IIn
|
|||
}
|
||||
|
||||
@Override
|
||||
public double getMaxPower()
|
||||
{
|
||||
public double getMaxPower() {
|
||||
return 100000000;
|
||||
}
|
||||
|
||||
|
@ -64,10 +64,8 @@ public class TileEntityFusionController extends TilePowerAcceptor implements IIn
|
|||
}
|
||||
|
||||
@Override
|
||||
public double getMaxInput()
|
||||
{
|
||||
if (hasStartedCrafting)
|
||||
{
|
||||
public double getMaxInput() {
|
||||
if (hasStartedCrafting) {
|
||||
return 0;
|
||||
}
|
||||
return 8192;
|
||||
|
@ -275,6 +273,12 @@ public class TileEntityFusionController extends TilePowerAcceptor implements IIn
|
|||
{
|
||||
inventory.hasChanged = false;
|
||||
}
|
||||
|
||||
if (!worldObj.isRemote && getEnergy() > 0 && hasStartedCrafting) {
|
||||
double maxOutput = getEnergy() > getMaxOutput() ? getMaxOutput() : getEnergy();
|
||||
useEnergy(PowerNet.dispatchEnergyPacket(worldObj, getPos(), maxOutput));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private boolean validateRecipe()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue