From 38b11a92218069288a9a9bca6ffa1b17ed2bf8f7 Mon Sep 17 00:00:00 2001 From: SirSengir Date: Sat, 1 Sep 2012 15:15:56 +0200 Subject: [PATCH] Removed references to BuildCraftAPI.BUCKET_VOLUME. --- common/buildcraft/BuildCraftCore.java | 4 ++-- common/buildcraft/BuildCraftEnergy.java | 6 +++--- common/buildcraft/api/fuels/IronEngineFuel.java | 4 ++-- common/buildcraft/api/transport/PipeManager.java | 1 - common/buildcraft/energy/EngineIron.java | 5 ++--- common/buildcraft/factory/TilePump.java | 4 ++-- common/buildcraft/factory/TileRefinery.java | 4 ++-- common/buildcraft/factory/TileTank.java | 4 ++-- common/buildcraft/factory/gui/GuiRefinery.java | 5 ++--- common/buildcraft/transport/PipeTransportItems.java | 1 - common/buildcraft/transport/PipeTransportLiquids.java | 4 ++-- common/buildcraft/transport/pipes/PipeLiquidsWood.java | 6 +++--- 12 files changed, 22 insertions(+), 26 deletions(-) diff --git a/common/buildcraft/BuildCraftCore.java b/common/buildcraft/BuildCraftCore.java index f8d92bb6..aa571e83 100644 --- a/common/buildcraft/BuildCraftCore.java +++ b/common/buildcraft/BuildCraftCore.java @@ -221,8 +221,8 @@ public class BuildCraftCore { @Init public void initialize(FMLInitializationEvent evt) { //MinecraftForge.registerConnectionHandler(new ConnectionHandler()); - LiquidManager.liquids.add(new LiquidData(new LiquidStack(Block.waterStill, BuildCraftAPI.BUCKET_VOLUME), new LiquidStack(Block.waterMoving, BuildCraftAPI.BUCKET_VOLUME), new ItemStack(Item.bucketWater), new ItemStack(Item.bucketEmpty))); - LiquidManager.liquids.add(new LiquidData(new LiquidStack(Block.lavaStill, BuildCraftAPI.BUCKET_VOLUME), new LiquidStack(Block.lavaMoving, BuildCraftAPI.BUCKET_VOLUME), new ItemStack(Item.bucketLava), new ItemStack(Item.bucketEmpty))); + LiquidManager.liquids.add(new LiquidData(new LiquidStack(Block.waterStill, LiquidManager.BUCKET_VOLUME), new LiquidStack(Block.waterMoving, LiquidManager.BUCKET_VOLUME), new ItemStack(Item.bucketWater), new ItemStack(Item.bucketEmpty))); + LiquidManager.liquids.add(new LiquidData(new LiquidStack(Block.lavaStill, LiquidManager.BUCKET_VOLUME), new LiquidStack(Block.lavaMoving, LiquidManager.BUCKET_VOLUME), new ItemStack(Item.bucketLava), new ItemStack(Item.bucketEmpty))); BuildCraftAPI.softBlocks[Block.tallGrass.blockID] = true; BuildCraftAPI.softBlocks[Block.snow.blockID] = true; diff --git a/common/buildcraft/BuildCraftEnergy.java b/common/buildcraft/BuildCraftEnergy.java index c5d73372..cb1d76a5 100644 --- a/common/buildcraft/BuildCraftEnergy.java +++ b/common/buildcraft/BuildCraftEnergy.java @@ -152,10 +152,10 @@ public class BuildCraftEnergy { IronEngineFuel.fuels.add(new IronEngineFuel(fuel.shiftedIndex, 5, 50000)); // Iron Engine Coolants - IronEngineCoolant.coolants.add(new IronEngineCoolant(new LiquidStack(Block.waterStill, BuildCraftAPI.BUCKET_VOLUME), 1.0f)); + IronEngineCoolant.coolants.add(new IronEngineCoolant(new LiquidStack(Block.waterStill, LiquidManager.BUCKET_VOLUME), 1.0f)); - LiquidManager.liquids.add(new LiquidData(new LiquidStack(oilStill, BuildCraftAPI.BUCKET_VOLUME), new LiquidStack(oilMoving, BuildCraftAPI.BUCKET_VOLUME), new ItemStack(bucketOil), new ItemStack(Item.bucketEmpty))); - LiquidManager.liquids.add(new LiquidData(new LiquidStack(fuel, BuildCraftAPI.BUCKET_VOLUME), new LiquidStack(fuel, BuildCraftAPI.BUCKET_VOLUME), new ItemStack(bucketFuel), new ItemStack(Item.bucketEmpty))); + LiquidManager.liquids.add(new LiquidData(new LiquidStack(oilStill, LiquidManager.BUCKET_VOLUME), new LiquidStack(oilMoving, LiquidManager.BUCKET_VOLUME), new ItemStack(bucketOil), new ItemStack(Item.bucketEmpty))); + LiquidManager.liquids.add(new LiquidData(new LiquidStack(fuel, LiquidManager.BUCKET_VOLUME), new LiquidStack(fuel, LiquidManager.BUCKET_VOLUME), new ItemStack(bucketFuel), new ItemStack(Item.bucketEmpty))); BuildCraftAPI.softBlocks[oilMoving.blockID] = true; BuildCraftAPI.softBlocks[oilStill.blockID] = true; diff --git a/common/buildcraft/api/fuels/IronEngineFuel.java b/common/buildcraft/api/fuels/IronEngineFuel.java index 8976d8f2..baf9006a 100644 --- a/common/buildcraft/api/fuels/IronEngineFuel.java +++ b/common/buildcraft/api/fuels/IronEngineFuel.java @@ -11,7 +11,7 @@ package buildcraft.api.fuels; import java.util.LinkedList; -import buildcraft.api.core.BuildCraftAPI; +import buildcraft.api.liquids.LiquidManager; import buildcraft.api.liquids.LiquidStack; @@ -37,7 +37,7 @@ public class IronEngineFuel { public final int totalBurningTime; public IronEngineFuel(int liquidId, float powerPerCycle, int totalBurningTime) { - this(new LiquidStack(liquidId, BuildCraftAPI.BUCKET_VOLUME, 0), powerPerCycle, totalBurningTime); + this(new LiquidStack(liquidId, LiquidManager.BUCKET_VOLUME, 0), powerPerCycle, totalBurningTime); } public IronEngineFuel(LiquidStack liquid, float powerPerCycle, int totalBurningTime) { this.liquid = liquid; diff --git a/common/buildcraft/api/transport/PipeManager.java b/common/buildcraft/api/transport/PipeManager.java index 0ff6b464..031cd269 100644 --- a/common/buildcraft/api/transport/PipeManager.java +++ b/common/buildcraft/api/transport/PipeManager.java @@ -6,7 +6,6 @@ import java.util.List; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Side; -import cpw.mods.fml.common.event.FMLConstructionEvent; import net.minecraft.src.World; diff --git a/common/buildcraft/energy/EngineIron.java b/common/buildcraft/energy/EngineIron.java index 92d24e3c..0055afde 100644 --- a/common/buildcraft/energy/EngineIron.java +++ b/common/buildcraft/energy/EngineIron.java @@ -9,7 +9,6 @@ package buildcraft.energy; -import buildcraft.api.core.BuildCraftAPI; import buildcraft.api.core.Orientations; import buildcraft.api.fuels.IronEngineCoolant; import buildcraft.api.fuels.IronEngineFuel; @@ -25,7 +24,7 @@ import net.minecraft.src.NBTTagCompound; public class EngineIron extends Engine { - public static int MAX_LIQUID = BuildCraftAPI.BUCKET_VOLUME * 10; + public static int MAX_LIQUID = LiquidManager.BUCKET_VOLUME * 10; public static int MAX_HEAT = 100000; public static int COOLANT_THRESHOLD = 49000; @@ -105,7 +104,7 @@ public class EngineIron extends Engine { burnTime--; } else { liquidQty--; - burnTime = currentFuel.totalBurningTime / BuildCraftAPI.BUCKET_VOLUME; + burnTime = currentFuel.totalBurningTime / LiquidManager.BUCKET_VOLUME; } currentOutput = currentFuel.powerPerCycle; diff --git a/common/buildcraft/factory/TilePump.java b/common/buildcraft/factory/TilePump.java index 85132f0b..fe3ae287 100644 --- a/common/buildcraft/factory/TilePump.java +++ b/common/buildcraft/factory/TilePump.java @@ -14,10 +14,10 @@ import java.util.TreeMap; import java.util.TreeSet; import buildcraft.BuildCraftCore; -import buildcraft.api.core.BuildCraftAPI; import buildcraft.api.core.Orientations; import buildcraft.api.core.Position; import buildcraft.api.liquids.ITankContainer; +import buildcraft.api.liquids.LiquidManager; import buildcraft.api.liquids.LiquidStack; import buildcraft.api.power.IPowerProvider; import buildcraft.api.power.IPowerReceptor; @@ -95,7 +95,7 @@ public class TilePump extends TileMachine implements IMachine, IPowerReceptor { worldObj.setBlockWithNotify(index.i, index.j, index.k, 0); } - internalLiquid = internalLiquid += BuildCraftAPI.BUCKET_VOLUME; + internalLiquid = internalLiquid += LiquidManager.BUCKET_VOLUME; if (ProxyCore.proxy.isSimulating(worldObj)) { sendNetworkUpdate(); diff --git a/common/buildcraft/factory/TileRefinery.java b/common/buildcraft/factory/TileRefinery.java index 8459cf56..3c013c3b 100644 --- a/common/buildcraft/factory/TileRefinery.java +++ b/common/buildcraft/factory/TileRefinery.java @@ -10,11 +10,11 @@ package buildcraft.factory; import buildcraft.BuildCraftCore; -import buildcraft.api.core.BuildCraftAPI; import buildcraft.api.core.Orientations; import buildcraft.api.core.SafeTimeTracker; import buildcraft.api.liquids.ILiquidTank; import buildcraft.api.liquids.ITankContainer; +import buildcraft.api.liquids.LiquidManager; import buildcraft.api.liquids.LiquidStack; import buildcraft.api.liquids.LiquidTank; import buildcraft.api.power.IPowerProvider; @@ -35,7 +35,7 @@ public class TileRefinery extends TileMachine implements ITankContainer, IPowerR private int[] filters = new int[2]; - public static int LIQUID_PER_SLOT = BuildCraftAPI.BUCKET_VOLUME * 4; + public static int LIQUID_PER_SLOT = LiquidManager.BUCKET_VOLUME * 4; public static class Slot { diff --git a/common/buildcraft/factory/TileTank.java b/common/buildcraft/factory/TileTank.java index eb84381a..50558fc4 100644 --- a/common/buildcraft/factory/TileTank.java +++ b/common/buildcraft/factory/TileTank.java @@ -9,11 +9,11 @@ package buildcraft.factory; import buildcraft.BuildCraftCore; -import buildcraft.api.core.BuildCraftAPI; import buildcraft.api.core.Orientations; import buildcraft.api.core.SafeTimeTracker; import buildcraft.api.liquids.ILiquidTank; import buildcraft.api.liquids.ITankContainer; +import buildcraft.api.liquids.LiquidManager; import buildcraft.api.liquids.LiquidStack; import buildcraft.api.liquids.LiquidTank; import buildcraft.core.ProxyCore; @@ -26,7 +26,7 @@ import net.minecraft.src.TileEntity; public class TileTank extends TileBuildCraft implements ITankContainer { - public final ILiquidTank tank = new LiquidTank(BuildCraftAPI.BUCKET_VOLUME * 16); + public final ILiquidTank tank = new LiquidTank(LiquidManager.BUCKET_VOLUME * 16); public boolean hasUpdate = false; public SafeTimeTracker tracker = new SafeTimeTracker(); diff --git a/common/buildcraft/factory/gui/GuiRefinery.java b/common/buildcraft/factory/gui/GuiRefinery.java index b39c68e2..300d7648 100644 --- a/common/buildcraft/factory/gui/GuiRefinery.java +++ b/common/buildcraft/factory/gui/GuiRefinery.java @@ -14,7 +14,6 @@ import net.minecraft.src.ItemStack; import org.lwjgl.opengl.GL11; -import buildcraft.api.core.BuildCraftAPI; import buildcraft.api.liquids.LiquidManager; import buildcraft.api.liquids.LiquidStack; import buildcraft.api.recipes.RefineryRecipe; @@ -103,8 +102,8 @@ public class GuiRefinery extends GuiAdvancedInterface { if (filter1 != null) liquid1Id = filter1.itemID; - RefineryRecipe recipe = RefineryRecipe.findRefineryRecipe(new LiquidStack(liquid0Id, BuildCraftAPI.BUCKET_VOLUME, 0), - new LiquidStack(liquid1Id, BuildCraftAPI.BUCKET_VOLUME, 0)); + RefineryRecipe recipe = RefineryRecipe.findRefineryRecipe(new LiquidStack(liquid0Id, LiquidManager.BUCKET_VOLUME, 0), + new LiquidStack(liquid1Id, LiquidManager.BUCKET_VOLUME, 0)); if (recipe != null) ((ItemSlot) slots[2]).stack = recipe.result.asItemStack(); diff --git a/common/buildcraft/transport/PipeTransportItems.java b/common/buildcraft/transport/PipeTransportItems.java index 76e6bd8f..411bc869 100644 --- a/common/buildcraft/transport/PipeTransportItems.java +++ b/common/buildcraft/transport/PipeTransportItems.java @@ -34,7 +34,6 @@ import buildcraft.core.Utils; import buildcraft.core.network.PacketIds; import buildcraft.core.network.PacketPipeTransportContent; -import net.minecraft.server.MinecraftServer; import net.minecraft.src.EntityItem; import net.minecraft.src.IInventory; import net.minecraft.src.ItemStack; diff --git a/common/buildcraft/transport/PipeTransportLiquids.java b/common/buildcraft/transport/PipeTransportLiquids.java index 96da76b6..301fd6fc 100644 --- a/common/buildcraft/transport/PipeTransportLiquids.java +++ b/common/buildcraft/transport/PipeTransportLiquids.java @@ -10,12 +10,12 @@ package buildcraft.transport; import buildcraft.BuildCraftCore; -import buildcraft.api.core.BuildCraftAPI; import buildcraft.api.core.Orientations; import buildcraft.api.core.SafeTimeTracker; import buildcraft.api.gates.ITrigger; import buildcraft.api.liquids.ILiquidTank; import buildcraft.api.liquids.ITankContainer; +import buildcraft.api.liquids.LiquidManager; import buildcraft.api.liquids.LiquidStack; import buildcraft.api.liquids.LiquidTank; import buildcraft.api.transport.IPipeEntry; @@ -128,7 +128,7 @@ public class PipeTransportLiquids extends PipeTransport implements ITankContaine * The amount of liquid contained by a pipe section. For simplicity, all * pipe sections are assumed to be of the same volume. */ - public static int LIQUID_IN_PIPE = BuildCraftAPI.BUCKET_VOLUME / 4; + public static int LIQUID_IN_PIPE = LiquidManager.BUCKET_VOLUME / 4; public static short INPUT_TTL = 60; //100 public static short OUTPUT_TTL = 80; //80 public static short OUTPUT_COOLDOWN = 30; //30 diff --git a/common/buildcraft/transport/pipes/PipeLiquidsWood.java b/common/buildcraft/transport/pipes/PipeLiquidsWood.java index 9e968073..e82b2ebb 100644 --- a/common/buildcraft/transport/pipes/PipeLiquidsWood.java +++ b/common/buildcraft/transport/pipes/PipeLiquidsWood.java @@ -8,10 +8,10 @@ package buildcraft.transport.pipes; -import buildcraft.api.core.BuildCraftAPI; import buildcraft.api.core.Orientations; import buildcraft.api.core.Position; import buildcraft.api.liquids.ITankContainer; +import buildcraft.api.liquids.LiquidManager; import buildcraft.api.liquids.LiquidStack; import buildcraft.api.power.IPowerProvider; import buildcraft.api.power.IPowerReceptor; @@ -68,8 +68,8 @@ public class PipeLiquidsWood extends Pipe implements IPowerReceptor { if (!PipeManager.canExtractLiquids(this, w, (int) pos.x, (int) pos.y, (int) pos.z)) return; - if (liquidToExtract <= BuildCraftAPI.BUCKET_VOLUME) - liquidToExtract += powerProvider.useEnergy(1, 1, true) * BuildCraftAPI.BUCKET_VOLUME; + if (liquidToExtract <= LiquidManager.BUCKET_VOLUME) + liquidToExtract += powerProvider.useEnergy(1, 1, true) * LiquidManager.BUCKET_VOLUME; } }