For latest forge
This commit is contained in:
parent
042067483d
commit
3be0523c4d
15 changed files with 38 additions and 38 deletions
|
@ -70,7 +70,7 @@ import net.minecraftforge.common.Configuration;
|
|||
import net.minecraftforge.common.IPlantable;
|
||||
import net.minecraftforge.common.Property;
|
||||
import net.minecraftforge.liquids.LiquidContainerData;
|
||||
import net.minecraftforge.liquids.LiquidItemRegistry;
|
||||
import net.minecraftforge.liquids.LiquidContainerRegistry;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
|
||||
@Mod(name="BuildCraft", version=Version.VERSION, useMetadata = false, modid = "BuildCraft|Core", dependencies="required-after:Forge@[6.3.0.0,)")
|
||||
|
|
|
@ -54,7 +54,7 @@ import net.minecraftforge.common.Configuration;
|
|||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.Property;
|
||||
import net.minecraftforge.liquids.LiquidContainerData;
|
||||
import net.minecraftforge.liquids.LiquidItemRegistry;
|
||||
import net.minecraftforge.liquids.LiquidContainerRegistry;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
|
||||
@Mod(name="BuildCraft Energy", version=Version.VERSION, useMetadata = false, modid = "BuildCraft|Energy", dependencies = DefaultProps.DEPENDENCY_CORE)
|
||||
|
@ -153,10 +153,10 @@ public class BuildCraftEnergy {
|
|||
IronEngineFuel.fuels.add(new IronEngineFuel(fuel.shiftedIndex, 6, 100000));
|
||||
|
||||
// Iron Engine Coolants
|
||||
IronEngineCoolant.coolants.add(new IronEngineCoolant(new LiquidStack(Block.waterStill, LiquidItemRegistry.BUCKET_VOLUME), 1.0f));
|
||||
IronEngineCoolant.coolants.add(new IronEngineCoolant(new LiquidStack(Block.waterStill, LiquidContainerRegistry.BUCKET_VOLUME), 1.0f));
|
||||
|
||||
LiquidItemRegistry.registerLiquid(new LiquidContainerData(new LiquidStack(oilStill, LiquidItemRegistry.BUCKET_VOLUME), new ItemStack(bucketOil), new ItemStack(Item.bucketEmpty)));
|
||||
LiquidItemRegistry.registerLiquid(new LiquidContainerData(new LiquidStack(fuel, LiquidItemRegistry.BUCKET_VOLUME), new ItemStack(bucketFuel), new ItemStack(Item.bucketEmpty)));
|
||||
LiquidContainerRegistry.registerLiquid(new LiquidContainerData(new LiquidStack(oilStill, LiquidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucketOil), new ItemStack(Item.bucketEmpty)));
|
||||
LiquidContainerRegistry.registerLiquid(new LiquidContainerData(new LiquidStack(fuel, LiquidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucketFuel), new ItemStack(Item.bucketEmpty)));
|
||||
}
|
||||
|
||||
public static void loadRecipes() {
|
||||
|
|
|
@ -15,7 +15,7 @@ import net.minecraft.src.World;
|
|||
public class BuildCraftAPI {
|
||||
|
||||
@Deprecated
|
||||
// To be removed, see LiquidItemRegistry
|
||||
// To be removed, see LiquidContainerRegistry
|
||||
public static final int BUCKET_VOLUME = 1000;
|
||||
public static final int LAST_ORIGINAL_BLOCK = 122;
|
||||
public static final int LAST_ORIGINAL_ITEM = 126;
|
||||
|
|
|
@ -11,7 +11,7 @@ package buildcraft.api.fuels;
|
|||
|
||||
import java.util.LinkedList;
|
||||
|
||||
import net.minecraftforge.liquids.LiquidItemRegistry;
|
||||
import net.minecraftforge.liquids.LiquidContainerRegistry;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
|
||||
|
||||
|
@ -38,7 +38,7 @@ public class IronEngineFuel {
|
|||
public final int totalBurningTime;
|
||||
|
||||
public IronEngineFuel(int liquidId, float powerPerCycle, int totalBurningTime) {
|
||||
this(new LiquidStack(liquidId, LiquidItemRegistry.BUCKET_VOLUME, 0), powerPerCycle, totalBurningTime);
|
||||
this(new LiquidStack(liquidId, LiquidContainerRegistry.BUCKET_VOLUME, 0), powerPerCycle, totalBurningTime);
|
||||
}
|
||||
public IronEngineFuel(LiquidStack liquid, float powerPerCycle, int totalBurningTime) {
|
||||
this.liquid = liquid;
|
||||
|
|
|
@ -16,7 +16,7 @@ import net.minecraft.src.TileEntity;
|
|||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.liquids.ILiquidTank;
|
||||
import net.minecraftforge.liquids.ITankContainer;
|
||||
import net.minecraftforge.liquids.LiquidItemRegistry;
|
||||
import net.minecraftforge.liquids.LiquidContainerRegistry;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
|
||||
public class TriggerLiquidContainer extends Trigger {
|
||||
|
@ -76,7 +76,7 @@ public class TriggerLiquidContainer extends Trigger {
|
|||
LiquidStack searchedLiquid = null;
|
||||
|
||||
if (parameter != null && parameter.getItem() != null)
|
||||
searchedLiquid = LiquidItemRegistry.getLiquidForFilledItem(parameter.getItem());
|
||||
searchedLiquid = LiquidContainerRegistry.getLiquidForFilledItem(parameter.getItem());
|
||||
|
||||
ILiquidTank[] liquids = container.getTanks(ForgeDirection.UNKNOWN);
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
package buildcraft.energy;
|
||||
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.liquids.LiquidItemRegistry;
|
||||
import net.minecraftforge.liquids.LiquidContainerRegistry;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
import net.minecraftforge.liquids.LiquidTank;
|
||||
import buildcraft.api.fuels.IronEngineCoolant;
|
||||
|
@ -26,7 +26,7 @@ import net.minecraft.src.NBTTagCompound;
|
|||
|
||||
public class EngineIron extends Engine {
|
||||
|
||||
public static int MAX_LIQUID = LiquidItemRegistry.BUCKET_VOLUME * 10;
|
||||
public static int MAX_LIQUID = LiquidContainerRegistry.BUCKET_VOLUME * 10;
|
||||
public static int MAX_HEAT = 100000;
|
||||
public static int COOLANT_THRESHOLD = 49000;
|
||||
|
||||
|
@ -106,7 +106,7 @@ public class EngineIron extends Engine {
|
|||
burnTime--;
|
||||
} else {
|
||||
liquidQty--;
|
||||
burnTime = currentFuel.totalBurningTime / LiquidItemRegistry.BUCKET_VOLUME;
|
||||
burnTime = currentFuel.totalBurningTime / LiquidContainerRegistry.BUCKET_VOLUME;
|
||||
}
|
||||
|
||||
currentOutput = currentFuel.powerPerCycle;
|
||||
|
@ -130,11 +130,11 @@ public class EngineIron extends Engine {
|
|||
LiquidStack liquid = null;
|
||||
if (Block.ice.blockID == itemInInventory.itemID && heat > COOLANT_THRESHOLD)
|
||||
{
|
||||
liquid = LiquidItemRegistry.getLiquidForFilledItem(new ItemStack(Item.bucketWater));
|
||||
liquid = LiquidContainerRegistry.getLiquidForFilledItem(new ItemStack(Item.bucketWater));
|
||||
}
|
||||
else
|
||||
{
|
||||
liquid = LiquidItemRegistry.getLiquidForFilledItem(itemInInventory);
|
||||
liquid = LiquidContainerRegistry.getLiquidForFilledItem(itemInInventory);
|
||||
}
|
||||
|
||||
if (liquid != null) {
|
||||
|
|
|
@ -23,7 +23,7 @@ import net.minecraft.src.World;
|
|||
import buildcraft.BuildCraftCore;
|
||||
import buildcraft.BuildCraftFactory;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.liquids.LiquidItemRegistry;
|
||||
import net.minecraftforge.liquids.LiquidContainerRegistry;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
import buildcraft.api.core.Position;
|
||||
import buildcraft.api.tools.IToolWrench;
|
||||
|
@ -105,7 +105,7 @@ public class BlockRefinery extends BlockContainer {
|
|||
return true;
|
||||
} else {
|
||||
|
||||
LiquidStack liquid = LiquidItemRegistry.getLiquidForFilledItem(entityplayer.getCurrentEquippedItem());
|
||||
LiquidStack liquid = LiquidContainerRegistry.getLiquidForFilledItem(entityplayer.getCurrentEquippedItem());
|
||||
|
||||
if (liquid != null) {
|
||||
int qty = ((TileRefinery) world.getBlockTileEntity(i, j, k)).fill(ForgeDirection.UNKNOWN, liquid, true);
|
||||
|
|
|
@ -13,7 +13,7 @@ import java.util.ArrayList;
|
|||
|
||||
import buildcraft.BuildCraftCore;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.liquids.LiquidItemRegistry;
|
||||
import net.minecraftforge.liquids.LiquidContainerRegistry;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.utils.Utils;
|
||||
|
@ -93,7 +93,7 @@ public class BlockTank extends BlockContainer {
|
|||
ItemStack current = entityplayer.inventory.getCurrentItem();
|
||||
if (current != null) {
|
||||
|
||||
LiquidStack liquid = LiquidItemRegistry.getLiquidForFilledItem(current);
|
||||
LiquidStack liquid = LiquidContainerRegistry.getLiquidForFilledItem(current);
|
||||
|
||||
TileTank tank = (TileTank) world.getBlockTileEntity(i, j, k);
|
||||
|
||||
|
@ -113,9 +113,9 @@ public class BlockTank extends BlockContainer {
|
|||
|
||||
LiquidStack available = tank.getTanks(ForgeDirection.UNKNOWN)[0].getLiquid();
|
||||
if(available != null){
|
||||
ItemStack filled = LiquidItemRegistry.fillLiquidContainer(available, current);
|
||||
ItemStack filled = LiquidContainerRegistry.fillLiquidContainer(available, current);
|
||||
|
||||
liquid = LiquidItemRegistry.getLiquidForFilledItem(filled);
|
||||
liquid = LiquidContainerRegistry.getLiquidForFilledItem(filled);
|
||||
|
||||
if(liquid != null) {
|
||||
if (!BuildCraftCore.debugMode && !entityplayer.capabilities.isCreativeMode){
|
||||
|
|
|
@ -16,7 +16,7 @@ import java.util.TreeSet;
|
|||
import buildcraft.BuildCraftCore;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.liquids.ITankContainer;
|
||||
import net.minecraftforge.liquids.LiquidItemRegistry;
|
||||
import net.minecraftforge.liquids.LiquidContainerRegistry;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
import buildcraft.api.core.Position;
|
||||
import buildcraft.api.power.IPowerProvider;
|
||||
|
@ -95,7 +95,7 @@ public class TilePump extends TileMachine implements IMachine, IPowerReceptor {
|
|||
worldObj.setBlockWithNotify(index.i, index.j, index.k, 0);
|
||||
}
|
||||
|
||||
internalLiquid = internalLiquid += LiquidItemRegistry.BUCKET_VOLUME;
|
||||
internalLiquid = internalLiquid += LiquidContainerRegistry.BUCKET_VOLUME;
|
||||
|
||||
if (CoreProxy.proxy.isSimulating(worldObj)) {
|
||||
sendNetworkUpdate();
|
||||
|
|
|
@ -13,7 +13,7 @@ import buildcraft.BuildCraftCore;
|
|||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.liquids.ILiquidTank;
|
||||
import net.minecraftforge.liquids.ITankContainer;
|
||||
import net.minecraftforge.liquids.LiquidItemRegistry;
|
||||
import net.minecraftforge.liquids.LiquidContainerRegistry;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
import net.minecraftforge.liquids.LiquidTank;
|
||||
import buildcraft.api.core.SafeTimeTracker;
|
||||
|
@ -35,7 +35,7 @@ public class TileRefinery extends TileMachine implements ITankContainer, IPowerR
|
|||
|
||||
private int[] filters = new int[2];
|
||||
|
||||
public static int LIQUID_PER_SLOT = LiquidItemRegistry.BUCKET_VOLUME * 4;
|
||||
public static int LIQUID_PER_SLOT = LiquidContainerRegistry.BUCKET_VOLUME * 4;
|
||||
|
||||
public static class Slot {
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import buildcraft.BuildCraftCore;
|
|||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.liquids.ILiquidTank;
|
||||
import net.minecraftforge.liquids.ITankContainer;
|
||||
import net.minecraftforge.liquids.LiquidItemRegistry;
|
||||
import net.minecraftforge.liquids.LiquidContainerRegistry;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
import net.minecraftforge.liquids.LiquidTank;
|
||||
import buildcraft.api.core.SafeTimeTracker;
|
||||
|
@ -26,7 +26,7 @@ import net.minecraft.src.TileEntity;
|
|||
public class TileTank extends TileBuildCraft implements ITankContainer
|
||||
{
|
||||
|
||||
public final LiquidTank tank = new LiquidTank(LiquidItemRegistry.BUCKET_VOLUME * 16);
|
||||
public final LiquidTank tank = new LiquidTank(LiquidContainerRegistry.BUCKET_VOLUME * 16);
|
||||
public boolean hasUpdate = false;
|
||||
public SafeTimeTracker tracker = new SafeTimeTracker();
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ package buildcraft.factory.gui;
|
|||
|
||||
import net.minecraft.src.InventoryPlayer;
|
||||
import net.minecraft.src.ItemStack;
|
||||
import net.minecraftforge.liquids.LiquidItemRegistry;
|
||||
import net.minecraftforge.liquids.LiquidContainerRegistry;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
@ -80,7 +80,7 @@ public class GuiRefinery extends GuiAdvancedInterface {
|
|||
slot = slots[position];
|
||||
|
||||
if (slot != null) {
|
||||
LiquidStack liquid = LiquidItemRegistry.getLiquidForFilledItem(mc.thePlayer.inventory.getItemStack());
|
||||
LiquidStack liquid = LiquidContainerRegistry.getLiquidForFilledItem(mc.thePlayer.inventory.getItemStack());
|
||||
|
||||
container.setFilter(position, liquid.itemID, liquid.itemMeta);
|
||||
}
|
||||
|
@ -102,8 +102,8 @@ public class GuiRefinery extends GuiAdvancedInterface {
|
|||
if (filter1 != null)
|
||||
liquid1Id = filter1.itemID;
|
||||
|
||||
RefineryRecipe recipe = RefineryRecipe.findRefineryRecipe(new LiquidStack(liquid0Id, LiquidItemRegistry.BUCKET_VOLUME, 0),
|
||||
new LiquidStack(liquid1Id, LiquidItemRegistry.BUCKET_VOLUME, 0));
|
||||
RefineryRecipe recipe = RefineryRecipe.findRefineryRecipe(new LiquidStack(liquid0Id, LiquidContainerRegistry.BUCKET_VOLUME, 0),
|
||||
new LiquidStack(liquid1Id, LiquidContainerRegistry.BUCKET_VOLUME, 0));
|
||||
|
||||
if (recipe != null)
|
||||
((ItemSlot) slots[2]).stack = recipe.result.asItemStack();
|
||||
|
|
|
@ -13,7 +13,7 @@ import buildcraft.BuildCraftCore;
|
|||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.liquids.ILiquidTank;
|
||||
import net.minecraftforge.liquids.ITankContainer;
|
||||
import net.minecraftforge.liquids.LiquidItemRegistry;
|
||||
import net.minecraftforge.liquids.LiquidContainerRegistry;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
import net.minecraftforge.liquids.LiquidTank;
|
||||
import buildcraft.api.core.SafeTimeTracker;
|
||||
|
@ -126,7 +126,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 = LiquidItemRegistry.BUCKET_VOLUME / 4;
|
||||
public static int LIQUID_IN_PIPE = LiquidContainerRegistry.BUCKET_VOLUME / 4;
|
||||
public static short INPUT_TTL = 60; //100
|
||||
public static short OUTPUT_TTL = 80; //80
|
||||
public static short OUTPUT_COOLDOWN = 30; //30
|
||||
|
|
|
@ -10,7 +10,7 @@ package buildcraft.transport.pipes;
|
|||
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.liquids.ITankContainer;
|
||||
import net.minecraftforge.liquids.LiquidItemRegistry;
|
||||
import net.minecraftforge.liquids.LiquidContainerRegistry;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
import buildcraft.api.core.Position;
|
||||
import buildcraft.api.power.IPowerProvider;
|
||||
|
@ -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 <= LiquidItemRegistry.BUCKET_VOLUME)
|
||||
liquidToExtract += powerProvider.useEnergy(1, 1, true) * LiquidItemRegistry.BUCKET_VOLUME;
|
||||
if (liquidToExtract <= LiquidContainerRegistry.BUCKET_VOLUME)
|
||||
liquidToExtract += powerProvider.useEnergy(1, 1, true) * LiquidContainerRegistry.BUCKET_VOLUME;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ package buildcraft.transport.triggers;
|
|||
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.liquids.ILiquidTank;
|
||||
import net.minecraftforge.liquids.LiquidItemRegistry;
|
||||
import net.minecraftforge.liquids.LiquidContainerRegistry;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
import buildcraft.api.gates.ITriggerParameter;
|
||||
import buildcraft.api.gates.Trigger;
|
||||
|
@ -100,7 +100,7 @@ public class TriggerPipeContents extends Trigger implements ITriggerPipe {
|
|||
LiquidStack searchedLiquid = null;
|
||||
|
||||
if (parameter != null && parameter.getItem() != null)
|
||||
searchedLiquid = LiquidItemRegistry.getLiquidForFilledItem(parameter.getItem());
|
||||
searchedLiquid = LiquidContainerRegistry.getLiquidForFilledItem(parameter.getItem());
|
||||
|
||||
if (kind == Kind.Empty) {
|
||||
for (ILiquidTank b : transportLiquids.getTanks(ForgeDirection.UNKNOWN))
|
||||
|
|
Loading…
Reference in a new issue