fix style
This commit is contained in:
parent
5f5b95dd9a
commit
9686830173
3 changed files with 9 additions and 10 deletions
|
@ -134,7 +134,7 @@ public abstract class TileEngine extends TileBuildCraft implements IPowerRecepto
|
|||
}
|
||||
|
||||
public double getEnergyLevel() {
|
||||
return (double)energy / getMaxEnergy();
|
||||
return ((double) energy) / getMaxEnergy();
|
||||
}
|
||||
|
||||
protected EnergyStage computeEnergyStage() {
|
||||
|
@ -228,13 +228,13 @@ public abstract class TileEngine extends TileBuildCraft implements IPowerRecepto
|
|||
|
||||
if (!isOrientationValid()) {
|
||||
switchOrientation(true);
|
||||
}else{
|
||||
} else {
|
||||
TileEntity tile = getTileBuffer(orientation).getTile();
|
||||
|
||||
if(isPoweredTile(tile, orientation)){
|
||||
if((tile instanceof IPipeTile) && (((IPipeTile) tile).getPipeType() != PipeType.POWER)){
|
||||
if (isPoweredTile(tile, orientation)) {
|
||||
if ((tile instanceof IPipeTile) && (((IPipeTile) tile).getPipeType() != PipeType.POWER)) {
|
||||
constantPower = false;
|
||||
}else{
|
||||
} else {
|
||||
constantPower = true;
|
||||
}
|
||||
}
|
||||
|
@ -510,8 +510,8 @@ public abstract class TileEngine extends TileBuildCraft implements IPowerRecepto
|
|||
}
|
||||
}
|
||||
|
||||
public int extractEnergy(int min, int max, boolean doExtract) {
|
||||
max = Math.min(max, maxEnergyExtracted());
|
||||
public int extractEnergy(int min, int energyMax, boolean doExtract) {
|
||||
int max = Math.min(energyMax, maxEnergyExtracted());
|
||||
|
||||
if (max < min || energy < min) {
|
||||
return 0;
|
||||
|
|
|
@ -75,9 +75,8 @@ public class TileEngineStone extends TileEngineWithInventory {
|
|||
public void burn() {
|
||||
if (burnTime > 0) {
|
||||
burnTime--;
|
||||
if(isRedstonePowered){
|
||||
if (isRedstonePowered) {
|
||||
currentOutput = calculateCurrentOutput();
|
||||
|
||||
addEnergy(currentOutput);
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -192,7 +192,7 @@ public class PipeItemsWood extends Pipe<PipeTransportItems> implements IEnergyHa
|
|||
|
||||
if (slot != null && slot.stackSize > 0 && inventory.canExtractItem(k, slot, from.ordinal())) {
|
||||
if (doRemove) {
|
||||
int stackSize = battery.useEnergy(10, slot.stackSize*10, false)/10;
|
||||
int stackSize = battery.useEnergy(10, slot.stackSize * 10, false) / 10;
|
||||
|
||||
return inventory.decrStackSize(k, stackSize);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue