Fix issues with Wooden Engine

Closes #1253
This commit is contained in:
CovertJaguar 2013-10-08 11:02:14 -07:00
parent 0a004e4383
commit fb0ee91183
4 changed files with 5 additions and 7 deletions

View file

@ -18,7 +18,6 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import buildcraft.BuildCraftEnergy; import buildcraft.BuildCraftEnergy;
import buildcraft.api.core.Position;
import buildcraft.api.gates.IOverrideDefaultTriggers; import buildcraft.api.gates.IOverrideDefaultTriggers;
import buildcraft.api.gates.ITrigger; import buildcraft.api.gates.ITrigger;
import buildcraft.api.power.IPowerEmitter; import buildcraft.api.power.IPowerEmitter;

View file

@ -7,6 +7,7 @@
*/ */
package buildcraft.energy; package buildcraft.energy;
import buildcraft.api.power.PowerHandler;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import buildcraft.api.transport.IPipeTile.PipeType; import buildcraft.api.transport.IPipeTile.PipeType;
@ -52,10 +53,8 @@ public class TileEngineWood extends TileEngine {
@Override @Override
public float getPistonSpeed() { public float getPistonSpeed() {
if (CoreProxy.proxy.isSimulating(worldObj)) if (CoreProxy.proxy.isSimulating(worldObj))
return Math.max(0.8f * getHeatLevel(), 0.01f); return Math.max(0.08f * getHeatLevel(), 0.01f);
switch (getEnergyStage()) { switch (getEnergyStage()) {
case BLUE:
return 0.01F;
case GREEN: case GREEN:
return 0.02F; return 0.02F;
case YELLOW: case YELLOW:
@ -63,7 +62,7 @@ public class TileEngineWood extends TileEngine {
case RED: case RED:
return 0.08F; return 0.08F;
default: default:
return 0; return 0.01F;
} }
} }
@ -72,7 +71,7 @@ public class TileEngineWood extends TileEngine {
super.engineUpdate(); super.engineUpdate();
if (isRedstonePowered) if (isRedstonePowered)
if (worldObj.getTotalWorldTime() % 20 == 0) if (worldObj.getTotalWorldTime() % 16 == 0)
addEnergy(1); addEnergy(1);
} }
@ -103,6 +102,6 @@ public class TileEngineWood extends TileEngine {
@Override @Override
public float maxEnergyExtracted() { public float maxEnergyExtracted() {
return 1; return 1 + PowerHandler.PerditionCalculator.MIN_POWERLOSS;
} }
} }