diff --git a/common/buildcraft/api/core/BuildCraftAPI.java b/common/buildcraft/api/core/BuildCraftAPI.java index c0c06bcd8..87c45fdfa 100644 --- a/common/buildcraft/api/core/BuildCraftAPI.java +++ b/common/buildcraft/api/core/BuildCraftAPI.java @@ -11,8 +11,7 @@ package buildcraft.api.core; import net.minecraft.block.Block; -public class BuildCraftAPI -{ +public class BuildCraftAPI { public static final int LAST_ORIGINAL_BLOCK = 122; public static final int LAST_ORIGINAL_ITEM = 126; diff --git a/common/buildcraft/api/core/IAreaProvider.java b/common/buildcraft/api/core/IAreaProvider.java index cad9e2111..fa905d2c5 100644 --- a/common/buildcraft/api/core/IAreaProvider.java +++ b/common/buildcraft/api/core/IAreaProvider.java @@ -10,11 +10,9 @@ package buildcraft.api.core; /** - * To be implemented by TileEntities able to provide a square area on the world, typically - * BuildCraft markers. + * To be implemented by TileEntities able to provide a square area on the world, typically BuildCraft markers. */ -public interface IAreaProvider -{ +public interface IAreaProvider { public int xMin(); diff --git a/common/buildcraft/api/core/IBox.java b/common/buildcraft/api/core/IBox.java index a6f95cae7..6337a96c2 100644 --- a/common/buildcraft/api/core/IBox.java +++ b/common/buildcraft/api/core/IBox.java @@ -11,8 +11,7 @@ package buildcraft.api.core; import net.minecraft.world.World; -public interface IBox -{ +public interface IBox { public void expand(int amount); diff --git a/common/buildcraft/api/core/IIconProvider.java b/common/buildcraft/api/core/IIconProvider.java index 3a249e041..666d32e36 100644 --- a/common/buildcraft/api/core/IIconProvider.java +++ b/common/buildcraft/api/core/IIconProvider.java @@ -1,13 +1,12 @@ package buildcraft.api.core; -import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.util.Icon; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.util.Icon; -public interface IIconProvider -{ - +public interface IIconProvider { + /** * @param iconIndex * @return @@ -16,9 +15,7 @@ public interface IIconProvider public Icon getIcon(int iconIndex); /** - * A call for the provider to register its Icons. This may be called multiple times but should - * only be executed once per provider - * + * A call for the provider to register its Icons. This may be called multiple times but should only be executed once per provider * @param iconRegister */ @SideOnly(Side.CLIENT) diff --git a/common/buildcraft/api/core/LaserKind.java b/common/buildcraft/api/core/LaserKind.java index 520d6511c..24e66dba1 100644 --- a/common/buildcraft/api/core/LaserKind.java +++ b/common/buildcraft/api/core/LaserKind.java @@ -9,7 +9,6 @@ package buildcraft.api.core; -public enum LaserKind -{ +public enum LaserKind { Red, Blue, Stripes } diff --git a/common/buildcraft/api/core/Position.java b/common/buildcraft/api/core/Position.java index b3f6b3dd2..5cdddbc84 100644 --- a/common/buildcraft/api/core/Position.java +++ b/common/buildcraft/api/core/Position.java @@ -13,38 +13,33 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.ForgeDirection; -public class Position -{ +public class Position { public double x, y, z; public ForgeDirection orientation; - public Position(double ci, double cj, double ck) - { + public Position(double ci, double cj, double ck) { x = ci; y = cj; z = ck; orientation = ForgeDirection.UNKNOWN; } - public Position(double ci, double cj, double ck, ForgeDirection corientation) - { + public Position(double ci, double cj, double ck, ForgeDirection corientation) { x = ci; y = cj; z = ck; orientation = corientation; } - public Position(Position p) - { + public Position(Position p) { x = p.x; y = p.y; z = p.z; orientation = p.orientation; } - public Position(NBTTagCompound nbttagcompound) - { + public Position(NBTTagCompound nbttagcompound) { x = nbttagcompound.getDouble("i"); y = nbttagcompound.getDouble("j"); z = nbttagcompound.getDouble("k"); @@ -52,109 +47,95 @@ public class Position orientation = ForgeDirection.UNKNOWN; } - public Position(TileEntity tile) - { + public Position(TileEntity tile) { x = tile.xCoord; y = tile.yCoord; z = tile.zCoord; } - public void moveRight(double step) - { - switch (orientation) - { - case SOUTH: - x = x - step; - break; - case NORTH: - x = x + step; - break; - case EAST: - z = z + step; - break; - case WEST: - z = z - step; - break; - default: + public void moveRight(double step) { + switch (orientation) { + case SOUTH: + x = x - step; + break; + case NORTH: + x = x + step; + break; + case EAST: + z = z + step; + break; + case WEST: + z = z - step; + break; + default: } } - public void moveLeft(double step) - { + public void moveLeft(double step) { moveRight(-step); } - public void moveForwards(double step) - { - switch (orientation) - { - case UP: - y = y + step; - break; - case DOWN: - y = y - step; - break; - case SOUTH: - z = z + step; - break; - case NORTH: - z = z - step; - break; - case EAST: - x = x + step; - break; - case WEST: - x = x - step; - break; - default: + public void moveForwards(double step) { + switch (orientation) { + case UP: + y = y + step; + break; + case DOWN: + y = y - step; + break; + case SOUTH: + z = z + step; + break; + case NORTH: + z = z - step; + break; + case EAST: + x = x + step; + break; + case WEST: + x = x - step; + break; + default: } } - public void moveBackwards(double step) - { + public void moveBackwards(double step) { moveForwards(-step); } - public void moveUp(double step) - { - switch (orientation) - { - case SOUTH: - case NORTH: - case EAST: - case WEST: - y = y + step; - break; - default: + public void moveUp(double step) { + switch (orientation) { + case SOUTH: + case NORTH: + case EAST: + case WEST: + y = y + step; + break; + default: } } - public void moveDown(double step) - { + public void moveDown(double step) { moveUp(-step); } - public void writeToNBT(NBTTagCompound nbttagcompound) - { + public void writeToNBT(NBTTagCompound nbttagcompound) { nbttagcompound.setDouble("i", x); nbttagcompound.setDouble("j", y); nbttagcompound.setDouble("k", z); } @Override - public String toString() - { + public String toString() { return "{" + x + ", " + y + ", " + z + "}"; } - public Position min(Position p) - { + public Position min(Position p) { return new Position(p.x > x ? x : p.x, p.y > y ? y : p.y, p.z > z ? z : p.z); } - public Position max(Position p) - { + public Position max(Position p) { return new Position(p.x < x ? x : p.x, p.y < y ? y : p.y, p.z < z ? z : p.z); } diff --git a/common/buildcraft/api/core/SafeTimeTracker.java b/common/buildcraft/api/core/SafeTimeTracker.java index cee37abe9..44e1531e8 100644 --- a/common/buildcraft/api/core/SafeTimeTracker.java +++ b/common/buildcraft/api/core/SafeTimeTracker.java @@ -9,45 +9,38 @@ package buildcraft.api.core; import net.minecraft.world.World; -public class SafeTimeTracker -{ +public class SafeTimeTracker { private long lastMark = Long.MIN_VALUE; private long duration = -1; /** - * Return true if a given delay has passed since last time marked was called successfully. + * Return true if a given delay has passed since last time marked was called + * successfully. */ - public boolean markTimeIfDelay(World world, long delay) - { + public boolean markTimeIfDelay(World world, long delay) { if (world == null) return false; long currentTime = world.getTotalWorldTime(); - if (currentTime < lastMark) - { + if (currentTime < lastMark) { lastMark = currentTime; return false; - } - else if (lastMark + delay <= currentTime) - { + } else if (lastMark + delay <= currentTime) { duration = currentTime - lastMark; lastMark = currentTime; return true; - } - else + } else return false; } - public long durationOfLastDelay() - { + public long durationOfLastDelay() { return duration > 0 ? duration : 0; } - public void markTime(World world) - { + public void markTime(World world) { lastMark = world.getTotalWorldTime(); } } diff --git a/common/buildcraft/api/core/StackWrapper.java b/common/buildcraft/api/core/StackWrapper.java index 2f354719a..f46652c4f 100644 --- a/common/buildcraft/api/core/StackWrapper.java +++ b/common/buildcraft/api/core/StackWrapper.java @@ -11,22 +11,19 @@ package buildcraft.api.core; import net.minecraft.item.ItemStack; /** - * + * * @author CovertJaguar */ -public class StackWrapper -{ +public class StackWrapper { public final ItemStack stack; - public StackWrapper(ItemStack stack) - { + public StackWrapper(ItemStack stack) { this.stack = stack; } @Override - public int hashCode() - { + public int hashCode() { int hash = 5; hash = 67 * hash + stack.itemID; hash = 67 * hash + stack.getItemDamage(); @@ -36,8 +33,7 @@ public class StackWrapper } @Override - public boolean equals(Object obj) - { + public boolean equals(Object obj) { if (obj == null) return false; if (getClass() != obj.getClass()) diff --git a/common/buildcraft/api/filler/IFillerPattern.java b/common/buildcraft/api/filler/IFillerPattern.java index dd5862bbb..45dce17bf 100644 --- a/common/buildcraft/api/filler/IFillerPattern.java +++ b/common/buildcraft/api/filler/IFillerPattern.java @@ -3,21 +3,27 @@ package buildcraft.api.filler; import buildcraft.api.core.IBox; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Icon; +import net.minecraftforge.common.ForgeDirection; public interface IFillerPattern { - public int getId(); + public String getUniqueTag(); - public void setId(int id); - - public boolean iteratePattern(TileEntity tile, IBox box, ItemStack stackToPlace); + /** + * Creates the object that does the pattern iteration. This object may be + * state-full and will be used until the pattern is done or changes. + * + * @param tile the Filler + * @param box the area to fill + * @param orientation not currently used, but may be in the future (the filler needs some orientation code) + * @return + */ + public IPatternIterator createPatternIterator(TileEntity tile, IBox box, ForgeDirection orientation); @SideOnly(Side.CLIENT) - public Icon getTexture(); - - public String getName(); + public Icon getIcon(); + public String getDisplayName(); } diff --git a/common/buildcraft/api/filler/IFillerRegistry.java b/common/buildcraft/api/filler/IFillerRegistry.java index 12bf9799d..f0b4c9503 100644 --- a/common/buildcraft/api/filler/IFillerRegistry.java +++ b/common/buildcraft/api/filler/IFillerRegistry.java @@ -1,15 +1,17 @@ package buildcraft.api.filler; -import net.minecraft.inventory.IInventory; +import buildcraft.api.gates.IAction; +import java.util.Set; public interface IFillerRegistry { - public void addRecipe(IFillerPattern pattern, Object aobj[]); + public void addPattern(IFillerPattern pattern); - public IFillerPattern findMatchingRecipe(IInventory inventorycrafting); + public IFillerPattern getPattern(String patternName); - public int getPatternNumber(IFillerPattern pattern); - - public IFillerPattern getPattern(int n); + public IFillerPattern getNextPattern(IFillerPattern currentPattern); + public IFillerPattern getPreviousPattern(IFillerPattern currentPattern); + + public Set getActions(); } diff --git a/common/buildcraft/api/filler/IPatternIterator.java b/common/buildcraft/api/filler/IPatternIterator.java new file mode 100644 index 000000000..0ea8c2021 --- /dev/null +++ b/common/buildcraft/api/filler/IPatternIterator.java @@ -0,0 +1,20 @@ +/* + * Copyright (c) SpaceToad, 2011-2012 + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ +package buildcraft.api.filler; + +import net.minecraft.item.ItemStack; + +/** + * + * @author CovertJaguar + */ +public interface IPatternIterator { + + public boolean iteratePattern(ItemStack stackToPlace); +} diff --git a/common/buildcraft/api/fuels/IronEngineCoolant.java b/common/buildcraft/api/fuels/IronEngineCoolant.java index 347fabd74..50c2097ca 100644 --- a/common/buildcraft/api/fuels/IronEngineCoolant.java +++ b/common/buildcraft/api/fuels/IronEngineCoolant.java @@ -29,7 +29,7 @@ public final class IronEngineCoolant { } public static Coolant getCoolant(FluidStack fluidStack) { - return fluidStack != null ? liquidCoolants.get(fluidStack.getFluid().getName()) : null; + return fluidStack != null && fluidStack.getFluid() != null ? liquidCoolants.get(fluidStack.getFluid().getName()) : null; } private IronEngineCoolant() { diff --git a/common/buildcraft/api/gates/TriggerParameter.java b/common/buildcraft/api/gates/TriggerParameter.java index 0127bc852..6295d1cda 100644 --- a/common/buildcraft/api/gates/TriggerParameter.java +++ b/common/buildcraft/api/gates/TriggerParameter.java @@ -47,8 +47,9 @@ public class TriggerParameter implements ITriggerParameter { @Override public void writeToNBT(NBTTagCompound compound) { if (stack != null) { - compound.setInteger("itemID", stack.itemID); - compound.setInteger("itemDMG", stack.getItemDamage()); + NBTTagCompound tagCompound = new NBTTagCompound(); + stack.writeToNBT(tagCompound); + compound.setCompoundTag("stack", tagCompound); } } @@ -59,11 +60,14 @@ public class TriggerParameter implements ITriggerParameter { */ @Override public void readFromNBT(NBTTagCompound compound) { + // Legacy code to prevent existing gates from losing their contents int itemID = compound.getInteger("itemID"); - if (itemID != 0) { stack = new ItemStack(itemID, 1, compound.getInteger("itemDMG")); + return; } + + stack = ItemStack.loadItemStackFromNBT(compound.getCompoundTag("stack")); } @Override diff --git a/common/buildcraft/api/power/ILaserTarget.java b/common/buildcraft/api/power/ILaserTarget.java new file mode 100644 index 000000000..3d1eca59b --- /dev/null +++ b/common/buildcraft/api/power/ILaserTarget.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) SpaceToad, 2011-2012 + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ +package buildcraft.api.power; + +/** + * Specifies a Tile Entity that can receive power via laser beam. + * + * @author cpw + */ +public interface ILaserTarget { + + /** + * Returns true if the target currently needs power. For example, if the Advanced + * Crafting Table has work to do. + * + * @return true if needs power + */ + boolean requiresLaserEnergy(); + + /** + * Transfers energy from the laser to the target. + * + * @param energy + */ + void receiveLaserEnergy(float energy); + + /** + * Return true if the Tile Entity object is no longer a valid target. For + * example, if its been invalidated. + * + * @return true if no longer a valid target object + */ + boolean isInvalidTarget(); + + int getXCoord(); + + int getYCoord(); + + int getZCoord(); +} diff --git a/common/buildcraft/api/power/IPowerEmitter.java b/common/buildcraft/api/power/IPowerEmitter.java index 08a1b24e0..7ccf62b9d 100644 --- a/common/buildcraft/api/power/IPowerEmitter.java +++ b/common/buildcraft/api/power/IPowerEmitter.java @@ -12,14 +12,13 @@ import net.minecraftforge.common.ForgeDirection; /** * Essentially only used for Wooden Power Pipe connection rules. - * - * This Tile Entity interface allows you to indicate that a block can emit power from a specific - * side. - * + * + * This Tile Entity interface allows you to indicate that a block can emit power + * from a specific side. + * * @author CovertJaguar */ -public interface IPowerEmitter -{ +public interface IPowerEmitter { public boolean canEmitPowerFrom(ForgeDirection side); } diff --git a/common/buildcraft/api/power/IPowerReceptor.java b/common/buildcraft/api/power/IPowerReceptor.java index f9f709329..48b84c909 100644 --- a/common/buildcraft/api/power/IPowerReceptor.java +++ b/common/buildcraft/api/power/IPowerReceptor.java @@ -9,35 +9,35 @@ package buildcraft.api.power; import net.minecraft.world.World; import net.minecraftforge.common.ForgeDirection; -import buildcraft.api.power.PowerHandler.PowerReceiver; /** - * This interface should be implemented by any Tile Entity that wishes to be able to receive power. - * + * This interface should be implemented by any Tile Entity that wishes to be + * able to receive power. + * * @author CovertJaguar */ -public interface IPowerReceptor -{ +public interface IPowerReceptor { /** - * Get the PowerReceiver for this side of the block. You can return the same PowerReceiver for - * all sides or one for each side. - * - * You should NOT return null to this method unless you mean to NEVER receive power from that - * side. Returning null, after previous returning a PowerReceiver, will most likely cause pipe - * connections to derp out and engines to eventually explode. - * + * Get the PowerReceiver for this side of the block. You can return the same + * PowerReceiver for all sides or one for each side. + * + * You should NOT return null to this method unless you mean to NEVER + * receive power from that side. Returning null, after previous returning a + * PowerReceiver, will most likely cause pipe connections to derp out and + * engines to eventually explode. + * * @param side * @return */ - public PowerReceiver getPowerReceiver(ForgeDirection side); + public PowerHandler.PowerReceiver getPowerReceiver(ForgeDirection side); /** - * Call back from the PowerHandler that is called when the stored power exceeds the activation - * power. - * + * Call back from the PowerHandler that is called when the stored power + * exceeds the activation power. + * * It can be triggered by update() calls or power modification calls. - * + * * @param workProvider */ public void doWork(PowerHandler workProvider); diff --git a/common/buildcraft/api/power/PowerHandler.java b/common/buildcraft/api/power/PowerHandler.java index 2969dd628..5f4055465 100644 --- a/common/buildcraft/api/power/PowerHandler.java +++ b/common/buildcraft/api/power/PowerHandler.java @@ -7,22 +7,36 @@ */ package buildcraft.api.power; +import buildcraft.api.core.SafeTimeTracker; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.ForgeDirection; -import buildcraft.api.core.SafeTimeTracker; -public final class PowerHandler -{ +/** + * The PowerHandler is similar to FluidTank in that it holds your power and + * allows standardized interaction between machines. + * + * To receive power to your machine you needs create an instance of PowerHandler + * and implement IPowerReceptor on the TileEntity. + * + * If you plan emit power, you need only implement IPowerEmitter. You do not + * need a PowerHandler. Engines have a PowerHandler because they can also + * receive power from other Engines. + * + * See TileRefinery for a simple example of a power using machine. + * + * @see IPowerReceptor + * @see IPowerEmitter + * + * @author CovertJaguar + */ +public final class PowerHandler { - public static enum Type - { + public static enum Type { ENGINE, GATE, MACHINE, PIPE, STORAGE; - public boolean canReceiveFromPipes() - { - switch (this) - { + public boolean canReceiveFromPipes() { + switch (this) { case MACHINE: case STORAGE: return true; @@ -31,10 +45,8 @@ public final class PowerHandler } } - public boolean eatsEngineExcess() - { - switch (this) - { + public boolean eatsEngineExcess() { + switch (this) { case MACHINE: case STORAGE: return true; @@ -44,48 +56,64 @@ public final class PowerHandler } } - public static class PerditionCalculator - { + /** + * Extend this class to create custom Perdition algorithms (its not final). + * + * NOTE: It is not possible to create a Zero perdition algorithm. + */ + public static class PerditionCalculator { public static final float DEFAULT_POWERLOSS = 1F; public static final float MIN_POWERLOSS = 0.01F; private final float powerLoss; - public PerditionCalculator() - { + public PerditionCalculator() { powerLoss = DEFAULT_POWERLOSS; } - public PerditionCalculator(float powerLoss) - { - if (powerLoss < MIN_POWERLOSS) - { + /** + * Simple constructor for simple Perdition per tick. + * + * @param powerLoss power loss per tick + */ + public PerditionCalculator(float powerLoss) { + if (powerLoss < MIN_POWERLOSS) { powerLoss = MIN_POWERLOSS; } this.powerLoss = powerLoss; } /** - * Apply the perdition algorithm to the current stored energy. This function can only be - * called once per tick, but it might not be called every tick. It is triggered by any - * manipulation of the stored energy. - * + * Apply the perdition algorithm to the current stored energy. This + * function can only be called once per tick, but it might not be called + * every tick. It is triggered by any manipulation of the stored energy. + * * @param powerHandler the PowerHandler requesting the perdition update * @param current the current stored energy * @param ticksPassed ticks since the last time this function was called * @return */ - public float applyPerdition(PowerHandler powerHandler, float current, long ticksPassed) - { + public float applyPerdition(PowerHandler powerHandler, float current, long ticksPassed) { +// float prev = current; current -= powerLoss * ticksPassed; - if (current < 0) - { + if (current < 0) { current = 0; } +// powerHandler.totalLostPower += prev - current; return current; } - } + /** + * Taxes a flat rate on all incoming power. + * + * Defaults to 0% tax rate. + * + * @return percent of input to tax + */ + public float getTaxPercent() { + return 0; + } + } public static final PerditionCalculator DEFAULT_PERDITION = new PerditionCalculator(); private float minEnergyReceived; private float maxEnergyReceived; @@ -100,65 +128,63 @@ public final class PowerHandler private PerditionCalculator perdition; private final PowerReceiver receiver; private final Type type; + // Debug +// private double totalLostPower = 0; +// private double totalReceivedPower = 0; +// private double totalUsedPower = 0; +// private long startTime = -1; - public PowerHandler(IPowerReceptor receptor, Type type) - { + public PowerHandler(IPowerReceptor receptor, Type type) { this.receptor = receptor; this.type = type; this.receiver = new PowerReceiver(); this.perdition = DEFAULT_PERDITION; } - public PowerReceiver getPowerReceiver() - { + public PowerReceiver getPowerReceiver() { return receiver; } - public float getMinEnergyReceived() - { + public float getMinEnergyReceived() { return minEnergyReceived; } - public float getMaxEnergyReceived() - { + public float getMaxEnergyReceived() { return maxEnergyReceived; } - public float getMaxEnergyStored() - { + public float getMaxEnergyStored() { return maxEnergyStored; } - public float getActivationEnergy() - { + public float getActivationEnergy() { return activationEnergy; } - public float getEnergyStored() - { + public float getEnergyStored() { return energyStored; } /** * Setup your PowerHandler's settings. - * - * @param minEnergyReceived This is the minimum about of power that will be accepted by the - * PowerHandler. This should generally be greater than the activationEnergy if you plan to use - * the doWork() callback. Anything greater than 1 will prevent Redstone Engines from powering - * this Provider. - * @param maxEnergyReceived The maximum amount of power accepted by the PowerHandler. This - * should generally be less than 500. Too low and larger engines will overheat while trying to - * power the machine. Too high, and the engines will never warm up. Greater values also place - * greater strain on the power net. - * @param activationEnergy If the stored energy is greater than this value, the doWork() - * callback is called (once per tick). - * @param maxStoredEnergy The maximum amount of power this PowerHandler can store. Values tend - * to range between 100 and 5000. With 1000 and 1500 being common. + * + * @param minEnergyReceived This is the minimum about of power that will be + * accepted by the PowerHandler. This should generally be greater than the + * activationEnergy if you plan to use the doWork() callback. Anything + * greater than 1 will prevent Redstone Engines from powering this Provider. + * @param maxEnergyReceived The maximum amount of power accepted by the + * PowerHandler. This should generally be less than 500. Too low and larger + * engines will overheat while trying to power the machine. Too high, and + * the engines will never warm up. Greater values also place greater strain + * on the power net. + * @param activationEnergy If the stored energy is greater than this value, + * the doWork() callback is called (once per tick). + * @param maxStoredEnergy The maximum amount of power this PowerHandler can + * store. Values tend to range between 100 and 5000. With 1000 and 1500 + * being common. */ - public void configure(float minEnergyReceived, float maxEnergyReceived, float activationEnergy, float maxStoredEnergy) - { - if (minEnergyReceived > maxEnergyReceived) - { + public void configure(float minEnergyReceived, float maxEnergyReceived, float activationEnergy, float maxStoredEnergy) { + if (minEnergyReceived > maxEnergyReceived) { maxEnergyReceived = minEnergyReceived; } this.minEnergyReceived = minEnergyReceived; @@ -167,10 +193,18 @@ public final class PowerHandler this.activationEnergy = activationEnergy; } - public void configurePowerPerdition(int powerLoss, int powerLossRegularity) - { - if (powerLoss == 0 || powerLossRegularity == 0) - { + /** + * Allows you define perdition in terms of loss/ticks. + * + * This function is mostly for legacy implementations. See + * PerditionCalculator for more complex perdition formulas. + * + * @param powerLoss + * @param powerLossRegularity + * @see PerditionCalculator + */ + public void configurePowerPerdition(int powerLoss, int powerLossRegularity) { + if (powerLoss == 0 || powerLossRegularity == 0) { perdition = new PerditionCalculator(0); return; } @@ -178,44 +212,50 @@ public final class PowerHandler } /** - * Allows you to define a new PerditionCalculator class to handler perdition calculations. - * - * For example if you want exponentially increasing loss based on amount stored. - * + * Allows you to define a new PerditionCalculator class to handler perdition + * calculations. + * + * For example if you want exponentially increasing loss based on amount + * stored. + * * @param perdition */ - public void setPerdition(PerditionCalculator perdition) - { + public void setPerdition(PerditionCalculator perdition) { if (perdition == null) perdition = DEFAULT_PERDITION; this.perdition = perdition; } - public PerditionCalculator getPerdition() - { + public PerditionCalculator getPerdition() { if (perdition == null) return DEFAULT_PERDITION; return perdition; } /** - * Ticks the power handler. You should call this if you can, but its not required. - * - * If you don't call it, the possibility exists for some weirdness with the perdition algorithm - * and work callback as its possible they will not be called on every tick they otherwise would - * be. You should be able to design around this though if you are aware of the limitations. + * Ticks the power handler. You should call this if you can, but its not + * required. + * + * If you don't call it, the possibility exists for some weirdness with the + * perdition algorithm and work callback as its possible they will not be + * called on every tick they otherwise would be. You should be able to + * design around this though if you are aware of the limitations. */ - public void update() - { + public void update() { +// if (startTime == -1) +// startTime = receptor.getWorld().getTotalWorldTime(); +// else { +// long duration = receptor.getWorld().getTotalWorldTime() - startTime; +// System.out.printf("Power Stats: %s - Stored: %.2f Gained: %.2f - %.2f/t Lost: %.2f - %.2f/t Used: %.2f - %.2f/t%n", receptor.getClass().getSimpleName(), energyStored, totalReceivedPower, totalReceivedPower / duration, totalLostPower, totalLostPower / duration, totalUsedPower, totalUsedPower / duration); +// } + applyPerdition(); applyWork(); validateEnergy(); } - private void applyPerdition() - { - if (perditionTracker.markTimeIfDelay(receptor.getWorld(), 1) && energyStored > 0) - { + private void applyPerdition() { + if (perditionTracker.markTimeIfDelay(receptor.getWorld(), 1) && energyStored > 0) { float newEnergy = getPerdition().applyPerdition(this, energyStored, perditionTracker.durationOfLastDelay()); if (newEnergy == 0 || newEnergy < energyStored) energyStored = newEnergy; @@ -225,26 +265,19 @@ public final class PowerHandler } } - private void applyWork() - { - if (energyStored >= activationEnergy) - { - if (doWorkTracker.markTimeIfDelay(receptor.getWorld(), 1)) - { + private void applyWork() { + if (energyStored >= activationEnergy) { + if (doWorkTracker.markTimeIfDelay(receptor.getWorld(), 1)) { receptor.doWork(this); } } } - private void updateSources(ForgeDirection source) - { - if (sourcesTracker.markTimeIfDelay(receptor.getWorld(), 1)) - { - for (int i = 0; i < 6; ++i) - { + private void updateSources(ForgeDirection source) { + if (sourcesTracker.markTimeIfDelay(receptor.getWorld(), 1)) { + for (int i = 0; i < 6; ++i) { powerSources[i] -= sourcesTracker.durationOfLastDelay(); - if (powerSources[i] < 0) - { + if (powerSources[i] < 0) { powerSources[i] = 0; } } @@ -255,34 +288,28 @@ public final class PowerHandler } /** - * Extract energy from the PowerHandler. You must call this even if doWork() triggers. - * + * Extract energy from the PowerHandler. You must call this even if doWork() + * triggers. + * * @param min * @param max * @param doUse * @return amount used */ - public float useEnergy(float min, float max, boolean doUse) - { + public float useEnergy(float min, float max, boolean doUse) { applyPerdition(); float result = 0; - if (energyStored >= min) - { - if (energyStored <= max) - { + if (energyStored >= min) { + if (energyStored <= max) { result = energyStored; - if (doUse) - { + if (doUse) { energyStored = 0; } - } - else - { + } else { result = max; - if (doUse) - { + if (doUse) { energyStored -= max; } } @@ -290,137 +317,122 @@ public final class PowerHandler validateEnergy(); +// if (doUse) +// totalUsedPower += result; + return result; } - public void readFromNBT(NBTTagCompound data) - { + public void readFromNBT(NBTTagCompound data) { readFromNBT(data, "powerProvider"); } - public void readFromNBT(NBTTagCompound data, String tag) - { + public void readFromNBT(NBTTagCompound data, String tag) { NBTTagCompound nbt = data.getCompoundTag(tag); energyStored = nbt.getFloat("storedEnergy"); } - public void writeToNBT(NBTTagCompound data) - { + public void writeToNBT(NBTTagCompound data) { writeToNBT(data, "powerProvider"); } - public void writeToNBT(NBTTagCompound data, String tag) - { + public void writeToNBT(NBTTagCompound data, String tag) { NBTTagCompound nbt = new NBTTagCompound(); nbt.setFloat("storedEnergy", energyStored); data.setCompoundTag(tag, nbt); } - public final class PowerReceiver - { + public final class PowerReceiver { - private PowerReceiver() - { + private PowerReceiver() { } - public float getMinEnergyReceived() - { + public float getMinEnergyReceived() { return minEnergyReceived; } - public float getMaxEnergyReceived() - { + public float getMaxEnergyReceived() { return maxEnergyReceived; } - public float getMaxEnergyStored() - { + public float getMaxEnergyStored() { return maxEnergyStored; } - public float getActivationEnergy() - { + public float getActivationEnergy() { return activationEnergy; } - public float getEnergyStored() - { + public float getEnergyStored() { return energyStored; } - public Type getType() - { + public Type getType() { return type; } - public void update() - { + public void update() { PowerHandler.this.update(); } /** * The amount of power that this PowerHandler currently needs. - * + * * @return */ - public float powerRequest() - { + public float powerRequest() { update(); return Math.min(maxEnergyReceived, maxEnergyStored - energyStored); } /** * Add power to the PowerReceiver from an external source. - * + * + * IPowerEmitters are responsible for calling this themselves. + * * @param quantity * @param from * @return the amount of power used */ - public float receiveEnergy(Type source, final float quantity, ForgeDirection from) - { + public float receiveEnergy(Type source, final float quantity, ForgeDirection from) { float used = quantity; - if (source == Type.ENGINE) - { - if (used < minEnergyReceived) - { + if (source == Type.ENGINE) { + if (used < minEnergyReceived) { return 0; - } - else if (used > maxEnergyReceived) - { + } else if (used > maxEnergyReceived) { used = maxEnergyReceived; } } updateSources(from); + used -= used * getPerdition().getTaxPercent(); + used = addEnergy(used); applyWork(); - if (source == Type.ENGINE && type.eatsEngineExcess()) - { - return Math.min(quantity, maxEnergyReceived); + if (source == Type.ENGINE && type.eatsEngineExcess()) { + used = Math.min(quantity, maxEnergyReceived); } +// totalReceivedPower += used; + return used; } } /** - * + * * @return the amount the power changed by */ - public float addEnergy(float quantity) - { + public float addEnergy(float quantity) { energyStored += quantity; - if (energyStored > maxEnergyStored) - { + if (energyStored > maxEnergyStored) { quantity -= energyStored - maxEnergyStored; energyStored = maxEnergyStored; - } - else if (energyStored < 0) - { + } else if (energyStored < 0) { quantity -= energyStored; energyStored = 0; } @@ -430,25 +442,20 @@ public final class PowerHandler return quantity; } - public void setEnergy(float quantity) - { + public void setEnergy(float quantity) { this.energyStored = quantity; validateEnergy(); } - public boolean isPowerSource(ForgeDirection from) - { + public boolean isPowerSource(ForgeDirection from) { return powerSources[from.ordinal()] != 0; } - private void validateEnergy() - { - if (energyStored < 0) - { + private void validateEnergy() { + if (energyStored < 0) { energyStored = 0; } - if (energyStored > maxEnergyStored) - { + if (energyStored > maxEnergyStored) { energyStored = maxEnergyStored; } } diff --git a/common/buildcraft/api/recipes/AssemblyRecipe.java b/common/buildcraft/api/recipes/AssemblyRecipe.java index 573db2827..6ab394187 100644 --- a/common/buildcraft/api/recipes/AssemblyRecipe.java +++ b/common/buildcraft/api/recipes/AssemblyRecipe.java @@ -1,13 +1,14 @@ package buildcraft.api.recipes; +import java.util.ArrayList; import java.util.LinkedList; import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; public class AssemblyRecipe { public static LinkedList assemblyRecipes = new LinkedList(); - - public final ItemStack[] input; + public final Object[] input; public final ItemStack output; public final float energy; @@ -17,30 +18,69 @@ public class AssemblyRecipe { this.energy = energy; } - public boolean canBeDone(ItemStack[] items) { + /** + * This version of AssemblyRecipe supports the OreDictionary + * + * @param input Object... containing either an ItemStack, or a paired string + * and integer(ex: "dyeBlue", 1) + * @param energy MJ cost to produce + * @param output resulting ItemStack + */ + public AssemblyRecipe(int energy, ItemStack output, Object... input) { + this.output = output; + this.energy = energy; + this.input = input; - for (ItemStack in : input) { + for (int i = 0; i < input.length; i++) { + if (input[i] instanceof String) { + input[i] = OreDictionary.getOres((String) input[i]); + } + } + } - if (in == null) { + public boolean canBeDone(ItemStack... items) { + for (int i = 0; i < input.length; i++) { + if (input[i] == null) continue; - } - int found = 0; // Amount of ingredient found in inventory + if (input[i] instanceof ItemStack) { + ItemStack requirement = (ItemStack) input[i]; + int found = 0; // Amount of ingredient found in inventory + int expected = requirement.stackSize; + for (ItemStack item : items) { + if (item == null) + continue; + + if (item.isItemEqual(requirement)) + found += item.stackSize; // Adds quantity of stack to amount found - for (ItemStack item : items) { - if (item == null) { - continue; } - if (item.isItemEqual(in)) { - found += item.stackSize; // Adds quantity of stack to amount - // found - } - } + // Return false if the amount of ingredient found + // is not enough + if (found < expected) + return false; + } else if (input[i] instanceof ArrayList) { + ArrayList oreList = (ArrayList) input[i]; + int found = 0; // Amount of ingredient found in inventory + int expected = (Integer) input[i++ + 1]; - if (found < in.stackSize) - return false; // Return false if the amount of ingredient found - // is not enough + for (ItemStack item : items) { + if (item == null) + continue; + for (ItemStack oreItem : oreList) { + if (OreDictionary.itemMatches(oreItem, item, true)) { + found += item.stackSize; + break; + } + } + } + + // Return false if the amount of ingredient found + // is not enough + if (found < expected) + return false; + } } return true; diff --git a/common/ic2/api/Direction.java b/common/ic2/api/Direction.java index ee5e536f2..25346825d 100644 --- a/common/ic2/api/Direction.java +++ b/common/ic2/api/Direction.java @@ -59,7 +59,11 @@ public enum Direction { coords[dir/2] += getSign(); if (tileEntity.worldObj != null && tileEntity.worldObj.blockExists(coords[0], coords[1], coords[2])) { - return tileEntity.worldObj.getBlockTileEntity(coords[0], coords[1], coords[2]); + try { + return tileEntity.worldObj.getBlockTileEntity(coords[0], coords[1], coords[2]); + } catch (Exception e) { + throw new RuntimeException("error getting TileEntity at dim "+tileEntity.worldObj.provider.dimensionId+" "+coords[0]+"/"+coords[1]+"/"+coords[2]); + } } else { return null; } diff --git a/common/ic2/api/energy/tile/IMetaDelegate.java b/common/ic2/api/energy/tile/IMetaDelegate.java index 0cb1a34dd..8f4e830c8 100644 --- a/common/ic2/api/energy/tile/IMetaDelegate.java +++ b/common/ic2/api/energy/tile/IMetaDelegate.java @@ -26,6 +26,8 @@ public interface IMetaDelegate extends IEnergyTile { /** * Get the sub-TileEntities belonging to this Meta TileEntity. * + * @note the list has to be consistent between the EnergyNet Load and Unload events. + * * @return sub-TileEntity array */ List getSubTiles(); diff --git a/common/ic2/api/item/Items.java b/common/ic2/api/item/Items.java index 0d3f75343..413bdd4ae 100644 --- a/common/ic2/api/item/Items.java +++ b/common/ic2/api/item/Items.java @@ -42,346 +42,539 @@ public final class Items { /* Possible values: - ----- blocks ----- - - ores - copperOre Copper Ore block, currently not meta sensitive, meta in ItemStack set to 0, ore dictionary: oreCopper, null with enableWorldGenOreCopper=false - tinOre Tin Ore block, currently not meta sensitive, meta in ItemStack set to 0, ore dictionary: oreTin, null with enableWorldGenOreTin=false - uraniumOre Tin Ore block, currently not meta sensitive, meta in ItemStack set to 0, ore dictionary: oreUranium, null with enableWorldGenOreUranium=false - - rubber related - Rubber wood block, meta reflects the state, meta in ItemStack set to 0, ore dictionary: woodRubber (with meta 0), null with enableWorldGenTreeRubber=false - dropped (as an item) -> metadata 0 - block, no resin spot -> metadata 0 or 1 - block, wet resin spot -> metadata 2-5 (according to the side) - block, dry resin spot -> metadata 8-11 (wet state + 6) - - rubberWood - rubberLeaves Rubber Leaves block, currently not meta sensitive, meta in ItemStack set to 0, null with enableWorldGenTreeRubber=false - rubberSapling Rubber Sapling block, currently not meta sensitive, meta in ItemStack set to 0, null with enableWorldGenTreeRubber=false - resinSheet Resin Sheet block, currently not meta sensitive - rubberTrampoline Rubber Trampoline block, meta reflects internal state, meta in ItemStack set to 0 - - building/storage - ironFence Iron Fence block, currently not meta sensitive - - reinforcedStone Reinforced Stone block, currently not meta sensitive - reinforcedGlass Reinforced Glass block, currently not meta sensitive - reinforcedDoorBlock Reinforced Door block, meta reflects the state (see vanilla doors), meta in ItemStack set to 0 - - constructionFoam Construction Foam block, currently not meta sensitive - constructionFoamWall Construction Foam Wall block, meta = color, implements IPaintableBlock - scaffold Scaffold block, meta reflects internal physical model data - - bronzeBlock Bronze block, meta sensitive - copperBlock Copper block, meta sensitive - tinBlock Tin block, meta sensitive - uraniumBlock Uranium block, meta sensitive - - cables (when placed as a block, inventory items are different TE implements IEnergyConductor) - copperCableBlock Copper Cable block, meta sensitive - insulatedCopperCableBlock Insulated Copper Cable block, meta sensitive - - goldCableBlock Gold Cable block, meta sensitive - insulatedGoldCableBlock Insulated Gold Cable block, meta sensitive - doubleInsulatedGoldCableBlock Double Insulated Gold Cable block, meta sensitive - - ironCableBlock Iron Cable block, meta sensitive - insulatedIronCableBlock Insulated Iron Cable block, meta sensitive - doubleInsulatedIronCableBlock Double Insulated Iron Cable block, meta sensitive - trippleInsulatedIronCableBlock Tripple Insulated Iron Cable block, meta sensitive - - glassFiberCableBlock Glass Fiber Cable block, meta sensitive - - tinCableBlock Tin Cable block, meta sensitive - - detectorCableBlock Detector Cable block, meta sensitive - splitterCableBlock Splitter Cable block, meta sensitive - - generators + related (TE implements IEnergySource ex. reactorChamber) - generator Generator block, meta sensitive - geothermalGenerator Geothermal Generator block, meta sensitive - waterMill Water Mill block, meta sensitive - solarPanel Solar Panel block, meta sensitive - windMill Wind Mill block, meta sensitive - nuclearReactor Nuclear Reactor block, meta sensitive - reactorChamber Reactor Chamber block, currently not meta sensitive - - energy storages (TE implements IEnergySource and IEnergyConductor) - batBox BatBox block, meta sensitive - mfeUnit MFE Unit block, meta sensitive - mfsUnit MFS Unit block, meta sensitive - - transformers (TE implements IEnergySource and IEnergyConductor) - lvTransformer LV Transformer block, meta sensitive - mvTransformer MV Transformer block, meta sensitive - hvTransformer HV Transformer block, meta sensitive - - machines + related (TE implements IEnergySink ex. machine, miningPipe, miningPipeTip) - machine Machine block, meta sensitive - advancedMachine Advanced Machine block, meta sensitive - - ironFurnace Iron Furnace block, meta sensitive - electroFurnace Electro Furnace block, meta sensitive - macerator Macerator block, meta sensitive - extractor Extractor block, meta sensitive - compressor Compressor block, meta sensitive - canner Canner block, meta sensitive - miner Miner block, meta sensitive - pump Pump block, meta sensitive - magnetizer Magnetizer block, meta sensitive - electrolyzer Electrolyzer block, meta sensitive - recycler Recycler block, meta sensitive - inductionFurnace Induction Furnace block, meta sensitive - massFabricator Mass Fabricator block, meta sensitive - terraformer Terraformer block, meta sensitive - teleporter Teleporter block, meta sensitive - teslaCoil Tesla Coil block, meta sensitive - luminator Passive (dark) Luminator block, meta = facing - activeLuminator Active (bright) Luminator block, meta = facing - - miningPipe Mining Pipe block, currently not meta sensitive, meta in ItemStack set to 0 - miningPipeTip Mining Pipe Tip block, currently not meta sensitive, meta in ItemStack set to 0 - - personal blocks - personalSafe Personal Safe block, meta sensitive - tradeOMat Trade-O-Mat block, meta sensitive - energyOMat Energy-O-Mat block, meta sensitive - - explosives - industrialTnt Industrial TNT block, currently not meta sensitive - nuke Nuke block, currently not meta sensitive - dynamiteStick Dynamite Stick block, meta = placement, meta in ItemStack set to 0 - dynamiteStickWithRemote Dynamite Stick with Remote block, meta = placement, meta in ItemStack set to 0 - - Agriculture Stuff - crop Crop Block, empty, not meta sensitive - - - ----- items ----- - - rubber + related - resin Resin item, currently not meta sensitive - rubber Rubber item, currently not meta sensitive, ore dictionary: itemRubber - - ore drops - uraniumDrop Uranium Drop item, currently not meta sensitive, ore dictionary: itemDropUranium - - dusts - bronzeDust Bronze Dust item, currently not meta sensitive - clayDust Clay Dust item, currently not meta sensitive - coalDust Coal Dust item, currently not meta sensitive - copperDust Copper Dust item, currently not meta sensitive - goldDust Gold Dust item, currently not meta sensitive - ironDust Iron Dust item, currently not meta sensitive - silverDust Silver Dust item, currently not meta sensitive - smallIronDust Small Iron Dust item, currently not meta sensitive - tinDust Tin Dust item, currently not meta sensitive - hydratedCoalDust Hydrated Coal Dust item, currently not meta sensitive - - ingots - refinedIronIngot Refined Iron Ingot item, currently not meta sensitive, ore dictionary: ingotRefinedIron - copperIngot Copper Ingot item, currently not meta sensitive, ore dictionary: ingotCopper - tinIngot Tin Ingot item, currently not meta sensitive, ore dictionary: ingotTin - bronzeIngot Bronze Ingot item, currently not meta sensitive, ore dictionary: ingotBronze - mixedMetalIngot Mixed Metal Ingot item, currently not meta sensitive - uraniumIngot Uranium Ingot item, currently not meta sensitive, ore dictionary: ingotUranium - - tools/weapons (without electric tools) - treetap Treetap item, meta = damage value - wrench Wrench item, meta = damage value - cutter Insulation Cutter item, meta = damage value - constructionFoamSprayer Construction Foam Sprayer item, meta = charges (as of v1.45) - - bronzePickaxe Bronze Pickaxe item, meta = damage value - bronzeAxe Bronze Axe item, meta = damage value - bronzeSword Bronze Sword item, meta = damage value - bronzeShovel Bronze Shovel item, meta = damage value - bronzeHoe Bronze Hoe item, meta = damage value - - el. tools/devices/weapons - miningDrill Mining Drill item, meta = visual charge indicator, implements IElectricItem - diamondDrill Diamond Tipped Mining Drill item, meta = visual charge indicator, implements IElectricItem - chainsaw Chainsaw item, meta = visual charge indicator, implements IElectricItem - electricWrench Electric Wrench item, meta = visual charge indicator, implements IElectricItem - electricTreetap Electric Treetap item, meta = visual charge indicator, implements IElectricItem - miningLaser Mining Laser item, meta = visual charge indicator, implements IElectricItem - - ecMeter EC-Mater item, currently not meta sensitive - odScanner Ore Density Scanner item, meta = damage value for charge level, implements IElectricItem - ovScanner Ore Value Scanner item, meta = visual charge indicator, implements IElectricItem - - frequencyTransmitter Frequency Transmitter item, currently not meta sensitive - - nanoSaber Idle Nano Saber item, meta = visual charge indicator, implements IElectricItem - enabledNanoSaber Enabled Nano Saber item, meta = visual charge indicator, implements IElectricItem - - armor/wearable - rubberBoots Rubber Boots item, meta = damage value - - bronzeHelmet Bronze Helmet Armor item, meta = damage value - bronzeChestplate Bronze Chestplate Armor item, meta = damage value - bronzeLeggings Bronze Leggings Armor item, meta = damage value - bronzeBoots Bronze Boots Armor item, meta = damage value - - compositeArmor Composite Armor item, meta = damage value for charge level - - nanoHelmet Nano Helmet Armor item, meta = visual charge indicator, implements IElectricItem - nanoBodyarmor Nano Bodyarmor item, meta = visual charge indicator, implements IElectricItem - nanoLeggings Nano Leggings Armor item, meta = visual charge indicator, implements IElectricItem - nanoBoots Nano Boots Armor item, meta = visual charge indicator, implements IElectricItem - - quantumHelmet Quantum Helmet Armor item, meta = visual charge indicator, implements IElectricItem - quantumBodyarmor Quantum Bodyarmor item, meta = visual charge indicator, implements IElectricItem - quantumLeggings Quantum Leggings Armor item, meta = visual charge indicator, implements IElectricItem - quantumBoots Quantum Boots Armor item, meta = visual charge indicator, implements IElectricItem - - jetpack Jetpack item, meta = damage value for fuel level - electricJetpack Electric Jetpack item, meta = visual charge indicator, implements IElectricItem - - batPack BatPack item, meta = visual charge indicator, implements IElectricItem, can provide energy - lapPack LapPack item, meta = visual charge indicator, implements IElectricItem, can provide energy - - cfPack CF Pack item, meta = charges (as of v1.45) - - solarHelmet Solar Helmet item, currently not meta sensitive - staticBoots Static Boots item, currently not meta sensitive - - batteries - reBattery Empty RE Battery item, currently not meta sensitive, implements IElectricItem - chargedReBattery RE Battery item, meta = visual charge indicator, implements IElectricItem, can provide energy - energyCrystal Energy Crystal item, meta = visual charge indicator, implements IElectricItem, can provide energy - lapotronCrystal Lapotron Crystal item, meta = visual charge indicator, implements IElectricItem, can provide energy - suBattery SU Battery item, currently not meta sensitive - - cables - copperCableItem Copper Cable item, meta sensitive - insulatedCopperCableItem Insulated Copper Cable item, meta sensitive - - goldCableItem Gold Cable item, meta sensitive - insulatedGoldCableItem Insulated Gold Cable item, meta sensitive - doubleInsulatedGoldCableItem Double Insulated Gold Cable item, meta sensitive - - ironCableItem Iron Cable item, meta sensitive - insulatedIronCableItem Insulated Iron Cable item, meta sensitive - doubleInsulatedIronCableItem Double Insulated Iron Cable item, meta sensitive - trippleInsulatedIronCableItem Tripple Insulated Iron Cable item, meta sensitive - - glassFiberCableItem Glass Fiber Cable item, meta sensitive - - tinCableItem Tin Cable item, meta sensitive - - detectorCableItem Detector Cable item, meta sensitive - splitterCableItem Splitter Cable item, meta sensitive - - cells/containers (without reactor components) - cell Empty Cell item, currently not meta sensitive - lavaCell Lava Cell item, currently not meta sensitive - hydratedCoalCell Hydrated Coal Cell item, currently not meta sensitive - bioCell Bio Cell item, currently not meta sensitive - coalfuelCell Coalfuel Cell item, currently not meta sensitive - biofuelCell Biofuel Cell item, currently not meta sensitive - waterCell Water Cell item, currently not meta sensitive - electrolyzedWaterCell Electrolyzed Water Cell item, currently not meta sensitive - - fuelCan Empty Fuel Can item, currently not meta sensitive - filledFuelCan Fuel Can item, meta = fuel value (as of v1.45) - - tinCan Empty Tin Can item, currently not meta sensitive - filledTinCan Filled Tin Can item, currently not meta sensitive - - reactor components - uraniumCell Uranium Cell item, meta = damage value - coolingCell Cooling Cell item, meta = damage value - - depletedIsotopeCell Depleted Isotope Cell item, meta = damage value - reEnrichedUraniumCell Re-Enriched Uranium Cell item, currently not meta sensitive - nearDepletedUraniumCell Near-Depleted Uranium Cell item, currently not meta sensitive - - integratedReactorPlating Integrated Reactor Plating item, meta = damage value - integratedHeatDisperser Integrated Heat Disperser item, meta = damage value - - terraformer blueprints - terraformerBlueprint Empty Terraformer Blueprint item, currently not meta sensitive - cultivationTerraformerBlueprint Cultivation Terraformer Blueprint item, currently not meta sensitive - irrigationTerraformerBlueprint Irrigation Terraformer Blueprint item, currently not meta sensitive - chillingTerraformerBlueprint Chilling Terraformer Blueprint item, currently not meta sensitive - desertificationTerraformerBlueprint Desertification Terraformer Blueprint item, currently not meta sensitive - flatificatorTerraformerBlueprint Flatificator Terraformer Blueprint item, currently not meta sensitive - mushroomTerraformerBlueprint Mushroom Terraformer Blueprint item, currently not meta sensitive - - diamond chain - coalBall Coal Ball item, currently not meta sensitive - compressedCoalBall Compressed Coal Ball item, currently not meta sensitive - coalChunk Coal Chunk item, currently not meta sensitive - industrialDiamond Industrial Diamond item, currently not meta sensitive, DEPRECATED - - recycler chain - scrap Scrap item, currently not meta sensitive - scrapBox Scrap Box item, currently not meta sensitive - - fuel production chain - hydratedCoalClump Hydrated Coal Clump item, currently not meta sensitive - plantBall Plant Ball item, currently not meta sensitive - compressedPlantBall Compressed Plant Ball item, currently not meta sensitive - - painting - painter Painter item, currently not meta sensitive - - blackPainter Black Painter item, meta = damage value - redPainter Red Painter item, meta = damage value - greenPainter Green Painter item, meta = damage value - brownPainter Brown Painter item, meta = damage value - bluePainter Blue Painter item, meta = damage value - purplePainter Purple Painter item, meta = damage value - cyanPainter Cyan Painter item, meta = damage value - lightGreyPainter Light Grey Painter item, meta = damage value - darkGreyPainter Dark Grey Painter item, meta = damage value - pinkPainter Pink Painter item, meta = damage value - limePainter Lime Painter item, meta = damage value - yellowPainter Yellow Painter item, meta = damage value - cloudPainter Cloud Painter item, meta = damage value - magentaPainter Magenta Painter item, meta = damage value - orangePainter Orange Painter item, meta = damage value - whitePainter White Painter item, meta = damage value - - explosives + related - dynamite Throwable Dynamite item, currently not meta sensitive - stickyDynamite Throwable Sticky Dynamite item, currently not meta sensitive - - remote Dynamite Remote item, currently not meta sensitive - - misc intermediate recipe ingredients - electronicCircuit Electronic Circuit item, currently not meta sensitive - advancedCircuit Advanced Circuit item, currently not meta sensitive - - advancedAlloy Advanced Alloy item, currently not meta sensitive - - carbonFiber Raw Carbon Fiber item, currently not meta sensitive - carbonMesh Raw Carbon Mesh item, currently not meta sensitive - carbonPlate Carbon Plate item, currently not meta sensitive - - matter UU-Matter item, currently not meta sensitive - iridiumOre Iridium Ore item, currently not meta sensitive - iridiumPlate Iridium Plate item, currently not meta sensitive - - upgrade modules - overclockerUpgrade overclocker upgrade item, meta sensitive - transformerUpgrade transformer upgrade item, meta sensitive - energyStorageUpgrade energy storage upgrade item, meta sensitive - - misc - coin Coin item, currently not meta sensitive - reinforcedDoor Reinforced Door item, currently not meta sensitive - constructionFoamPellet Construction Foam Pellet item, currently not meta sensitive - cropSeed Crop seeds, stuff stored in NBT, don't use for crafting recipes! - cropnalyzer Cropnalyzer handheld device - fertilizer Basic IC2Item, used to provide nutrients toCropBlocks - hydratingCell Cell used to hydrate Crops, meta = Content, 0 = Full, 9999 = Near empty - electricHoe Electric Hoe, meta = charge level - solarHelmet Solar Helmet item, currently not meta sensitive - terraWart Terra Wart item, cures potion effects - weedEx Weed-EX can, meta = uses left + // ores + copperOre; // Copper Ore block, currently not meta sensitive, meta in ItemStack set to 0, ore dictionary: oreCopper, null with enableWorldGenOreCopper=false + tinOre; // Tin Ore block, currently not meta sensitive, meta in ItemStack set to 0, ore dictionary: oreTin, null with enableWorldGenOreTin=false + uraniumOre; // Tin Ore block, currently not meta sensitive, meta in ItemStack set to 0, ore dictionary: oreUranium, null with enableWorldGenOreUranium=false + leadOre; // Lead Ore Block, currently not meta sensitive, meta in ItemStack set to 0, ore dictionary: oreLead, null with enableWorldGenOreLead=false + + // rubber related + + Rubber wood block, meta reflects the state, meta in ItemStack set to 0, ore dictionary: woodRubber (with meta 0), null with enableWorldGenTreeRubber=false + dropped (as an item) -> metadata 0 + block, no resin spot -> metadata 0 or 1 + block, wet resin spot -> metadata 2-5 (according to the side) + block, dry resin spot -> metadata 8-11 (wet state + 6) + + rubberWood; + rubberLeaves; // Rubber Leaves block, currently not meta sensitive, meta in ItemStack set to 0, null with enableWorldGenTreeRubber=false + rubberSapling; // Rubber Sapling block, currently not meta sensitive, meta in ItemStack set to 0, null with enableWorldGenTreeRubber=false + resinSheet; // Resin Sheet block, currently not meta sensitive + rubberTrampoline; // Rubber Trampoline block, meta reflects internal state, meta in ItemStack set to 0 + + // building/storage + ironFence; // Iron Fence block, currently not meta sensitive + + reinforcedStone; // Reinforced Stone block, currently not meta sensitive + reinforcedGlass; // Reinforced Glass block, currently not meta sensitive + reinforcedDoorBlock; // Reinforced Door block, meta reflects the state (see vanilla doors), meta in ItemStack set to 0 + + constructionreinforcedFoam; // Construction Reinforced Foam block, currently not meta sensitive + constructionFoam; // Construction Foam block, currently not meta sensitive + constructionFoamWall; // Construction Foam Wall block, meta = color, implements IPaintableBlock + scaffold; // Scaffold block, meta reflects internal physical model data + ironScaffold; // Scaffold block, meta reflects internal physical model data + + bronzeBlock; // Bronze block, meta sensitive + copperBlock; // Copper block, meta sensitive + tinBlock; // Tin block, meta sensitive + uraniumBlock; // Uranium block, meta sensitive + leadBlock; // Uranium block, meta sensitive + + // cables (when placed as a block, inventory items are different; TE implements IEnergyConductor) + + copperCableBlock; // Copper Cable block, meta sensitive + insulatedCopperCableBlock; // Insulated Copper Cable block, meta sensitive + + goldCableBlock; // Gold Cable block, meta sensitive + insulatedGoldCableBlock; // Insulated Gold Cable block, meta sensitive + doubleInsulatedGoldCableBlock; // Double Insulated Gold Cable block, meta sensitive + + ironCableBlock; // Iron Cable block, meta sensitive + insulatedIronCableBlock; // Insulated Iron Cable block, meta sensitive + doubleInsulatedIronCableBlock; // Double Insulated Iron Cable block, meta sensitive + trippleInsulatedIronCableBlock; // Tripple Insulated Iron Cable block, meta sensitive + + glassFiberCableBlock; // Glass Fiber Cable block, meta sensitive + + tinCableBlock; // Tin Cable block, meta sensitive + insulatedtinCableBlock; // Insulated Tin Cable item, meta sensitive + detectorCableBlock; // Detector Cable block, meta sensitive + splitterCableBlock; // Splitter Cable block, meta sensitive + + // generators + related (TE implements IEnergySource ex. reactorChamber) + + generator; // Generator block, meta sensitive + geothermalGenerator; // Geothermal Generator block, meta sensitive + waterMill; // Water Mill block, meta sensitive + solarPanel; // Solar Panel block, meta sensitive + windMill; // Wind Mill block, meta sensitive + nuclearReactor; // Nuclear Reactor block, meta sensitive + reactorChamber; // Reactor Chamber block, currently not meta sensitive + RTGenerator; // Radioisotope Thermoelectric Generator block, meta sensitive + semifluidGenerator; // Semifluid Generator block, meta sensitive + + + // energy storages (TE implements IEnergySource and IEnergyConductor) + + batBox; // BatBox block, meta sensitive + cesuUnit; // CESU Unit block, meta sensitive + mfeUnit; // MFE Unit block, meta sensitive + mfsUnit; // MFS Unit block, meta sensitive + + // transformers (TE implements IEnergySource and IEnergyConductor) + + lvTransformer; // LV Transformer block, meta sensitive + mvTransformer; // MV Transformer block, meta sensitive + hvTransformer; // HV Transformer block, meta sensitive + evTransformer; // EV Transformer block, meta sensitive + + // machines + related (TE implements IEnergySink ex. machine, miningPipe, miningPipeTip) + + machine; // Machine block, meta sensitive + advancedMachine; // Advanced Machine block, meta sensitive + + ironFurnace; // Iron Furnace block, meta sensitive + electroFurnace; // Electro Furnace block, meta sensitive + macerator; // Macerator block, meta sensitive + extractor; // Extractor block, meta sensitive + compressor; // Compressor block, meta sensitive + canner; // Canner block, meta sensitive + miner; // Miner block, meta sensitive + pump; // Pump block, meta sensitive + magnetizer; // Magnetizer block, meta sensitive + electrolyzer; // Electrolyzer block, meta sensitive + recycler; // Recycler block, meta sensitive + inductionFurnace; // Induction Furnace block, meta sensitive + massFabricator; // Mass Fabricator block, meta sensitive + terraformer; // Terraformer block, meta sensitive + teleporter; // Teleporter block, meta sensitive + teslaCoil; // Tesla Coil block, meta sensitive + luminator; // Passive (dark) Luminator block, meta = facing + activeLuminator; // Active (bright) Luminator block, meta = facing + centrifuge; // Centrifuge block, meta sensitive + metalformer; // MetalFormer block ,meta sensitive + orewashingplant; // Ore Wasching Plant,Meta sensitive + patternstorage; // Pattern Storage,Meta sensitive + scanner; // Scanner,Meta sensitive + replicator; // Replicator,Meta sensitive + + miningPipe; // Mining Pipe block, currently not meta sensitive, meta in ItemStack set to 0 + miningPipeTip; // Mining Pipe Tip block, currently not meta sensitive, meta in ItemStack set to 0 + + + // personal blocks + + personalSafe; // Personal Safe block, meta sensitive + tradeOMat; // Trade-O-Mat block, meta sensitive + energyOMat; // Energy-O-Mat block, meta sensitive + + // explosives + + industrialTnt; // Industrial TNT block, currently not meta sensitive + nuke; // Nuke block, currently not meta sensitive + dynamiteStick; // Dynamite Stick block, meta = placement, meta in ItemStack set to 0 + dynamiteStickWithRemote; // Dynamite Stick with Remote block, meta = placement, meta in ItemStack set to 0 + + // Agriculture Stuff + + crop; // Crop Block, empty, not meta sensitive + cropmatron; // Cropmatron machien block, meta sensititve + + // ----- items ----- + + // rubber + related + resin; // Resin item, currently not meta sensitive + rubber; // Rubber item, currently not meta sensitive, ore dictionary: itemRubber + + FluidCell; + + // Lithium -> Tritium + + reactorLithiumCell; // LithiumCell use in Reaktor, , meta = damage value + TritiumCell; // Tritium, currently not meta sensitive + + // Nuclear Fuel + + UranFuel; // , currently not meta sensitive + MOXFuel; // , currently not meta sensitive + Plutonium; // , currently not meta sensitive + smallPlutonium; // , currently not meta sensitive + Uran235; // , currently not meta sensitive + smallUran235; // , currently not meta sensitive + Uran238; // , currently not meta sensitive + + reactorDepletedUraniumSimple; // Depleted Uranium Cell items, currently not meta sensitive + reactorDepletedUraniumDual; + reactorDepletedUraniumQuad; + reactorDepletedMOXSimple; // Depleted MOX Cell items, currently not meta sensitive + reactorDepletedMOXDual; + reactorDepletedMOXQuad; + reactorMOXSimple; // Depleted MOX Cell items, currently not meta sensitive + reactorMOXDual; + reactorMOXQuad; + RTGPellets; + + + // Recipe Parts + + coil; // Coil, meta sensitive + elemotor; // electric motor, meta sensitive + powerunit; // Item Power Unit, meta sensitive + powerunitsmall; // Item Power Unit, meta sensitive + + + // ItemCasing + + casingcopper; // Copper ItemCasing, meta sensitive + casingtin; // Tin ItemCasing, meta sensitive + casingbronze; // Bronze ItemCasing, meta sensitive + casinggold; // Gold ItemCasing, meta sensitive + casingiron; // Iron ItemCasing, meta sensitive + @Deprecated + casingadviron; // Refined Iron ItemCasing, meta sensitive + casinglead; // Lead ItemCasing, meta sensitive + + // Crushed Ore + crushedIronOre; // Crushed Iron Ore, meta sensitive + crushedCopperOre; // Crushed Copper Ore, meta sensitive + crushedGoldOre; // Crushed Gold Ore, meta sensitive + crushedTinOre; // Crushed Tin Ore, meta sensitive + crushedUraniumOre; // Crushed Uranium Ore, meta sensitive + crushedSilverOre; // Crushed Silver Ore, meta sensitive + crushedLeadOre; // Crushed Lead Ore, meta sensitive + + + //Purify Crushed Ore + purifiedCrushedIronOre; // Purify Crushed Iron Ore, meta sensitive + purifiedCrushedCopperOre; // Purify Crushed Copper Ore, meta sensitive + purifiedCrushedGoldOre; // Purify Crushed Gold Ore, meta sensitive + purifiedCrushedTinOre; // Purify Crushed Tin Ore, meta sensitive + purifiedCrushedUraniumOre; // Purify Crushed Uranium Ore, meta sensitive + purifiedCrushedSilverOre; // Purify Crushed Silver Ore, meta sensitive + purifiedCrushedLeadOre; // Purify Crushed Lead Ore, meta sensitive + + // dusts + stoneDust; + bronzeDust; // Bronze Dust item, meta sensitive, ore dictionary: dustBronze + clayDust; // Clay Dust item, meta sensitive, ore dictionary: dustClay + coalDust; // Coal Dust item, meta sensitive, ore dictionary: dustCoal + copperDust; // Copper Dust item, meta sensitive, ore dictionary: dustCopper + goldDust; // Gold Dust item, meta sensitive, ore dictionary: dustGold + ironDust; // Iron Dust item, meta sensitive, ore dictionary: dustIron + silverDust; // Silver Dust item, meta sensitive, ore dictionary: dustSilver + tinDust; // Tin Dust item, meta sensitive, ore dictionary: dustTin + hydratedCoalDust; // Hydrated Coal Dust item, meta sensitive + leadDust; // Lead Dust item, meta sensitive, ore dictionary: dustLead + obsidianDust; // Obsidian Dust item, meta sensitive, ore dictionary: dustObsidian + lapiDust; // Lapi Dust item, meta sensitive, ore dictionary: dustLapi + sulfurDust; // Sulfur Dust item, meta sensitive, ore dictionary: dustSulfur + lithiumDust; // Lithium dust, meta sensitive, ore dictionary: dustLithium + + // small dusts + + smallIronDust; // Small Iron Dust item, meta sensitive + smallCopperDust; // Small Copper Dust item, meta sensitive + smallGoldDust; // Small Gold Dust item, meta sensitive + smallTinDust; // Small Tin Dust item, meta sensitive + smallSilverDust; // Small Silver Dust item, meta sensitive + smallLeadDust; // Small Lead Dust item, meta sensitive + smallSulfurDust; // Small Sulfur Dust item, meta sensitive + smallLithiumDust; // Small Lithium Dust item, meta sensitive + + + // ingots + @Deprecated + refinedIronIngot; // Refined Iron Ingot item, currently not meta sensitive, ore dictionary: ingotRefinedIron + copperIngot; // Copper Ingot item, currently not meta sensitive, ore dictionary: ingotCopper + tinIngot; // Tin Ingot item, currently not meta sensitive, ore dictionary: ingotTin + bronzeIngot; // Bronze Ingot item, currently not meta sensitive, ore dictionary: ingotBronze + mixedMetalIngot; // Mixed Metal Ingot item, currently not meta sensitive + leadIngot; // Lead Ingot item, currently not meta sensitive + + + // tools/weapons (without electric tools) + treetap; // Treetap item, meta = damage value + wrench; // Wrench item, meta = damage value + cutter; // Insulation Cutter item, meta = damage value + constructionFoamSprayer; // Construction Foam Sprayer item, meta = charges (as of v1.45) + + bronzePickaxe; // Bronze Pickaxe item, meta = damage value + bronzeAxe; // Bronze Axe item, meta = damage value + bronzeSword; // Bronze Sword item, meta = damage value + bronzeShovel; // Bronze Shovel item, meta = damage value + bronzeHoe; // Bronze Hoe item, meta = damage value + + ForgeHammer; // Refine Iron Hammer item, meta = damage value + + // el. tools/devices/weapons + miningDrill; // Mining Drill item, meta = damage value for charge level + diamondDrill; // Diamond Tipped Mining Drill item, meta = damage value for charge level + iridiumDrill; // Iridium Tipped Mining Drill item, meta = damage value for charge level + chainsaw; // Chainsaw item, meta = damage value for charge level + electricWrench; // Electric Wrench item, meta = damage value for charge level + electricTreetap; // Electric Treetap item, meta = damage value for charge level + miningLaser; // Mining Laser item, meta = damage value for charge level + + ecMeter; // EC-Mater item, meta = itemdata db index (as of v1.45) + odScanner; // Ore Density Scanner item, meta = damage value for charge level + ovScanner; // Ore Value Scanner item, meta = damage value for charge level + obscurator; // Obscurator item, meta = damage value for charge level + + frequencyTransmitter; // Frequency Transmitter item, meta = itemdata db index (as of v1.45) + + nanoSaber; // Idle Nano Saber item, meta = damage value for charge level + enabledNanoSaber; // Enabled Nano Saber item, meta = damage value for charge level + + toolbox; // Open/Empty toolbox, meta = Open (0) / Closed (1) + + // armor/wearable + hazmatHelmet; // Hazmat Helmet item, meta = damage value + hazmatChestplate; // Hazmat Chestplate item, meta = damage value + hazmatLeggings; // Hazmat Leggings item, meta = damage value + hazmatBoots; // Hazmat Boots item, meta = damage value + + bronzeHelmet; // Bronze Helmet Armor item, meta = damage value + bronzeChestplate; // Bronze Chestplate Armor item, meta = damage value + bronzeLeggings; // Bronze Leggings Armor item, meta = damage value + bronzeBoots; // Bronze Boots Armor item, meta = damage value + + compositeArmor; // Composite Armor item, meta = damage value for charge level + + nanoHelmet; // Nano Helmet Armor item, meta = damage value for charge level + nanoBodyarmor; // Nano Bodyarmor item, meta = damage value for charge level + nanoLeggings; // Nano Leggings Armor item, meta = damage value for charge level + nanoBoots; // Nano Boots Armor item, meta = damage value for charge level + + quantumHelmet; // Quantum Helmet Armor item, meta = damage value for charge level + quantumBodyarmor; // Quantum Bodyarmor item, meta = damage value for charge level + quantumLeggings; // Quantum Leggings Armor item, meta = damage value for charge level + quantumBoots; // Quantum Boots Armor item, meta = damage value for charge level + + jetpack; // Jetpack item, meta = damage value for fuel level + electricJetpack; // Electric Jetpack item, meta = damage value for charge level + + batPack; // BatPack item, meta = damage value for charge level + advbatPack; // Adv.BatPack item, meta = damage value for charge level + lapPack; // LapPack item, meta = damage value for charge level + energyPack; // EnergyPack item, meta = damage value for charge level + + cfPack; // CF Pack item, meta = charges (as of v1.45) + solarHelmet; // Solar Helmet, currently not meta sensitive + staticBoots; // Static Boots, currently not meta sensitive + nightvisionGoggles; // Nightvision Goggles, meta = damage value for charge level + + // batteries + reBattery; // Empty RE Battery item, currently not meta sensitive + chargedReBattery; // RE Battery item, meta = damage value for charge level + advBattery; // Adv Batteryitem, meta = damage value for charge level + energyCrystal; // Energy Crystal item, meta = damage value for charge level + lapotronCrystal; // Lapotron Crystal item, meta = damage value for charge level + suBattery; // SU Battery item, meta = damage value for charge level + + // cables + copperCableItem; // Copper Cable item, meta sensitive + insulatedCopperCableItem; // Insulated Copper Cable item, meta sensitive + + goldCableItem; // Gold Cable item, meta sensitive + insulatedGoldCableItem; // Insulated Gold Cable item, meta sensitive + + @Deprecated + doubleInsulatedGoldCableItem; // Double Insulated Gold Cable item, meta sensitive + + ironCableItem; // Iron Cable item, meta sensitive + insulatedIronCableItem; // Insulated Iron Cable item, meta sensitive + + @Deprecated + doubleInsulatedIronCableItem; // Double Insulated Iron Cable item, meta sensitive + @Deprecated + trippleInsulatedIronCableItem; // Tripple Insulated Iron Cable item, meta sensitive + insulatedTinCableItem; + glassFiberCableItem; // Glass Fiber Cable item, meta sensitive + tinCableItem; // Tin Cable item, meta sensitive + + + detectorCableItem; // Detector Cable item, meta sensitive + splitterCableItem; // Splitter Cable item, meta sensitive + + // cells/containers (without reactor components) + + cell; // Empty Cell item, meta sensitive + lavaCell; // Lava Cell item, meta sensitive + waterCell; // Water Cell item, meta sensitive + UuMatterCell; // UUMatter Cell item, meta sensitive + CFCell; // constructionFoam Cell item, meta sensitive + + + fuelRod; // Empy Fuel Rod item, currently not meta sensitive + hydratedCoalCell; // Hydrated Coal Cell item, currently not meta sensitive + bioCell; // Bio Cell item, currently not meta sensitive + coalfuelCell; // Coalfuel Cell item, currently not meta sensitive + biofuelCell; // Biofuel Cell item, currently not meta sensitive + electrolyzedWaterCell; // Electrolyzed Water Cell item, currently not meta sensitive + airCell; // Compressed Air item, currently not meta sensitive + + fuelCan; // Empty Fuel Can item, currently not meta sensitive + filledFuelCan; // Fuel Can item, meta = fuel value (as of v1.45) + + tinCan; // Empty Tin Can item, currently not meta sensitive + filledTinCan; // Filled Tin Can item, currently not meta sensitive + + // reactor components + reactorUraniumSimple; // Uranium Cell items, meta = consumed uranium ticks + reactorUraniumDual; + reactorUraniumQuad; + + reactorCoolantSimple; + reactorCoolantTriple ; // Coolant Cell item, NBT for heat-storage, meta is 0-10000 for display + reactorCoolantSix; + + reactorPlating; // Integrated Reactor Plating item, currently not meta sensitive + reactorPlatingHeat; + reactorPlatingExplosive; + + reactorHeatSwitch; // Integrated Heat Disperser item, NBT for heat-storage, meta is 0-10000 for display + reactorHeatSwitchCore; + reactorHeatSwitchSpread; + reactorHeatSwitchDiamond; + + reactorVent; // Heat Venting component, NBT for heat-storage, meta is 0-10000 for display + reactorVentCore; + reactorVentGold; + reactorVentSpread;// Special: Does not store heat + reactorVentDiamond; + + reactorReflector; // Increase efficiency without additional ticks, NBT for heat-storage, meta is 0-10000 for display + reactorReflectorThick; // Increase efficiency without additional ticks, NBT for heat-storage, meta is 0-10000 for display + reactorCondensator; // Consumes redstone to absorb heat, NBT for storage, meta is 0-10000 for display + reactorCondensatorLap; // Consumes redstone/lapis to absorb heat, mNBT for storage, meta is 0-10000 for display + + // terraformer blueprints + terraformerBlueprint; // Empty Terraformer Blueprint item, currently not meta sensitive + cultivationTerraformerBlueprint; // Cultivation Terraformer Blueprint item, currently not meta sensitive + irrigationTerraformerBlueprint; // Irrigation Terraformer Blueprint item, currently not meta sensitive + chillingTerraformerBlueprint; // Chilling Terraformer Blueprint item, currently not meta sensitive + desertificationTerraformerBlueprint; // Desertification Terraformer Blueprint item, currently not meta sensitive + flatificatorTerraformerBlueprint; // Flatificator Terraformer Blueprint item, currently not meta sensitive + mushroomTerraformerBlueprint; // Mushroom Terraformer Blueprint item, currently not meta sensitive + + // diamond chain + coalBall; // Coal Ball item, currently not meta sensitive + compressedCoalBall; // Compressed Coal Ball item, currently not meta sensitive + coalChunk; // Coal Chunk item, currently not meta sensitive + industrialDiamond; // Industrial Diamond item, currently not meta sensitive, DEPRECATED + + // recycler chain + scrap; // Scrap item, currently not meta sensitive + scrapBox; // Scrap Box item, currently not meta sensitive + + // fuel production chain + hydratedCoalClump; // Hydrated Coal Clump item, currently not meta sensitive + plantBall; // Plant Ball item, currently not meta sensitive + compressedPlantBall; // Compressed Plant Ball item, currently not meta sensitive + + // painting + painter; // Painter item, currently not meta sensitive + + blackPainter; // Black Painter item, meta = damage value + redPainter; // Red Painter item, meta = damage value + greenPainter; // Green Painter item, meta = damage value + brownPainter; // Brown Painter item, meta = damage value + bluePainter; // Blue Painter item, meta = damage value + purplePainter; // Purple Painter item, meta = damage value + cyanPainter; // Cyan Painter item, meta = damage value + lightGreyPainter; // Light Grey Painter item, meta = damage value + darkGreyPainter; // Dark Grey Painter item, meta = damage value + pinkPainter; // Pink Painter item, meta = damage value + limePainter; // Lime Painter item, meta = damage value + yellowPainter; // Yellow Painter item, meta = damage value + cloudPainter; // Cloud Painter item, meta = damage value + magentaPainter; // Magenta Painter item, meta = damage value + orangePainter; // Orange Painter item, meta = damage value + whitePainter; // White Painter item, meta = damage value + + // explosives + related + dynamite; // Throwable Dynamite item, currently not meta sensitive + stickyDynamite; // Throwable Sticky Dynamite item, currently not meta sensitive + + remote; // Dynamite Remote item, currently not meta sensitive + + // misc intermediate recipe ingredients + electronicCircuit; // Electronic Circuit item, currently not meta sensitive + advancedCircuit; // Advanced Circuit item, currently not meta sensitive + + advancedAlloy; // Advanced Alloy item, currently not meta sensitive + + carbonFiber; // Raw Carbon Fiber item, currently not meta sensitive + carbonMesh; // Raw Carbon Mesh item, currently not meta sensitive + carbonPlate; // Carbon Plate item, currently not meta sensitive + + matter; // UUA item, currently not meta sensitive + iridiumOre; // Iridium Ore item, currently not meta sensitive + iridiumPlate; // Iridium Plate item, currently not meta sensitive + + + // Metal Plates + + platecopper; // Metal plate item, meta sensitive + platetin; // Metal plate item, meta sensitive + platebronze; // Metal plate item, meta sensitive + plategold; // Metal plate item, meta sensitive + plateiron; // Metal plate item, meta sensitive + platelead; // Metal plate item, meta sensitive + platelapi; // Metal plate item, meta sensitive + plateobsidian; // Metal plate item, meta sensitive + plateadviron; // Metal plate item, meta sensitive + + // Metal Dense Plates + denseplatecopper; // Metal dense plate item, meta sensitive + denseplatetin; // Metal dense plate item, meta sensitive + denseplatebronze; // Metal dense plate item, meta sensitive + denseplategold; // Metal dense plate item, meta sensitive + denseplateiron; // Metal dense plate item, meta sensitive + @Deprecated + denseplateadviron; // Metal dense plate item, meta sensitive + denseplatelead; // Metal dense plate item, meta sensitive + denseplatelapi; // Metal dense plate item, meta sensitive + denseplateobsidian; // Metal dense plate item, meta sensitive + + + + // upgrade modules + overclockerUpgrade; // overclocker upgrade item, meta sensitive + transformerUpgrade; // transformer upgrade item, meta sensitive + energyStorageUpgrade; // energy storage upgrade item, meta sensitive + ejectorUpgrade; // ejector upgrade item, meta sensitive + + // misc + coin; // Coin item, currently not meta sensitive + reinforcedDoor; // Reinforced Door item, currently not meta sensitive + constructionFoamPowder; // Construction Foam Powder item, currently not meta sensitive + grinPowder; // Poisonous ingrident, currently not meta sensitive + debug; // Debug item, currently not meta sensitive + boatCarbon; // Carbon Fiber Canoe item, meta sensitive + boatRubber; // Rubber Dinghy item, meta sensitive + boatRubberBroken; // Damaged Rubber Dinghy item, meta sensitive + boatElectric; // Electric Boat item, meta sensitive + + //Agriculture + cropSeed; // Crop seeds, stuff stored in NBT, don't use for crafting recipes! + cropnalyzer; // Cropnalyzer handheld device + fertilizer; // Basic IC2Item, used to provide nutrients toCropBlocks + hydratingCell; // Cell used to hydrate Crops, meta = Content, 0= Full, 9999 = Near empty + electricHoe; // Electric Hoe, Metadata indicates charge level + terraWart; // Mystic opposite of NEtherWart, cures StatusEffects, simply consumeable + weedEx; // Spraying can of WEED-EX, meta indicates usages left + + //Boozeception + mugEmpty; // Simple stone mug + coffeeBeans; // Harvested CoffeeBeans + coffeePowder; // Processed Coffee Beans, used to craft drinkable Coffee + mugCoffee; // Mug of Coffee, Meta indicates status 0 = cold, 1 = Normal, 2 = Sugar'd + hops; // Hops, harvested freshly from crop + barrel; // Carried Barrel, metadata encrypts the information about the liquid inside + blockBarrel; // Unobtainable "placed barrel", TileEntity controlling the Fermentation process + mugBooze; // Mug filled with booze, metadata encrypts the information about the liquid inside */ diff --git a/common/ic2/api/reactor/IReactor.java b/common/ic2/api/reactor/IReactor.java index 8065e0c55..f1d21a750 100644 --- a/common/ic2/api/reactor/IReactor.java +++ b/common/ic2/api/reactor/IReactor.java @@ -103,8 +103,8 @@ public interface IReactor { /** * Get the item at the specified grid coordinates. * - * @param x X position of the item - * @param y Y position of the item + * @param x X position of the item, out of bounds returns null + * @param y Y position of the item, out of bounds returns null * @return The item or null if there is no item */ public ItemStack getItemAt(int x, int y); @@ -112,8 +112,8 @@ public interface IReactor { /** * Set the item at the specified grid coordinates. * - * @param x X position of the item - * @param y Y position of the item + * @param x X position of the item, out of bounds is a no-op + * @param y Y position of the item, out of bounds is a no-op * @param item The item to set. */ public void setItemAt(int x, int y, ItemStack item); diff --git a/common/ic2/api/tile/IWrenchable.java b/common/ic2/api/tile/IWrenchable.java index f01441698..944f4a156 100644 --- a/common/ic2/api/tile/IWrenchable.java +++ b/common/ic2/api/tile/IWrenchable.java @@ -51,8 +51,10 @@ public interface IWrenchable { /** * Determine the item the block will drop when the wrenching is successful. * + * The ItemStack will be copied before creating the EntityItem. + * * @param entityPlayer player using the wrench, may be null - * @return Item to drop, may be null + * @return ItemStack to drop, may be null */ ItemStack getWrenchDrop(EntityPlayer entityPlayer); }