Skip to content

Commit

Permalink
Fix issues with Wooden Engine
Browse files Browse the repository at this point in the history
Closes #1253
  • Loading branch information
CovertJaguar committed Oct 8, 2013
1 parent 0a004e4 commit fb0ee91
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
1 change: 0 additions & 1 deletion common/buildcraft/energy/TileEngine.java
Expand Up @@ -18,7 +18,6 @@
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.ForgeDirection;
import buildcraft.BuildCraftEnergy;
import buildcraft.api.core.Position;
import buildcraft.api.gates.IOverrideDefaultTriggers;
import buildcraft.api.gates.ITrigger;
import buildcraft.api.power.IPowerEmitter;
Expand Down
11 changes: 5 additions & 6 deletions common/buildcraft/energy/TileEngineWood.java
Expand Up @@ -7,6 +7,7 @@
*/
package buildcraft.energy;

import buildcraft.api.power.PowerHandler;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.ForgeDirection;
import buildcraft.api.transport.IPipeTile.PipeType;
Expand Down Expand Up @@ -52,18 +53,16 @@ else if (energyLevel < 0.75f)
@Override
public float getPistonSpeed() {
if (CoreProxy.proxy.isSimulating(worldObj))
return Math.max(0.8f * getHeatLevel(), 0.01f);
return Math.max(0.08f * getHeatLevel(), 0.01f);
switch (getEnergyStage()) {
case BLUE:
return 0.01F;
case GREEN:
return 0.02F;
case YELLOW:
return 0.04F;
case RED:
return 0.08F;
default:
return 0;
return 0.01F;
}
}

Expand All @@ -72,7 +71,7 @@ public void engineUpdate() {
super.engineUpdate();

if (isRedstonePowered)
if (worldObj.getTotalWorldTime() % 20 == 0)
if (worldObj.getTotalWorldTime() % 16 == 0)
addEnergy(1);
}

Expand Down Expand Up @@ -103,6 +102,6 @@ public float getCurrentOutput() {

@Override
public float maxEnergyExtracted() {
return 1;
return 1 + PowerHandler.PerditionCalculator.MIN_POWERLOSS;
}
}

0 comments on commit fb0ee91

Please sign in to comment.