diff --git a/common/net/minecraft/src/BuildCraftEnergy.java b/common/net/minecraft/src/BuildCraftEnergy.java index ac26eeed..1e2c4b46 100644 --- a/common/net/minecraft/src/BuildCraftEnergy.java +++ b/common/net/minecraft/src/BuildCraftEnergy.java @@ -132,7 +132,7 @@ public class BuildCraftEnergy { RefineryRecipe.registerRefineryRecipe(new RefineryRecipe(new LiquidStack(oilStill.blockID, 1, 0), null, new LiquidStack(fuel.shiftedIndex, 1, 0), 10, 1)); // Iron Engine Fuels - IronEngineFuel.fuels.add(new IronEngineFuel(oilStill.blockID, 1, 20000)); + IronEngineFuel.fuels.add(new IronEngineFuel(Block.lavaStill.blockID, 1, 20000)); IronEngineFuel.fuels.add(new IronEngineFuel(oilStill.blockID, 2, 10000)); IronEngineFuel.fuels.add(new IronEngineFuel(fuel.shiftedIndex, 5, 50000)); diff --git a/common/net/minecraft/src/buildcraft/api/fuels/IronEngineFuel.java b/common/net/minecraft/src/buildcraft/api/fuels/IronEngineFuel.java index 2c9c01e2..970ca0c5 100644 --- a/common/net/minecraft/src/buildcraft/api/fuels/IronEngineFuel.java +++ b/common/net/minecraft/src/buildcraft/api/fuels/IronEngineFuel.java @@ -33,13 +33,13 @@ public class IronEngineFuel { } public final LiquidStack liquid; - public final int powerPerCycle; + public final float powerPerCycle; public final int totalBurningTime; - public IronEngineFuel(int liquidId, int powerPerCycle, int totalBurningTime) { + public IronEngineFuel(int liquidId, float powerPerCycle, int totalBurningTime) { this(new LiquidStack(liquidId, BuildCraftAPI.BUCKET_VOLUME, 0), powerPerCycle, totalBurningTime); } - public IronEngineFuel(LiquidStack liquid, int powerPerCycle, int totalBurningTime) { + public IronEngineFuel(LiquidStack liquid, float powerPerCycle, int totalBurningTime) { this.liquid = liquid; this.powerPerCycle = powerPerCycle; this.totalBurningTime = totalBurningTime; diff --git a/common/net/minecraft/src/buildcraft/energy/Engine.java b/common/net/minecraft/src/buildcraft/energy/Engine.java index fa6891be..6ebb5c8c 100644 --- a/common/net/minecraft/src/buildcraft/energy/Engine.java +++ b/common/net/minecraft/src/buildcraft/energy/Engine.java @@ -21,12 +21,12 @@ public abstract class Engine { public int maxEnergy; - protected int currentOutput = 0; + protected float currentOutput = 0; public @TileNetworkData float progress; public @TileNetworkData Orientations orientation; - public int energy; + public float energy; public @TileNetworkData EnergyStage energyStage = EnergyStage.Blue; @@ -84,7 +84,7 @@ public abstract class Engine { public abstract void delete(); - public void addEnergy(int addition) { + public void addEnergy(float addition) { energy += addition; if (getEnergyStage() == EnergyStage.Explosion) { @@ -96,7 +96,7 @@ public abstract class Engine { } } - public int extractEnergy(int min, int max, boolean doExtract) { + public float extractEnergy(int min, int max, boolean doExtract) { if (energy < min) { return 0; } @@ -109,7 +109,7 @@ public abstract class Engine { actualMax = max; } - int extracted; + float extracted; if (energy >= actualMax) { extracted = actualMax; @@ -154,11 +154,11 @@ public abstract class Engine { return 0; } - public int getEnergyStored() { + public float getEnergyStored() { return energy; } - public int getCurrentOutput() { + public float getCurrentOutput() { return currentOutput; } diff --git a/common/net/minecraft/src/buildcraft/energy/EngineIron.java b/common/net/minecraft/src/buildcraft/energy/EngineIron.java index ba12e6bb..8029cda8 100644 --- a/common/net/minecraft/src/buildcraft/energy/EngineIron.java +++ b/common/net/minecraft/src/buildcraft/energy/EngineIron.java @@ -227,10 +227,10 @@ public class EngineIron extends Engine { public void getGUINetworkData(int i, int j) { switch (i) { case 0: - energy = j; + energy = j / 10; break; case 1: - currentOutput = j; + currentOutput = j / 10; break; case 2: heat = j; @@ -252,8 +252,8 @@ public class EngineIron extends Engine { @Override public void sendGUINetworkData(ContainerEngine containerEngine, ICrafting iCrafting) { - iCrafting.updateCraftingInventoryInfo(containerEngine, 0, energy); - iCrafting.updateCraftingInventoryInfo(containerEngine, 1, currentOutput); + iCrafting.updateCraftingInventoryInfo(containerEngine, 0, Math.round(energy * 10)); + iCrafting.updateCraftingInventoryInfo(containerEngine, 1, Math.round(currentOutput * 10)); iCrafting.updateCraftingInventoryInfo(containerEngine, 2, heat); iCrafting.updateCraftingInventoryInfo(containerEngine, 3, liquidQty); iCrafting.updateCraftingInventoryInfo(containerEngine, 4, liquidId); diff --git a/common/net/minecraft/src/buildcraft/energy/EngineStone.java b/common/net/minecraft/src/buildcraft/energy/EngineStone.java index d4b3a3a1..b8c39953 100644 --- a/common/net/minecraft/src/buildcraft/energy/EngineStone.java +++ b/common/net/minecraft/src/buildcraft/energy/EngineStone.java @@ -155,15 +155,15 @@ public class EngineStone extends Engine { @Override public void sendGUINetworkData(ContainerEngine containerEngine, ICrafting iCrafting) { - iCrafting.updateCraftingInventoryInfo(containerEngine, 0, energy); - iCrafting.updateCraftingInventoryInfo(containerEngine, 1, currentOutput); + iCrafting.updateCraftingInventoryInfo(containerEngine, 0, Math.round(energy)); + iCrafting.updateCraftingInventoryInfo(containerEngine, 1, Math.round(currentOutput)); iCrafting.updateCraftingInventoryInfo(containerEngine, 2, burnTime); iCrafting.updateCraftingInventoryInfo(containerEngine, 3, totalBurnTime); } @Override public int getHeat() { - return energy; + return Math.round(energy); } /* IINVENTORY */ diff --git a/common/net/minecraft/src/buildcraft/energy/TileEngine.java b/common/net/minecraft/src/buildcraft/energy/TileEngine.java index 77a129ab..1877a306 100644 --- a/common/net/minecraft/src/buildcraft/energy/TileEngine.java +++ b/common/net/minecraft/src/buildcraft/energy/TileEngine.java @@ -121,7 +121,7 @@ public class TileEngine extends TileBuildCraft implements IPowerReceptor, IInven if (isPoweredTile(tile)) { IPowerReceptor receptor = (IPowerReceptor) tile; - int extracted = engine.extractEnergy(receptor.getPowerProvider().getMinEnergyReceived(), + float extracted = engine.extractEnergy(receptor.getPowerProvider().getMinEnergyReceived(), receptor.getPowerProvider().getMaxEnergyReceived(), true); if (extracted > 0) { @@ -227,7 +227,7 @@ public class TileEngine extends TileBuildCraft implements IPowerReceptor, IInven if (engine != null) { engine.progress = nbttagcompound.getFloat("progress"); - engine.energy = nbttagcompound.getInteger("energy"); + engine.energy = nbttagcompound.getFloat("energyF"); engine.orientation = Orientations.values()[orientation]; } @@ -245,7 +245,7 @@ public class TileEngine extends TileBuildCraft implements IPowerReceptor, IInven if (engine != null) { nbttagcompound.setInteger("orientation", orientation); nbttagcompound.setFloat("progress", engine.progress); - nbttagcompound.setInteger("energy", engine.energy); + nbttagcompound.setFloat("energyF", engine.energy); } if (engine != null) {