Update BC & IC2 APIs
This commit is contained in:
parent
4d64afb7d9
commit
1573474654
|
@ -11,8 +11,7 @@ package buildcraft.api.core;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
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_BLOCK = 122;
|
||||||
public static final int LAST_ORIGINAL_ITEM = 126;
|
public static final int LAST_ORIGINAL_ITEM = 126;
|
||||||
|
|
|
@ -10,11 +10,9 @@
|
||||||
package buildcraft.api.core;
|
package buildcraft.api.core;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To be implemented by TileEntities able to provide a square area on the world, typically
|
* To be implemented by TileEntities able to provide a square area on the world, typically BuildCraft markers.
|
||||||
* BuildCraft markers.
|
|
||||||
*/
|
*/
|
||||||
public interface IAreaProvider
|
public interface IAreaProvider {
|
||||||
{
|
|
||||||
|
|
||||||
public int xMin();
|
public int xMin();
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,7 @@ package buildcraft.api.core;
|
||||||
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public interface IBox
|
public interface IBox {
|
||||||
{
|
|
||||||
|
|
||||||
public void expand(int amount);
|
public void expand(int amount);
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
package buildcraft.api.core;
|
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.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
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
|
* @param iconIndex
|
||||||
* @return
|
* @return
|
||||||
|
@ -16,9 +15,7 @@ public interface IIconProvider
|
||||||
public Icon getIcon(int iconIndex);
|
public Icon getIcon(int iconIndex);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A call for the provider to register its Icons. This may be called multiple times but should
|
* A call for the provider to register its Icons. This may be called multiple times but should only be executed once per provider
|
||||||
* only be executed once per provider
|
|
||||||
*
|
|
||||||
* @param iconRegister
|
* @param iconRegister
|
||||||
*/
|
*/
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
|
|
||||||
package buildcraft.api.core;
|
package buildcraft.api.core;
|
||||||
|
|
||||||
public enum LaserKind
|
public enum LaserKind {
|
||||||
{
|
|
||||||
Red, Blue, Stripes
|
Red, Blue, Stripes
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,38 +13,33 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
|
|
||||||
public class Position
|
public class Position {
|
||||||
{
|
|
||||||
|
|
||||||
public double x, y, z;
|
public double x, y, z;
|
||||||
public ForgeDirection orientation;
|
public ForgeDirection orientation;
|
||||||
|
|
||||||
public Position(double ci, double cj, double ck)
|
public Position(double ci, double cj, double ck) {
|
||||||
{
|
|
||||||
x = ci;
|
x = ci;
|
||||||
y = cj;
|
y = cj;
|
||||||
z = ck;
|
z = ck;
|
||||||
orientation = ForgeDirection.UNKNOWN;
|
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;
|
x = ci;
|
||||||
y = cj;
|
y = cj;
|
||||||
z = ck;
|
z = ck;
|
||||||
orientation = corientation;
|
orientation = corientation;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Position(Position p)
|
public Position(Position p) {
|
||||||
{
|
|
||||||
x = p.x;
|
x = p.x;
|
||||||
y = p.y;
|
y = p.y;
|
||||||
z = p.z;
|
z = p.z;
|
||||||
orientation = p.orientation;
|
orientation = p.orientation;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Position(NBTTagCompound nbttagcompound)
|
public Position(NBTTagCompound nbttagcompound) {
|
||||||
{
|
|
||||||
x = nbttagcompound.getDouble("i");
|
x = nbttagcompound.getDouble("i");
|
||||||
y = nbttagcompound.getDouble("j");
|
y = nbttagcompound.getDouble("j");
|
||||||
z = nbttagcompound.getDouble("k");
|
z = nbttagcompound.getDouble("k");
|
||||||
|
@ -52,109 +47,95 @@ public class Position
|
||||||
orientation = ForgeDirection.UNKNOWN;
|
orientation = ForgeDirection.UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Position(TileEntity tile)
|
public Position(TileEntity tile) {
|
||||||
{
|
|
||||||
x = tile.xCoord;
|
x = tile.xCoord;
|
||||||
y = tile.yCoord;
|
y = tile.yCoord;
|
||||||
z = tile.zCoord;
|
z = tile.zCoord;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void moveRight(double step)
|
public void moveRight(double step) {
|
||||||
{
|
switch (orientation) {
|
||||||
switch (orientation)
|
case SOUTH:
|
||||||
{
|
x = x - step;
|
||||||
case SOUTH:
|
break;
|
||||||
x = x - step;
|
case NORTH:
|
||||||
break;
|
x = x + step;
|
||||||
case NORTH:
|
break;
|
||||||
x = x + step;
|
case EAST:
|
||||||
break;
|
z = z + step;
|
||||||
case EAST:
|
break;
|
||||||
z = z + step;
|
case WEST:
|
||||||
break;
|
z = z - step;
|
||||||
case WEST:
|
break;
|
||||||
z = z - step;
|
default:
|
||||||
break;
|
|
||||||
default:
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void moveLeft(double step)
|
public void moveLeft(double step) {
|
||||||
{
|
|
||||||
moveRight(-step);
|
moveRight(-step);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void moveForwards(double step)
|
public void moveForwards(double step) {
|
||||||
{
|
switch (orientation) {
|
||||||
switch (orientation)
|
case UP:
|
||||||
{
|
y = y + step;
|
||||||
case UP:
|
break;
|
||||||
y = y + step;
|
case DOWN:
|
||||||
break;
|
y = y - step;
|
||||||
case DOWN:
|
break;
|
||||||
y = y - step;
|
case SOUTH:
|
||||||
break;
|
z = z + step;
|
||||||
case SOUTH:
|
break;
|
||||||
z = z + step;
|
case NORTH:
|
||||||
break;
|
z = z - step;
|
||||||
case NORTH:
|
break;
|
||||||
z = z - step;
|
case EAST:
|
||||||
break;
|
x = x + step;
|
||||||
case EAST:
|
break;
|
||||||
x = x + step;
|
case WEST:
|
||||||
break;
|
x = x - step;
|
||||||
case WEST:
|
break;
|
||||||
x = x - step;
|
default:
|
||||||
break;
|
|
||||||
default:
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void moveBackwards(double step)
|
public void moveBackwards(double step) {
|
||||||
{
|
|
||||||
moveForwards(-step);
|
moveForwards(-step);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void moveUp(double step)
|
public void moveUp(double step) {
|
||||||
{
|
switch (orientation) {
|
||||||
switch (orientation)
|
case SOUTH:
|
||||||
{
|
case NORTH:
|
||||||
case SOUTH:
|
case EAST:
|
||||||
case NORTH:
|
case WEST:
|
||||||
case EAST:
|
y = y + step;
|
||||||
case WEST:
|
break;
|
||||||
y = y + step;
|
default:
|
||||||
break;
|
|
||||||
default:
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void moveDown(double step)
|
public void moveDown(double step) {
|
||||||
{
|
|
||||||
moveUp(-step);
|
moveUp(-step);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void writeToNBT(NBTTagCompound nbttagcompound)
|
public void writeToNBT(NBTTagCompound nbttagcompound) {
|
||||||
{
|
|
||||||
nbttagcompound.setDouble("i", x);
|
nbttagcompound.setDouble("i", x);
|
||||||
nbttagcompound.setDouble("j", y);
|
nbttagcompound.setDouble("j", y);
|
||||||
nbttagcompound.setDouble("k", z);
|
nbttagcompound.setDouble("k", z);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString() {
|
||||||
{
|
|
||||||
return "{" + x + ", " + y + ", " + z + "}";
|
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);
|
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);
|
return new Position(p.x < x ? x : p.x, p.y < y ? y : p.y, p.z < z ? z : p.z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,45 +9,38 @@ package buildcraft.api.core;
|
||||||
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class SafeTimeTracker
|
public class SafeTimeTracker {
|
||||||
{
|
|
||||||
|
|
||||||
private long lastMark = Long.MIN_VALUE;
|
private long lastMark = Long.MIN_VALUE;
|
||||||
private long duration = -1;
|
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)
|
if (world == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
long currentTime = world.getTotalWorldTime();
|
long currentTime = world.getTotalWorldTime();
|
||||||
|
|
||||||
if (currentTime < lastMark)
|
if (currentTime < lastMark) {
|
||||||
{
|
|
||||||
lastMark = currentTime;
|
lastMark = currentTime;
|
||||||
return false;
|
return false;
|
||||||
}
|
} else if (lastMark + delay <= currentTime) {
|
||||||
else if (lastMark + delay <= currentTime)
|
|
||||||
{
|
|
||||||
duration = currentTime - lastMark;
|
duration = currentTime - lastMark;
|
||||||
lastMark = currentTime;
|
lastMark = currentTime;
|
||||||
return true;
|
return true;
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public long durationOfLastDelay()
|
public long durationOfLastDelay() {
|
||||||
{
|
|
||||||
return duration > 0 ? duration : 0;
|
return duration > 0 ? duration : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void markTime(World world)
|
public void markTime(World world) {
|
||||||
{
|
|
||||||
lastMark = world.getTotalWorldTime();
|
lastMark = world.getTotalWorldTime();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,22 +11,19 @@ package buildcraft.api.core;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author CovertJaguar <http://www.railcraft.info/>
|
* @author CovertJaguar <http://www.railcraft.info/>
|
||||||
*/
|
*/
|
||||||
public class StackWrapper
|
public class StackWrapper {
|
||||||
{
|
|
||||||
|
|
||||||
public final ItemStack stack;
|
public final ItemStack stack;
|
||||||
|
|
||||||
public StackWrapper(ItemStack stack)
|
public StackWrapper(ItemStack stack) {
|
||||||
{
|
|
||||||
this.stack = stack;
|
this.stack = stack;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode()
|
public int hashCode() {
|
||||||
{
|
|
||||||
int hash = 5;
|
int hash = 5;
|
||||||
hash = 67 * hash + stack.itemID;
|
hash = 67 * hash + stack.itemID;
|
||||||
hash = 67 * hash + stack.getItemDamage();
|
hash = 67 * hash + stack.getItemDamage();
|
||||||
|
@ -36,8 +33,7 @@ public class StackWrapper
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object obj)
|
public boolean equals(Object obj) {
|
||||||
{
|
|
||||||
if (obj == null)
|
if (obj == null)
|
||||||
return false;
|
return false;
|
||||||
if (getClass() != obj.getClass())
|
if (getClass() != obj.getClass())
|
||||||
|
|
|
@ -3,21 +3,27 @@ package buildcraft.api.filler;
|
||||||
import buildcraft.api.core.IBox;
|
import buildcraft.api.core.IBox;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.Icon;
|
import net.minecraft.util.Icon;
|
||||||
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
|
|
||||||
public interface IFillerPattern {
|
public interface IFillerPattern {
|
||||||
|
|
||||||
public int getId();
|
public String getUniqueTag();
|
||||||
|
|
||||||
public void setId(int id);
|
/**
|
||||||
|
* Creates the object that does the pattern iteration. This object may be
|
||||||
public boolean iteratePattern(TileEntity tile, IBox box, ItemStack stackToPlace);
|
* 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)
|
@SideOnly(Side.CLIENT)
|
||||||
public Icon getTexture();
|
public Icon getIcon();
|
||||||
|
|
||||||
public String getName();
|
|
||||||
|
|
||||||
|
public String getDisplayName();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,17 @@
|
||||||
package buildcraft.api.filler;
|
package buildcraft.api.filler;
|
||||||
|
|
||||||
import net.minecraft.inventory.IInventory;
|
import buildcraft.api.gates.IAction;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
public interface IFillerRegistry {
|
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 getNextPattern(IFillerPattern currentPattern);
|
||||||
|
|
||||||
public IFillerPattern getPattern(int n);
|
|
||||||
|
|
||||||
|
public IFillerPattern getPreviousPattern(IFillerPattern currentPattern);
|
||||||
|
|
||||||
|
public Set<? extends IAction> getActions();
|
||||||
}
|
}
|
||||||
|
|
20
common/buildcraft/api/filler/IPatternIterator.java
Normal file
20
common/buildcraft/api/filler/IPatternIterator.java
Normal file
|
@ -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 <http://www.railcraft.info/>
|
||||||
|
*/
|
||||||
|
public interface IPatternIterator {
|
||||||
|
|
||||||
|
public boolean iteratePattern(ItemStack stackToPlace);
|
||||||
|
}
|
|
@ -29,7 +29,7 @@ public final class IronEngineCoolant {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Coolant getCoolant(FluidStack fluidStack) {
|
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() {
|
private IronEngineCoolant() {
|
||||||
|
|
|
@ -47,8 +47,9 @@ public class TriggerParameter implements ITriggerParameter {
|
||||||
@Override
|
@Override
|
||||||
public void writeToNBT(NBTTagCompound compound) {
|
public void writeToNBT(NBTTagCompound compound) {
|
||||||
if (stack != null) {
|
if (stack != null) {
|
||||||
compound.setInteger("itemID", stack.itemID);
|
NBTTagCompound tagCompound = new NBTTagCompound();
|
||||||
compound.setInteger("itemDMG", stack.getItemDamage());
|
stack.writeToNBT(tagCompound);
|
||||||
|
compound.setCompoundTag("stack", tagCompound);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,11 +60,14 @@ public class TriggerParameter implements ITriggerParameter {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void readFromNBT(NBTTagCompound compound) {
|
public void readFromNBT(NBTTagCompound compound) {
|
||||||
|
// Legacy code to prevent existing gates from losing their contents
|
||||||
int itemID = compound.getInteger("itemID");
|
int itemID = compound.getInteger("itemID");
|
||||||
|
|
||||||
if (itemID != 0) {
|
if (itemID != 0) {
|
||||||
stack = new ItemStack(itemID, 1, compound.getInteger("itemDMG"));
|
stack = new ItemStack(itemID, 1, compound.getInteger("itemDMG"));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stack = ItemStack.loadItemStackFromNBT(compound.getCompoundTag("stack"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
46
common/buildcraft/api/power/ILaserTarget.java
Normal file
46
common/buildcraft/api/power/ILaserTarget.java
Normal file
|
@ -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();
|
||||||
|
}
|
|
@ -12,14 +12,13 @@ import net.minecraftforge.common.ForgeDirection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Essentially only used for Wooden Power Pipe connection rules.
|
* 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
|
* This Tile Entity interface allows you to indicate that a block can emit power
|
||||||
* side.
|
* from a specific side.
|
||||||
*
|
*
|
||||||
* @author CovertJaguar <http://www.railcraft.info/>
|
* @author CovertJaguar <http://www.railcraft.info/>
|
||||||
*/
|
*/
|
||||||
public interface IPowerEmitter
|
public interface IPowerEmitter {
|
||||||
{
|
|
||||||
|
|
||||||
public boolean canEmitPowerFrom(ForgeDirection side);
|
public boolean canEmitPowerFrom(ForgeDirection side);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,35 +9,35 @@ package buildcraft.api.power;
|
||||||
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
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 <http://www.railcraft.info/>
|
* @author CovertJaguar <http://www.railcraft.info/>
|
||||||
*/
|
*/
|
||||||
public interface IPowerReceptor
|
public interface IPowerReceptor {
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the PowerReceiver for this side of the block. You can return the same PowerReceiver for
|
* Get the PowerReceiver for this side of the block. You can return the same
|
||||||
* all sides or one for each side.
|
* 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
|
* You should NOT return null to this method unless you mean to NEVER
|
||||||
* side. Returning null, after previous returning a PowerReceiver, will most likely cause pipe
|
* receive power from that side. Returning null, after previous returning a
|
||||||
* connections to derp out and engines to eventually explode.
|
* PowerReceiver, will most likely cause pipe connections to derp out and
|
||||||
*
|
* engines to eventually explode.
|
||||||
|
*
|
||||||
* @param side
|
* @param side
|
||||||
* @return
|
* @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
|
* Call back from the PowerHandler that is called when the stored power
|
||||||
* power.
|
* exceeds the activation power.
|
||||||
*
|
*
|
||||||
* It can be triggered by update() calls or power modification calls.
|
* It can be triggered by update() calls or power modification calls.
|
||||||
*
|
*
|
||||||
* @param workProvider
|
* @param workProvider
|
||||||
*/
|
*/
|
||||||
public void doWork(PowerHandler workProvider);
|
public void doWork(PowerHandler workProvider);
|
||||||
|
|
|
@ -7,22 +7,36 @@
|
||||||
*/
|
*/
|
||||||
package buildcraft.api.power;
|
package buildcraft.api.power;
|
||||||
|
|
||||||
|
import buildcraft.api.core.SafeTimeTracker;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
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 <http://www.railcraft.info/>
|
||||||
|
*/
|
||||||
|
public final class PowerHandler {
|
||||||
|
|
||||||
public static enum Type
|
public static enum Type {
|
||||||
{
|
|
||||||
|
|
||||||
ENGINE, GATE, MACHINE, PIPE, STORAGE;
|
ENGINE, GATE, MACHINE, PIPE, STORAGE;
|
||||||
|
|
||||||
public boolean canReceiveFromPipes()
|
public boolean canReceiveFromPipes() {
|
||||||
{
|
switch (this) {
|
||||||
switch (this)
|
|
||||||
{
|
|
||||||
case MACHINE:
|
case MACHINE:
|
||||||
case STORAGE:
|
case STORAGE:
|
||||||
return true;
|
return true;
|
||||||
|
@ -31,10 +45,8 @@ public final class PowerHandler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean eatsEngineExcess()
|
public boolean eatsEngineExcess() {
|
||||||
{
|
switch (this) {
|
||||||
switch (this)
|
|
||||||
{
|
|
||||||
case MACHINE:
|
case MACHINE:
|
||||||
case STORAGE:
|
case STORAGE:
|
||||||
return true;
|
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 DEFAULT_POWERLOSS = 1F;
|
||||||
public static final float MIN_POWERLOSS = 0.01F;
|
public static final float MIN_POWERLOSS = 0.01F;
|
||||||
private final float powerLoss;
|
private final float powerLoss;
|
||||||
|
|
||||||
public PerditionCalculator()
|
public PerditionCalculator() {
|
||||||
{
|
|
||||||
powerLoss = DEFAULT_POWERLOSS;
|
powerLoss = DEFAULT_POWERLOSS;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PerditionCalculator(float powerLoss)
|
/**
|
||||||
{
|
* Simple constructor for simple Perdition per tick.
|
||||||
if (powerLoss < MIN_POWERLOSS)
|
*
|
||||||
{
|
* @param powerLoss power loss per tick
|
||||||
|
*/
|
||||||
|
public PerditionCalculator(float powerLoss) {
|
||||||
|
if (powerLoss < MIN_POWERLOSS) {
|
||||||
powerLoss = MIN_POWERLOSS;
|
powerLoss = MIN_POWERLOSS;
|
||||||
}
|
}
|
||||||
this.powerLoss = powerLoss;
|
this.powerLoss = powerLoss;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Apply the perdition algorithm to the current stored energy. This function can only be
|
* Apply the perdition algorithm to the current stored energy. This
|
||||||
* called once per tick, but it might not be called every tick. It is triggered by any
|
* function can only be called once per tick, but it might not be called
|
||||||
* manipulation of the stored energy.
|
* every tick. It is triggered by any manipulation of the stored energy.
|
||||||
*
|
*
|
||||||
* @param powerHandler the PowerHandler requesting the perdition update
|
* @param powerHandler the PowerHandler requesting the perdition update
|
||||||
* @param current the current stored energy
|
* @param current the current stored energy
|
||||||
* @param ticksPassed ticks since the last time this function was called
|
* @param ticksPassed ticks since the last time this function was called
|
||||||
* @return
|
* @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;
|
current -= powerLoss * ticksPassed;
|
||||||
if (current < 0)
|
if (current < 0) {
|
||||||
{
|
|
||||||
current = 0;
|
current = 0;
|
||||||
}
|
}
|
||||||
|
// powerHandler.totalLostPower += prev - current;
|
||||||
return 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();
|
public static final PerditionCalculator DEFAULT_PERDITION = new PerditionCalculator();
|
||||||
private float minEnergyReceived;
|
private float minEnergyReceived;
|
||||||
private float maxEnergyReceived;
|
private float maxEnergyReceived;
|
||||||
|
@ -100,65 +128,63 @@ public final class PowerHandler
|
||||||
private PerditionCalculator perdition;
|
private PerditionCalculator perdition;
|
||||||
private final PowerReceiver receiver;
|
private final PowerReceiver receiver;
|
||||||
private final Type type;
|
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.receptor = receptor;
|
||||||
this.type = type;
|
this.type = type;
|
||||||
this.receiver = new PowerReceiver();
|
this.receiver = new PowerReceiver();
|
||||||
this.perdition = DEFAULT_PERDITION;
|
this.perdition = DEFAULT_PERDITION;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PowerReceiver getPowerReceiver()
|
public PowerReceiver getPowerReceiver() {
|
||||||
{
|
|
||||||
return receiver;
|
return receiver;
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getMinEnergyReceived()
|
public float getMinEnergyReceived() {
|
||||||
{
|
|
||||||
return minEnergyReceived;
|
return minEnergyReceived;
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getMaxEnergyReceived()
|
public float getMaxEnergyReceived() {
|
||||||
{
|
|
||||||
return maxEnergyReceived;
|
return maxEnergyReceived;
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getMaxEnergyStored()
|
public float getMaxEnergyStored() {
|
||||||
{
|
|
||||||
return maxEnergyStored;
|
return maxEnergyStored;
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getActivationEnergy()
|
public float getActivationEnergy() {
|
||||||
{
|
|
||||||
return activationEnergy;
|
return activationEnergy;
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getEnergyStored()
|
public float getEnergyStored() {
|
||||||
{
|
|
||||||
return energyStored;
|
return energyStored;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Setup your PowerHandler's settings.
|
* Setup your PowerHandler's settings.
|
||||||
*
|
*
|
||||||
* @param minEnergyReceived This is the minimum about of power that will be accepted by the
|
* @param minEnergyReceived This is the minimum about of power that will be
|
||||||
* PowerHandler. This should generally be greater than the activationEnergy if you plan to use
|
* accepted by the PowerHandler. This should generally be greater than the
|
||||||
* the doWork() callback. Anything greater than 1 will prevent Redstone Engines from powering
|
* activationEnergy if you plan to use the doWork() callback. Anything
|
||||||
* this Provider.
|
* greater than 1 will prevent Redstone Engines from powering this Provider.
|
||||||
* @param maxEnergyReceived The maximum amount of power accepted by the PowerHandler. This
|
* @param maxEnergyReceived The maximum amount of power accepted by the
|
||||||
* should generally be less than 500. Too low and larger engines will overheat while trying to
|
* PowerHandler. This should generally be less than 500. Too low and larger
|
||||||
* power the machine. Too high, and the engines will never warm up. Greater values also place
|
* engines will overheat while trying to power the machine. Too high, and
|
||||||
* greater strain on the power net.
|
* the engines will never warm up. Greater values also place greater strain
|
||||||
* @param activationEnergy If the stored energy is greater than this value, the doWork()
|
* on the power net.
|
||||||
* callback is called (once per tick).
|
* @param activationEnergy If the stored energy is greater than this value,
|
||||||
* @param maxStoredEnergy The maximum amount of power this PowerHandler can store. Values tend
|
* the doWork() callback is called (once per tick).
|
||||||
* to range between 100 and 5000. With 1000 and 1500 being common.
|
* @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)
|
public void configure(float minEnergyReceived, float maxEnergyReceived, float activationEnergy, float maxStoredEnergy) {
|
||||||
{
|
if (minEnergyReceived > maxEnergyReceived) {
|
||||||
if (minEnergyReceived > maxEnergyReceived)
|
|
||||||
{
|
|
||||||
maxEnergyReceived = minEnergyReceived;
|
maxEnergyReceived = minEnergyReceived;
|
||||||
}
|
}
|
||||||
this.minEnergyReceived = minEnergyReceived;
|
this.minEnergyReceived = minEnergyReceived;
|
||||||
|
@ -167,10 +193,18 @@ public final class PowerHandler
|
||||||
this.activationEnergy = activationEnergy;
|
this.activationEnergy = activationEnergy;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void configurePowerPerdition(int powerLoss, int powerLossRegularity)
|
/**
|
||||||
{
|
* Allows you define perdition in terms of loss/ticks.
|
||||||
if (powerLoss == 0 || powerLossRegularity == 0)
|
*
|
||||||
{
|
* 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);
|
perdition = new PerditionCalculator(0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -178,44 +212,50 @@ public final class PowerHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allows you to define a new PerditionCalculator class to handler perdition calculations.
|
* Allows you to define a new PerditionCalculator class to handler perdition
|
||||||
*
|
* calculations.
|
||||||
* For example if you want exponentially increasing loss based on amount stored.
|
*
|
||||||
*
|
* For example if you want exponentially increasing loss based on amount
|
||||||
|
* stored.
|
||||||
|
*
|
||||||
* @param perdition
|
* @param perdition
|
||||||
*/
|
*/
|
||||||
public void setPerdition(PerditionCalculator perdition)
|
public void setPerdition(PerditionCalculator perdition) {
|
||||||
{
|
|
||||||
if (perdition == null)
|
if (perdition == null)
|
||||||
perdition = DEFAULT_PERDITION;
|
perdition = DEFAULT_PERDITION;
|
||||||
this.perdition = perdition;
|
this.perdition = perdition;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PerditionCalculator getPerdition()
|
public PerditionCalculator getPerdition() {
|
||||||
{
|
|
||||||
if (perdition == null)
|
if (perdition == null)
|
||||||
return DEFAULT_PERDITION;
|
return DEFAULT_PERDITION;
|
||||||
return perdition;
|
return perdition;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ticks the power handler. You should call this if you can, but its not required.
|
* 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
|
* If you don't call it, the possibility exists for some weirdness with the
|
||||||
* be. You should be able to design around this though if you are aware of the limitations.
|
* 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();
|
applyPerdition();
|
||||||
applyWork();
|
applyWork();
|
||||||
validateEnergy();
|
validateEnergy();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void applyPerdition()
|
private void applyPerdition() {
|
||||||
{
|
if (perditionTracker.markTimeIfDelay(receptor.getWorld(), 1) && energyStored > 0) {
|
||||||
if (perditionTracker.markTimeIfDelay(receptor.getWorld(), 1) && energyStored > 0)
|
|
||||||
{
|
|
||||||
float newEnergy = getPerdition().applyPerdition(this, energyStored, perditionTracker.durationOfLastDelay());
|
float newEnergy = getPerdition().applyPerdition(this, energyStored, perditionTracker.durationOfLastDelay());
|
||||||
if (newEnergy == 0 || newEnergy < energyStored)
|
if (newEnergy == 0 || newEnergy < energyStored)
|
||||||
energyStored = newEnergy;
|
energyStored = newEnergy;
|
||||||
|
@ -225,26 +265,19 @@ public final class PowerHandler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void applyWork()
|
private void applyWork() {
|
||||||
{
|
if (energyStored >= activationEnergy) {
|
||||||
if (energyStored >= activationEnergy)
|
if (doWorkTracker.markTimeIfDelay(receptor.getWorld(), 1)) {
|
||||||
{
|
|
||||||
if (doWorkTracker.markTimeIfDelay(receptor.getWorld(), 1))
|
|
||||||
{
|
|
||||||
receptor.doWork(this);
|
receptor.doWork(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateSources(ForgeDirection source)
|
private void updateSources(ForgeDirection source) {
|
||||||
{
|
if (sourcesTracker.markTimeIfDelay(receptor.getWorld(), 1)) {
|
||||||
if (sourcesTracker.markTimeIfDelay(receptor.getWorld(), 1))
|
for (int i = 0; i < 6; ++i) {
|
||||||
{
|
|
||||||
for (int i = 0; i < 6; ++i)
|
|
||||||
{
|
|
||||||
powerSources[i] -= sourcesTracker.durationOfLastDelay();
|
powerSources[i] -= sourcesTracker.durationOfLastDelay();
|
||||||
if (powerSources[i] < 0)
|
if (powerSources[i] < 0) {
|
||||||
{
|
|
||||||
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 min
|
||||||
* @param max
|
* @param max
|
||||||
* @param doUse
|
* @param doUse
|
||||||
* @return amount used
|
* @return amount used
|
||||||
*/
|
*/
|
||||||
public float useEnergy(float min, float max, boolean doUse)
|
public float useEnergy(float min, float max, boolean doUse) {
|
||||||
{
|
|
||||||
applyPerdition();
|
applyPerdition();
|
||||||
|
|
||||||
float result = 0;
|
float result = 0;
|
||||||
|
|
||||||
if (energyStored >= min)
|
if (energyStored >= min) {
|
||||||
{
|
if (energyStored <= max) {
|
||||||
if (energyStored <= max)
|
|
||||||
{
|
|
||||||
result = energyStored;
|
result = energyStored;
|
||||||
if (doUse)
|
if (doUse) {
|
||||||
{
|
|
||||||
energyStored = 0;
|
energyStored = 0;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
result = max;
|
result = max;
|
||||||
if (doUse)
|
if (doUse) {
|
||||||
{
|
|
||||||
energyStored -= max;
|
energyStored -= max;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -290,137 +317,122 @@ public final class PowerHandler
|
||||||
|
|
||||||
validateEnergy();
|
validateEnergy();
|
||||||
|
|
||||||
|
// if (doUse)
|
||||||
|
// totalUsedPower += result;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void readFromNBT(NBTTagCompound data)
|
public void readFromNBT(NBTTagCompound data) {
|
||||||
{
|
|
||||||
readFromNBT(data, "powerProvider");
|
readFromNBT(data, "powerProvider");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void readFromNBT(NBTTagCompound data, String tag)
|
public void readFromNBT(NBTTagCompound data, String tag) {
|
||||||
{
|
|
||||||
NBTTagCompound nbt = data.getCompoundTag(tag);
|
NBTTagCompound nbt = data.getCompoundTag(tag);
|
||||||
energyStored = nbt.getFloat("storedEnergy");
|
energyStored = nbt.getFloat("storedEnergy");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void writeToNBT(NBTTagCompound data)
|
public void writeToNBT(NBTTagCompound data) {
|
||||||
{
|
|
||||||
writeToNBT(data, "powerProvider");
|
writeToNBT(data, "powerProvider");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void writeToNBT(NBTTagCompound data, String tag)
|
public void writeToNBT(NBTTagCompound data, String tag) {
|
||||||
{
|
|
||||||
NBTTagCompound nbt = new NBTTagCompound();
|
NBTTagCompound nbt = new NBTTagCompound();
|
||||||
nbt.setFloat("storedEnergy", energyStored);
|
nbt.setFloat("storedEnergy", energyStored);
|
||||||
data.setCompoundTag(tag, nbt);
|
data.setCompoundTag(tag, nbt);
|
||||||
}
|
}
|
||||||
|
|
||||||
public final class PowerReceiver
|
public final class PowerReceiver {
|
||||||
{
|
|
||||||
|
|
||||||
private PowerReceiver()
|
private PowerReceiver() {
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getMinEnergyReceived()
|
public float getMinEnergyReceived() {
|
||||||
{
|
|
||||||
return minEnergyReceived;
|
return minEnergyReceived;
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getMaxEnergyReceived()
|
public float getMaxEnergyReceived() {
|
||||||
{
|
|
||||||
return maxEnergyReceived;
|
return maxEnergyReceived;
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getMaxEnergyStored()
|
public float getMaxEnergyStored() {
|
||||||
{
|
|
||||||
return maxEnergyStored;
|
return maxEnergyStored;
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getActivationEnergy()
|
public float getActivationEnergy() {
|
||||||
{
|
|
||||||
return activationEnergy;
|
return activationEnergy;
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getEnergyStored()
|
public float getEnergyStored() {
|
||||||
{
|
|
||||||
return energyStored;
|
return energyStored;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Type getType()
|
public Type getType() {
|
||||||
{
|
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void update()
|
public void update() {
|
||||||
{
|
|
||||||
PowerHandler.this.update();
|
PowerHandler.this.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The amount of power that this PowerHandler currently needs.
|
* The amount of power that this PowerHandler currently needs.
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public float powerRequest()
|
public float powerRequest() {
|
||||||
{
|
|
||||||
update();
|
update();
|
||||||
return Math.min(maxEnergyReceived, maxEnergyStored - energyStored);
|
return Math.min(maxEnergyReceived, maxEnergyStored - energyStored);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add power to the PowerReceiver from an external source.
|
* Add power to the PowerReceiver from an external source.
|
||||||
*
|
*
|
||||||
|
* IPowerEmitters are responsible for calling this themselves.
|
||||||
|
*
|
||||||
* @param quantity
|
* @param quantity
|
||||||
* @param from
|
* @param from
|
||||||
* @return the amount of power used
|
* @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;
|
float used = quantity;
|
||||||
if (source == Type.ENGINE)
|
if (source == Type.ENGINE) {
|
||||||
{
|
if (used < minEnergyReceived) {
|
||||||
if (used < minEnergyReceived)
|
|
||||||
{
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
} else if (used > maxEnergyReceived) {
|
||||||
else if (used > maxEnergyReceived)
|
|
||||||
{
|
|
||||||
used = maxEnergyReceived;
|
used = maxEnergyReceived;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
updateSources(from);
|
updateSources(from);
|
||||||
|
|
||||||
|
used -= used * getPerdition().getTaxPercent();
|
||||||
|
|
||||||
used = addEnergy(used);
|
used = addEnergy(used);
|
||||||
|
|
||||||
applyWork();
|
applyWork();
|
||||||
|
|
||||||
if (source == Type.ENGINE && type.eatsEngineExcess())
|
if (source == Type.ENGINE && type.eatsEngineExcess()) {
|
||||||
{
|
used = Math.min(quantity, maxEnergyReceived);
|
||||||
return Math.min(quantity, maxEnergyReceived);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// totalReceivedPower += used;
|
||||||
|
|
||||||
return used;
|
return used;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return the amount the power changed by
|
* @return the amount the power changed by
|
||||||
*/
|
*/
|
||||||
public float addEnergy(float quantity)
|
public float addEnergy(float quantity) {
|
||||||
{
|
|
||||||
energyStored += quantity;
|
energyStored += quantity;
|
||||||
|
|
||||||
if (energyStored > maxEnergyStored)
|
if (energyStored > maxEnergyStored) {
|
||||||
{
|
|
||||||
quantity -= energyStored - maxEnergyStored;
|
quantity -= energyStored - maxEnergyStored;
|
||||||
energyStored = maxEnergyStored;
|
energyStored = maxEnergyStored;
|
||||||
}
|
} else if (energyStored < 0) {
|
||||||
else if (energyStored < 0)
|
|
||||||
{
|
|
||||||
quantity -= energyStored;
|
quantity -= energyStored;
|
||||||
energyStored = 0;
|
energyStored = 0;
|
||||||
}
|
}
|
||||||
|
@ -430,25 +442,20 @@ public final class PowerHandler
|
||||||
return quantity;
|
return quantity;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEnergy(float quantity)
|
public void setEnergy(float quantity) {
|
||||||
{
|
|
||||||
this.energyStored = quantity;
|
this.energyStored = quantity;
|
||||||
validateEnergy();
|
validateEnergy();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isPowerSource(ForgeDirection from)
|
public boolean isPowerSource(ForgeDirection from) {
|
||||||
{
|
|
||||||
return powerSources[from.ordinal()] != 0;
|
return powerSources[from.ordinal()] != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void validateEnergy()
|
private void validateEnergy() {
|
||||||
{
|
if (energyStored < 0) {
|
||||||
if (energyStored < 0)
|
|
||||||
{
|
|
||||||
energyStored = 0;
|
energyStored = 0;
|
||||||
}
|
}
|
||||||
if (energyStored > maxEnergyStored)
|
if (energyStored > maxEnergyStored) {
|
||||||
{
|
|
||||||
energyStored = maxEnergyStored;
|
energyStored = maxEnergyStored;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
package buildcraft.api.recipes;
|
package buildcraft.api.recipes;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
|
||||||
public class AssemblyRecipe {
|
public class AssemblyRecipe {
|
||||||
|
|
||||||
public static LinkedList<AssemblyRecipe> assemblyRecipes = new LinkedList<AssemblyRecipe>();
|
public static LinkedList<AssemblyRecipe> assemblyRecipes = new LinkedList<AssemblyRecipe>();
|
||||||
|
public final Object[] input;
|
||||||
public final ItemStack[] input;
|
|
||||||
public final ItemStack output;
|
public final ItemStack output;
|
||||||
public final float energy;
|
public final float energy;
|
||||||
|
|
||||||
|
@ -17,30 +18,69 @@ public class AssemblyRecipe {
|
||||||
this.energy = energy;
|
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;
|
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)) {
|
// Return false if the amount of ingredient found
|
||||||
found += item.stackSize; // Adds quantity of stack to amount
|
// is not enough
|
||||||
// found
|
if (found < expected)
|
||||||
}
|
return false;
|
||||||
}
|
} else if (input[i] instanceof ArrayList) {
|
||||||
|
ArrayList<ItemStack> oreList = (ArrayList<ItemStack>) input[i];
|
||||||
|
int found = 0; // Amount of ingredient found in inventory
|
||||||
|
int expected = (Integer) input[i++ + 1];
|
||||||
|
|
||||||
if (found < in.stackSize)
|
for (ItemStack item : items) {
|
||||||
return false; // Return false if the amount of ingredient found
|
if (item == null)
|
||||||
// is not enough
|
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;
|
return true;
|
||||||
|
|
|
@ -59,7 +59,11 @@ public enum Direction {
|
||||||
coords[dir/2] += getSign();
|
coords[dir/2] += getSign();
|
||||||
|
|
||||||
if (tileEntity.worldObj != null && tileEntity.worldObj.blockExists(coords[0], coords[1], coords[2])) {
|
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 {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,8 @@ public interface IMetaDelegate extends IEnergyTile {
|
||||||
/**
|
/**
|
||||||
* Get the sub-TileEntities belonging to this Meta TileEntity.
|
* 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
|
* @return sub-TileEntity array
|
||||||
*/
|
*/
|
||||||
List<TileEntity> getSubTiles();
|
List<TileEntity> getSubTiles();
|
||||||
|
|
|
@ -42,346 +42,539 @@ public final class Items {
|
||||||
|
|
||||||
/* Possible values:
|
/* 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
|
||||||
ores
|
tinOre; // Tin Ore block, currently not meta sensitive, meta in ItemStack set to 0, ore dictionary: oreTin, null with enableWorldGenOreTin=false
|
||||||
copperOre Copper Ore block, currently not meta sensitive, meta in ItemStack set to 0, ore dictionary: oreCopper, null with enableWorldGenOreCopper=false
|
uraniumOre; // Tin Ore block, currently not meta sensitive, meta in ItemStack set to 0, ore dictionary: oreUranium, null with enableWorldGenOreUranium=false
|
||||||
tinOre Tin Ore block, currently not meta sensitive, meta in ItemStack set to 0, ore dictionary: oreTin, null with enableWorldGenOreTin=false
|
leadOre; // Lead Ore Block, currently not meta sensitive, meta in ItemStack set to 0, ore dictionary: oreLead, null with enableWorldGenOreLead=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 related
|
|
||||||
Rubber wood block, meta reflects the state, meta in ItemStack set to 0, ore dictionary: woodRubber (with meta 0), null with enableWorldGenTreeRubber=false
|
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
|
dropped (as an item) -> metadata 0
|
||||||
block, no resin spot -> metadata 0 or 1
|
block, no resin spot -> metadata 0 or 1
|
||||||
block, wet resin spot -> metadata 2-5 (according to the side)
|
block, wet resin spot -> metadata 2-5 (according to the side)
|
||||||
block, dry resin spot -> metadata 8-11 (wet state + 6)
|
block, dry resin spot -> metadata 8-11 (wet state + 6)
|
||||||
|
|
||||||
rubberWood
|
rubberWood;
|
||||||
rubberLeaves Rubber Leaves block, currently not meta sensitive, meta in ItemStack set to 0, null with enableWorldGenTreeRubber=false
|
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
|
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
|
resinSheet; // Resin Sheet block, currently not meta sensitive
|
||||||
rubberTrampoline Rubber Trampoline block, meta reflects internal state, meta in ItemStack set to 0
|
rubberTrampoline; // Rubber Trampoline block, meta reflects internal state, meta in ItemStack set to 0
|
||||||
|
|
||||||
building/storage
|
// building/storage
|
||||||
ironFence Iron Fence block, currently not meta sensitive
|
ironFence; // Iron Fence block, currently not meta sensitive
|
||||||
|
|
||||||
reinforcedStone Reinforced Stone block, currently not meta sensitive
|
reinforcedStone; // Reinforced Stone block, currently not meta sensitive
|
||||||
reinforcedGlass Reinforced Glass 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
|
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
|
constructionreinforcedFoam; // Construction Reinforced Foam block, currently not meta sensitive
|
||||||
constructionFoamWall Construction Foam Wall block, meta = color, implements IPaintableBlock
|
constructionFoam; // Construction Foam block, currently not meta sensitive
|
||||||
scaffold Scaffold block, meta reflects internal physical model data
|
constructionFoamWall; // Construction Foam Wall block, meta = color, implements IPaintableBlock
|
||||||
|
scaffold; // Scaffold block, meta reflects internal physical model data
|
||||||
bronzeBlock Bronze block, meta sensitive
|
ironScaffold; // Scaffold block, meta reflects internal physical model data
|
||||||
copperBlock Copper block, meta sensitive
|
|
||||||
tinBlock Tin block, meta sensitive
|
bronzeBlock; // Bronze block, meta sensitive
|
||||||
uraniumBlock Uranium block, meta sensitive
|
copperBlock; // Copper block, meta sensitive
|
||||||
|
tinBlock; // Tin block, meta sensitive
|
||||||
cables (when placed as a block, inventory items are different TE implements IEnergyConductor)
|
uraniumBlock; // Uranium block, meta sensitive
|
||||||
copperCableBlock Copper Cable block, meta sensitive
|
leadBlock; // Uranium block, meta sensitive
|
||||||
insulatedCopperCableBlock Insulated Copper Cable block, meta sensitive
|
|
||||||
|
// cables (when placed as a block, inventory items are different; TE implements IEnergyConductor)
|
||||||
goldCableBlock Gold Cable block, meta sensitive
|
|
||||||
insulatedGoldCableBlock Insulated Gold Cable block, meta sensitive
|
copperCableBlock; // Copper Cable block, meta sensitive
|
||||||
doubleInsulatedGoldCableBlock Double Insulated Gold Cable block, meta sensitive
|
insulatedCopperCableBlock; // Insulated Copper Cable block, meta sensitive
|
||||||
|
|
||||||
ironCableBlock Iron Cable block, meta sensitive
|
goldCableBlock; // Gold Cable block, meta sensitive
|
||||||
insulatedIronCableBlock Insulated Iron Cable block, meta sensitive
|
insulatedGoldCableBlock; // Insulated Gold Cable block, meta sensitive
|
||||||
doubleInsulatedIronCableBlock Double Insulated Iron Cable block, meta sensitive
|
doubleInsulatedGoldCableBlock; // Double Insulated Gold Cable block, meta sensitive
|
||||||
trippleInsulatedIronCableBlock Tripple Insulated Iron Cable block, meta sensitive
|
|
||||||
|
ironCableBlock; // Iron Cable block, meta sensitive
|
||||||
glassFiberCableBlock Glass Fiber Cable block, meta sensitive
|
insulatedIronCableBlock; // Insulated Iron Cable block, meta sensitive
|
||||||
|
doubleInsulatedIronCableBlock; // Double Insulated Iron Cable block, meta sensitive
|
||||||
tinCableBlock Tin Cable block, meta sensitive
|
trippleInsulatedIronCableBlock; // Tripple Insulated Iron Cable block, meta sensitive
|
||||||
|
|
||||||
detectorCableBlock Detector Cable block, meta sensitive
|
glassFiberCableBlock; // Glass Fiber Cable block, meta sensitive
|
||||||
splitterCableBlock Splitter Cable block, meta sensitive
|
|
||||||
|
tinCableBlock; // Tin Cable block, meta sensitive
|
||||||
generators + related (TE implements IEnergySource ex. reactorChamber)
|
insulatedtinCableBlock; // Insulated Tin Cable item, meta sensitive
|
||||||
generator Generator block, meta sensitive
|
detectorCableBlock; // Detector Cable block, meta sensitive
|
||||||
geothermalGenerator Geothermal Generator block, meta sensitive
|
splitterCableBlock; // Splitter Cable block, meta sensitive
|
||||||
waterMill Water Mill block, meta sensitive
|
|
||||||
solarPanel Solar Panel block, meta sensitive
|
// generators + related (TE implements IEnergySource ex. reactorChamber)
|
||||||
windMill Wind Mill block, meta sensitive
|
|
||||||
nuclearReactor Nuclear Reactor block, meta sensitive
|
generator; // Generator block, meta sensitive
|
||||||
reactorChamber Reactor Chamber block, currently not meta sensitive
|
geothermalGenerator; // Geothermal Generator block, meta sensitive
|
||||||
|
waterMill; // Water Mill block, meta sensitive
|
||||||
energy storages (TE implements IEnergySource and IEnergyConductor)
|
solarPanel; // Solar Panel block, meta sensitive
|
||||||
batBox BatBox block, meta sensitive
|
windMill; // Wind Mill block, meta sensitive
|
||||||
mfeUnit MFE Unit block, meta sensitive
|
nuclearReactor; // Nuclear Reactor block, meta sensitive
|
||||||
mfsUnit MFS Unit block, meta sensitive
|
reactorChamber; // Reactor Chamber block, currently not meta sensitive
|
||||||
|
RTGenerator; // Radioisotope Thermoelectric Generator block, meta sensitive
|
||||||
transformers (TE implements IEnergySource and IEnergyConductor)
|
semifluidGenerator; // Semifluid Generator block, meta sensitive
|
||||||
lvTransformer LV Transformer block, meta sensitive
|
|
||||||
mvTransformer MV Transformer block, meta sensitive
|
|
||||||
hvTransformer HV Transformer block, meta sensitive
|
// energy storages (TE implements IEnergySource and IEnergyConductor)
|
||||||
|
|
||||||
machines + related (TE implements IEnergySink ex. machine, miningPipe, miningPipeTip)
|
batBox; // BatBox block, meta sensitive
|
||||||
machine Machine block, meta sensitive
|
cesuUnit; // CESU Unit block, meta sensitive
|
||||||
advancedMachine Advanced Machine block, meta sensitive
|
mfeUnit; // MFE Unit block, meta sensitive
|
||||||
|
mfsUnit; // MFS Unit block, meta sensitive
|
||||||
ironFurnace Iron Furnace block, meta sensitive
|
|
||||||
electroFurnace Electro Furnace block, meta sensitive
|
// transformers (TE implements IEnergySource and IEnergyConductor)
|
||||||
macerator Macerator block, meta sensitive
|
|
||||||
extractor Extractor block, meta sensitive
|
lvTransformer; // LV Transformer block, meta sensitive
|
||||||
compressor Compressor block, meta sensitive
|
mvTransformer; // MV Transformer block, meta sensitive
|
||||||
canner Canner block, meta sensitive
|
hvTransformer; // HV Transformer block, meta sensitive
|
||||||
miner Miner block, meta sensitive
|
evTransformer; // EV Transformer block, meta sensitive
|
||||||
pump Pump block, meta sensitive
|
|
||||||
magnetizer Magnetizer block, meta sensitive
|
// machines + related (TE implements IEnergySink ex. machine, miningPipe, miningPipeTip)
|
||||||
electrolyzer Electrolyzer block, meta sensitive
|
|
||||||
recycler Recycler block, meta sensitive
|
machine; // Machine block, meta sensitive
|
||||||
inductionFurnace Induction Furnace block, meta sensitive
|
advancedMachine; // Advanced Machine block, meta sensitive
|
||||||
massFabricator Mass Fabricator block, meta sensitive
|
|
||||||
terraformer Terraformer block, meta sensitive
|
ironFurnace; // Iron Furnace block, meta sensitive
|
||||||
teleporter Teleporter block, meta sensitive
|
electroFurnace; // Electro Furnace block, meta sensitive
|
||||||
teslaCoil Tesla Coil block, meta sensitive
|
macerator; // Macerator block, meta sensitive
|
||||||
luminator Passive (dark) Luminator block, meta = facing
|
extractor; // Extractor block, meta sensitive
|
||||||
activeLuminator Active (bright) Luminator block, meta = facing
|
compressor; // Compressor block, meta sensitive
|
||||||
|
canner; // Canner block, meta sensitive
|
||||||
miningPipe Mining Pipe block, currently not meta sensitive, meta in ItemStack set to 0
|
miner; // Miner block, meta sensitive
|
||||||
miningPipeTip Mining Pipe Tip block, currently not meta sensitive, meta in ItemStack set to 0
|
pump; // Pump block, meta sensitive
|
||||||
|
magnetizer; // Magnetizer block, meta sensitive
|
||||||
personal blocks
|
electrolyzer; // Electrolyzer block, meta sensitive
|
||||||
personalSafe Personal Safe block, meta sensitive
|
recycler; // Recycler block, meta sensitive
|
||||||
tradeOMat Trade-O-Mat block, meta sensitive
|
inductionFurnace; // Induction Furnace block, meta sensitive
|
||||||
energyOMat Energy-O-Mat block, meta sensitive
|
massFabricator; // Mass Fabricator block, meta sensitive
|
||||||
|
terraformer; // Terraformer block, meta sensitive
|
||||||
explosives
|
teleporter; // Teleporter block, meta sensitive
|
||||||
industrialTnt Industrial TNT block, currently not meta sensitive
|
teslaCoil; // Tesla Coil block, meta sensitive
|
||||||
nuke Nuke block, currently not meta sensitive
|
luminator; // Passive (dark) Luminator block, meta = facing
|
||||||
dynamiteStick Dynamite Stick block, meta = placement, meta in ItemStack set to 0
|
activeLuminator; // Active (bright) Luminator block, meta = facing
|
||||||
dynamiteStickWithRemote Dynamite Stick with Remote block, meta = placement, meta in ItemStack set to 0
|
centrifuge; // Centrifuge block, meta sensitive
|
||||||
|
metalformer; // MetalFormer block ,meta sensitive
|
||||||
Agriculture Stuff
|
orewashingplant; // Ore Wasching Plant,Meta sensitive
|
||||||
crop Crop Block, empty, not meta sensitive
|
patternstorage; // Pattern Storage,Meta sensitive
|
||||||
|
scanner; // Scanner,Meta sensitive
|
||||||
|
replicator; // Replicator,Meta sensitive
|
||||||
----- items -----
|
|
||||||
|
miningPipe; // Mining Pipe block, currently not meta sensitive, meta in ItemStack set to 0
|
||||||
rubber + related
|
miningPipeTip; // Mining Pipe Tip block, currently not meta sensitive, meta in ItemStack set to 0
|
||||||
resin Resin item, currently not meta sensitive
|
|
||||||
rubber Rubber item, currently not meta sensitive, ore dictionary: itemRubber
|
|
||||||
|
// personal blocks
|
||||||
ore drops
|
|
||||||
uraniumDrop Uranium Drop item, currently not meta sensitive, ore dictionary: itemDropUranium
|
personalSafe; // Personal Safe block, meta sensitive
|
||||||
|
tradeOMat; // Trade-O-Mat block, meta sensitive
|
||||||
dusts
|
energyOMat; // Energy-O-Mat block, meta sensitive
|
||||||
bronzeDust Bronze Dust item, currently not meta sensitive
|
|
||||||
clayDust Clay Dust item, currently not meta sensitive
|
// explosives
|
||||||
coalDust Coal Dust item, currently not meta sensitive
|
|
||||||
copperDust Copper Dust item, currently not meta sensitive
|
industrialTnt; // Industrial TNT block, currently not meta sensitive
|
||||||
goldDust Gold Dust item, currently not meta sensitive
|
nuke; // Nuke block, currently not meta sensitive
|
||||||
ironDust Iron Dust item, currently not meta sensitive
|
dynamiteStick; // Dynamite Stick block, meta = placement, meta in ItemStack set to 0
|
||||||
silverDust Silver Dust item, currently not meta sensitive
|
dynamiteStickWithRemote; // Dynamite Stick with Remote block, meta = placement, meta in ItemStack set to 0
|
||||||
smallIronDust Small Iron Dust item, currently not meta sensitive
|
|
||||||
tinDust Tin Dust item, currently not meta sensitive
|
// Agriculture Stuff
|
||||||
hydratedCoalDust Hydrated Coal Dust item, currently not meta sensitive
|
|
||||||
|
crop; // Crop Block, empty, not meta sensitive
|
||||||
ingots
|
cropmatron; // Cropmatron machien block, meta sensititve
|
||||||
refinedIronIngot Refined Iron Ingot item, currently not meta sensitive, ore dictionary: ingotRefinedIron
|
|
||||||
copperIngot Copper Ingot item, currently not meta sensitive, ore dictionary: ingotCopper
|
// ----- items -----
|
||||||
tinIngot Tin Ingot item, currently not meta sensitive, ore dictionary: ingotTin
|
|
||||||
bronzeIngot Bronze Ingot item, currently not meta sensitive, ore dictionary: ingotBronze
|
// rubber + related
|
||||||
mixedMetalIngot Mixed Metal Ingot item, currently not meta sensitive
|
resin; // Resin item, currently not meta sensitive
|
||||||
uraniumIngot Uranium Ingot item, currently not meta sensitive, ore dictionary: ingotUranium
|
rubber; // Rubber item, currently not meta sensitive, ore dictionary: itemRubber
|
||||||
|
|
||||||
tools/weapons (without electric tools)
|
FluidCell;
|
||||||
treetap Treetap item, meta = damage value
|
|
||||||
wrench Wrench item, meta = damage value
|
// Lithium -> Tritium
|
||||||
cutter Insulation Cutter item, meta = damage value
|
|
||||||
constructionFoamSprayer Construction Foam Sprayer item, meta = charges (as of v1.45)
|
reactorLithiumCell; // LithiumCell use in Reaktor, , meta = damage value
|
||||||
|
TritiumCell; // Tritium, currently not meta sensitive
|
||||||
bronzePickaxe Bronze Pickaxe item, meta = damage value
|
|
||||||
bronzeAxe Bronze Axe item, meta = damage value
|
// Nuclear Fuel
|
||||||
bronzeSword Bronze Sword item, meta = damage value
|
|
||||||
bronzeShovel Bronze Shovel item, meta = damage value
|
UranFuel; // , currently not meta sensitive
|
||||||
bronzeHoe Bronze Hoe item, meta = damage value
|
MOXFuel; // , currently not meta sensitive
|
||||||
|
Plutonium; // , currently not meta sensitive
|
||||||
el. tools/devices/weapons
|
smallPlutonium; // , currently not meta sensitive
|
||||||
miningDrill Mining Drill item, meta = visual charge indicator, implements IElectricItem
|
Uran235; // , currently not meta sensitive
|
||||||
diamondDrill Diamond Tipped Mining Drill item, meta = visual charge indicator, implements IElectricItem
|
smallUran235; // , currently not meta sensitive
|
||||||
chainsaw Chainsaw item, meta = visual charge indicator, implements IElectricItem
|
Uran238; // , currently not meta sensitive
|
||||||
electricWrench Electric Wrench item, meta = visual charge indicator, implements IElectricItem
|
|
||||||
electricTreetap Electric Treetap item, meta = visual charge indicator, implements IElectricItem
|
reactorDepletedUraniumSimple; // Depleted Uranium Cell items, currently not meta sensitive
|
||||||
miningLaser Mining Laser item, meta = visual charge indicator, implements IElectricItem
|
reactorDepletedUraniumDual;
|
||||||
|
reactorDepletedUraniumQuad;
|
||||||
ecMeter EC-Mater item, currently not meta sensitive
|
reactorDepletedMOXSimple; // Depleted MOX Cell items, currently not meta sensitive
|
||||||
odScanner Ore Density Scanner item, meta = damage value for charge level, implements IElectricItem
|
reactorDepletedMOXDual;
|
||||||
ovScanner Ore Value Scanner item, meta = visual charge indicator, implements IElectricItem
|
reactorDepletedMOXQuad;
|
||||||
|
reactorMOXSimple; // Depleted MOX Cell items, currently not meta sensitive
|
||||||
frequencyTransmitter Frequency Transmitter item, currently not meta sensitive
|
reactorMOXDual;
|
||||||
|
reactorMOXQuad;
|
||||||
nanoSaber Idle Nano Saber item, meta = visual charge indicator, implements IElectricItem
|
RTGPellets;
|
||||||
enabledNanoSaber Enabled Nano Saber item, meta = visual charge indicator, implements IElectricItem
|
|
||||||
|
|
||||||
armor/wearable
|
// Recipe Parts
|
||||||
rubberBoots Rubber Boots item, meta = damage value
|
|
||||||
|
coil; // Coil, meta sensitive
|
||||||
bronzeHelmet Bronze Helmet Armor item, meta = damage value
|
elemotor; // electric motor, meta sensitive
|
||||||
bronzeChestplate Bronze Chestplate Armor item, meta = damage value
|
powerunit; // Item Power Unit, meta sensitive
|
||||||
bronzeLeggings Bronze Leggings Armor item, meta = damage value
|
powerunitsmall; // Item Power Unit, meta sensitive
|
||||||
bronzeBoots Bronze Boots Armor item, meta = damage value
|
|
||||||
|
|
||||||
compositeArmor Composite Armor item, meta = damage value for charge level
|
// ItemCasing
|
||||||
|
|
||||||
nanoHelmet Nano Helmet Armor item, meta = visual charge indicator, implements IElectricItem
|
casingcopper; // Copper ItemCasing, meta sensitive
|
||||||
nanoBodyarmor Nano Bodyarmor item, meta = visual charge indicator, implements IElectricItem
|
casingtin; // Tin ItemCasing, meta sensitive
|
||||||
nanoLeggings Nano Leggings Armor item, meta = visual charge indicator, implements IElectricItem
|
casingbronze; // Bronze ItemCasing, meta sensitive
|
||||||
nanoBoots Nano Boots Armor item, meta = visual charge indicator, implements IElectricItem
|
casinggold; // Gold ItemCasing, meta sensitive
|
||||||
|
casingiron; // Iron ItemCasing, meta sensitive
|
||||||
quantumHelmet Quantum Helmet Armor item, meta = visual charge indicator, implements IElectricItem
|
@Deprecated
|
||||||
quantumBodyarmor Quantum Bodyarmor item, meta = visual charge indicator, implements IElectricItem
|
casingadviron; // Refined Iron ItemCasing, meta sensitive
|
||||||
quantumLeggings Quantum Leggings Armor item, meta = visual charge indicator, implements IElectricItem
|
casinglead; // Lead ItemCasing, meta sensitive
|
||||||
quantumBoots Quantum Boots Armor item, meta = visual charge indicator, implements IElectricItem
|
|
||||||
|
// Crushed Ore
|
||||||
jetpack Jetpack item, meta = damage value for fuel level
|
crushedIronOre; // Crushed Iron Ore, meta sensitive
|
||||||
electricJetpack Electric Jetpack item, meta = visual charge indicator, implements IElectricItem
|
crushedCopperOre; // Crushed Copper Ore, meta sensitive
|
||||||
|
crushedGoldOre; // Crushed Gold Ore, meta sensitive
|
||||||
batPack BatPack item, meta = visual charge indicator, implements IElectricItem, can provide energy
|
crushedTinOre; // Crushed Tin Ore, meta sensitive
|
||||||
lapPack LapPack item, meta = visual charge indicator, implements IElectricItem, can provide energy
|
crushedUraniumOre; // Crushed Uranium Ore, meta sensitive
|
||||||
|
crushedSilverOre; // Crushed Silver Ore, meta sensitive
|
||||||
cfPack CF Pack item, meta = charges (as of v1.45)
|
crushedLeadOre; // Crushed Lead Ore, meta sensitive
|
||||||
|
|
||||||
solarHelmet Solar Helmet item, currently not meta sensitive
|
|
||||||
staticBoots Static Boots item, currently not meta sensitive
|
//Purify Crushed Ore
|
||||||
|
purifiedCrushedIronOre; // Purify Crushed Iron Ore, meta sensitive
|
||||||
batteries
|
purifiedCrushedCopperOre; // Purify Crushed Copper Ore, meta sensitive
|
||||||
reBattery Empty RE Battery item, currently not meta sensitive, implements IElectricItem
|
purifiedCrushedGoldOre; // Purify Crushed Gold Ore, meta sensitive
|
||||||
chargedReBattery RE Battery item, meta = visual charge indicator, implements IElectricItem, can provide energy
|
purifiedCrushedTinOre; // Purify Crushed Tin Ore, meta sensitive
|
||||||
energyCrystal Energy Crystal item, meta = visual charge indicator, implements IElectricItem, can provide energy
|
purifiedCrushedUraniumOre; // Purify Crushed Uranium Ore, meta sensitive
|
||||||
lapotronCrystal Lapotron Crystal item, meta = visual charge indicator, implements IElectricItem, can provide energy
|
purifiedCrushedSilverOre; // Purify Crushed Silver Ore, meta sensitive
|
||||||
suBattery SU Battery item, currently not meta sensitive
|
purifiedCrushedLeadOre; // Purify Crushed Lead Ore, meta sensitive
|
||||||
|
|
||||||
cables
|
// dusts
|
||||||
copperCableItem Copper Cable item, meta sensitive
|
stoneDust;
|
||||||
insulatedCopperCableItem Insulated Copper Cable item, meta sensitive
|
bronzeDust; // Bronze Dust item, meta sensitive, ore dictionary: dustBronze
|
||||||
|
clayDust; // Clay Dust item, meta sensitive, ore dictionary: dustClay
|
||||||
goldCableItem Gold Cable item, meta sensitive
|
coalDust; // Coal Dust item, meta sensitive, ore dictionary: dustCoal
|
||||||
insulatedGoldCableItem Insulated Gold Cable item, meta sensitive
|
copperDust; // Copper Dust item, meta sensitive, ore dictionary: dustCopper
|
||||||
doubleInsulatedGoldCableItem Double Insulated Gold Cable item, meta sensitive
|
goldDust; // Gold Dust item, meta sensitive, ore dictionary: dustGold
|
||||||
|
ironDust; // Iron Dust item, meta sensitive, ore dictionary: dustIron
|
||||||
ironCableItem Iron Cable item, meta sensitive
|
silverDust; // Silver Dust item, meta sensitive, ore dictionary: dustSilver
|
||||||
insulatedIronCableItem Insulated Iron Cable item, meta sensitive
|
tinDust; // Tin Dust item, meta sensitive, ore dictionary: dustTin
|
||||||
doubleInsulatedIronCableItem Double Insulated Iron Cable item, meta sensitive
|
hydratedCoalDust; // Hydrated Coal Dust item, meta sensitive
|
||||||
trippleInsulatedIronCableItem Tripple Insulated Iron Cable item, meta sensitive
|
leadDust; // Lead Dust item, meta sensitive, ore dictionary: dustLead
|
||||||
|
obsidianDust; // Obsidian Dust item, meta sensitive, ore dictionary: dustObsidian
|
||||||
glassFiberCableItem Glass Fiber Cable item, meta sensitive
|
lapiDust; // Lapi Dust item, meta sensitive, ore dictionary: dustLapi
|
||||||
|
sulfurDust; // Sulfur Dust item, meta sensitive, ore dictionary: dustSulfur
|
||||||
tinCableItem Tin Cable item, meta sensitive
|
lithiumDust; // Lithium dust, meta sensitive, ore dictionary: dustLithium
|
||||||
|
|
||||||
detectorCableItem Detector Cable item, meta sensitive
|
// small dusts
|
||||||
splitterCableItem Splitter Cable item, meta sensitive
|
|
||||||
|
smallIronDust; // Small Iron Dust item, meta sensitive
|
||||||
cells/containers (without reactor components)
|
smallCopperDust; // Small Copper Dust item, meta sensitive
|
||||||
cell Empty Cell item, currently not meta sensitive
|
smallGoldDust; // Small Gold Dust item, meta sensitive
|
||||||
lavaCell Lava Cell item, currently not meta sensitive
|
smallTinDust; // Small Tin Dust item, meta sensitive
|
||||||
hydratedCoalCell Hydrated Coal Cell item, currently not meta sensitive
|
smallSilverDust; // Small Silver Dust item, meta sensitive
|
||||||
bioCell Bio Cell item, currently not meta sensitive
|
smallLeadDust; // Small Lead Dust item, meta sensitive
|
||||||
coalfuelCell Coalfuel Cell item, currently not meta sensitive
|
smallSulfurDust; // Small Sulfur Dust item, meta sensitive
|
||||||
biofuelCell Biofuel Cell item, currently not meta sensitive
|
smallLithiumDust; // Small Lithium Dust item, meta sensitive
|
||||||
waterCell Water Cell item, currently not meta sensitive
|
|
||||||
electrolyzedWaterCell Electrolyzed Water Cell item, currently not meta sensitive
|
|
||||||
|
// ingots
|
||||||
fuelCan Empty Fuel Can item, currently not meta sensitive
|
@Deprecated
|
||||||
filledFuelCan Fuel Can item, meta = fuel value (as of v1.45)
|
refinedIronIngot; // Refined Iron Ingot item, currently not meta sensitive, ore dictionary: ingotRefinedIron
|
||||||
|
copperIngot; // Copper Ingot item, currently not meta sensitive, ore dictionary: ingotCopper
|
||||||
tinCan Empty Tin Can item, currently not meta sensitive
|
tinIngot; // Tin Ingot item, currently not meta sensitive, ore dictionary: ingotTin
|
||||||
filledTinCan Filled Tin Can item, currently not meta sensitive
|
bronzeIngot; // Bronze Ingot item, currently not meta sensitive, ore dictionary: ingotBronze
|
||||||
|
mixedMetalIngot; // Mixed Metal Ingot item, currently not meta sensitive
|
||||||
reactor components
|
leadIngot; // Lead Ingot item, currently not meta sensitive
|
||||||
uraniumCell Uranium Cell item, meta = damage value
|
|
||||||
coolingCell Cooling Cell item, meta = damage value
|
|
||||||
|
// tools/weapons (without electric tools)
|
||||||
depletedIsotopeCell Depleted Isotope Cell item, meta = damage value
|
treetap; // Treetap item, meta = damage value
|
||||||
reEnrichedUraniumCell Re-Enriched Uranium Cell item, currently not meta sensitive
|
wrench; // Wrench item, meta = damage value
|
||||||
nearDepletedUraniumCell Near-Depleted Uranium Cell item, currently not meta sensitive
|
cutter; // Insulation Cutter item, meta = damage value
|
||||||
|
constructionFoamSprayer; // Construction Foam Sprayer item, meta = charges (as of v1.45)
|
||||||
integratedReactorPlating Integrated Reactor Plating item, meta = damage value
|
|
||||||
integratedHeatDisperser Integrated Heat Disperser item, meta = damage value
|
bronzePickaxe; // Bronze Pickaxe item, meta = damage value
|
||||||
|
bronzeAxe; // Bronze Axe item, meta = damage value
|
||||||
terraformer blueprints
|
bronzeSword; // Bronze Sword item, meta = damage value
|
||||||
terraformerBlueprint Empty Terraformer Blueprint item, currently not meta sensitive
|
bronzeShovel; // Bronze Shovel item, meta = damage value
|
||||||
cultivationTerraformerBlueprint Cultivation Terraformer Blueprint item, currently not meta sensitive
|
bronzeHoe; // Bronze Hoe item, meta = damage value
|
||||||
irrigationTerraformerBlueprint Irrigation Terraformer Blueprint item, currently not meta sensitive
|
|
||||||
chillingTerraformerBlueprint Chilling Terraformer Blueprint item, currently not meta sensitive
|
ForgeHammer; // Refine Iron Hammer item, meta = damage value
|
||||||
desertificationTerraformerBlueprint Desertification Terraformer Blueprint item, currently not meta sensitive
|
|
||||||
flatificatorTerraformerBlueprint Flatificator Terraformer Blueprint item, currently not meta sensitive
|
// el. tools/devices/weapons
|
||||||
mushroomTerraformerBlueprint Mushroom Terraformer Blueprint item, currently not meta sensitive
|
miningDrill; // Mining Drill item, meta = damage value for charge level
|
||||||
|
diamondDrill; // Diamond Tipped Mining Drill item, meta = damage value for charge level
|
||||||
diamond chain
|
iridiumDrill; // Iridium Tipped Mining Drill item, meta = damage value for charge level
|
||||||
coalBall Coal Ball item, currently not meta sensitive
|
chainsaw; // Chainsaw item, meta = damage value for charge level
|
||||||
compressedCoalBall Compressed Coal Ball item, currently not meta sensitive
|
electricWrench; // Electric Wrench item, meta = damage value for charge level
|
||||||
coalChunk Coal Chunk item, currently not meta sensitive
|
electricTreetap; // Electric Treetap item, meta = damage value for charge level
|
||||||
industrialDiamond Industrial Diamond item, currently not meta sensitive, DEPRECATED
|
miningLaser; // Mining Laser item, meta = damage value for charge level
|
||||||
|
|
||||||
recycler chain
|
ecMeter; // EC-Mater item, meta = itemdata db index (as of v1.45)
|
||||||
scrap Scrap item, currently not meta sensitive
|
odScanner; // Ore Density Scanner item, meta = damage value for charge level
|
||||||
scrapBox Scrap Box item, currently not meta sensitive
|
ovScanner; // Ore Value Scanner item, meta = damage value for charge level
|
||||||
|
obscurator; // Obscurator item, meta = damage value for charge level
|
||||||
fuel production chain
|
|
||||||
hydratedCoalClump Hydrated Coal Clump item, currently not meta sensitive
|
frequencyTransmitter; // Frequency Transmitter item, meta = itemdata db index (as of v1.45)
|
||||||
plantBall Plant Ball item, currently not meta sensitive
|
|
||||||
compressedPlantBall Compressed Plant Ball item, currently not meta sensitive
|
nanoSaber; // Idle Nano Saber item, meta = damage value for charge level
|
||||||
|
enabledNanoSaber; // Enabled Nano Saber item, meta = damage value for charge level
|
||||||
painting
|
|
||||||
painter Painter item, currently not meta sensitive
|
toolbox; // Open/Empty toolbox, meta = Open (0) / Closed (1)
|
||||||
|
|
||||||
blackPainter Black Painter item, meta = damage value
|
// armor/wearable
|
||||||
redPainter Red Painter item, meta = damage value
|
hazmatHelmet; // Hazmat Helmet item, meta = damage value
|
||||||
greenPainter Green Painter item, meta = damage value
|
hazmatChestplate; // Hazmat Chestplate item, meta = damage value
|
||||||
brownPainter Brown Painter item, meta = damage value
|
hazmatLeggings; // Hazmat Leggings item, meta = damage value
|
||||||
bluePainter Blue Painter item, meta = damage value
|
hazmatBoots; // Hazmat Boots item, meta = damage value
|
||||||
purplePainter Purple Painter item, meta = damage value
|
|
||||||
cyanPainter Cyan Painter item, meta = damage value
|
bronzeHelmet; // Bronze Helmet Armor item, meta = damage value
|
||||||
lightGreyPainter Light Grey Painter item, meta = damage value
|
bronzeChestplate; // Bronze Chestplate Armor item, meta = damage value
|
||||||
darkGreyPainter Dark Grey Painter item, meta = damage value
|
bronzeLeggings; // Bronze Leggings Armor item, meta = damage value
|
||||||
pinkPainter Pink Painter item, meta = damage value
|
bronzeBoots; // Bronze Boots Armor item, meta = damage value
|
||||||
limePainter Lime Painter item, meta = damage value
|
|
||||||
yellowPainter Yellow Painter item, meta = damage value
|
compositeArmor; // Composite Armor item, meta = damage value for charge level
|
||||||
cloudPainter Cloud Painter item, meta = damage value
|
|
||||||
magentaPainter Magenta Painter item, meta = damage value
|
nanoHelmet; // Nano Helmet Armor item, meta = damage value for charge level
|
||||||
orangePainter Orange Painter item, meta = damage value
|
nanoBodyarmor; // Nano Bodyarmor item, meta = damage value for charge level
|
||||||
whitePainter White Painter item, meta = damage value
|
nanoLeggings; // Nano Leggings Armor item, meta = damage value for charge level
|
||||||
|
nanoBoots; // Nano Boots Armor item, meta = damage value for charge level
|
||||||
explosives + related
|
|
||||||
dynamite Throwable Dynamite item, currently not meta sensitive
|
quantumHelmet; // Quantum Helmet Armor item, meta = damage value for charge level
|
||||||
stickyDynamite Throwable Sticky Dynamite item, currently not meta sensitive
|
quantumBodyarmor; // Quantum Bodyarmor item, meta = damage value for charge level
|
||||||
|
quantumLeggings; // Quantum Leggings Armor item, meta = damage value for charge level
|
||||||
remote Dynamite Remote item, currently not meta sensitive
|
quantumBoots; // Quantum Boots Armor item, meta = damage value for charge level
|
||||||
|
|
||||||
misc intermediate recipe ingredients
|
jetpack; // Jetpack item, meta = damage value for fuel level
|
||||||
electronicCircuit Electronic Circuit item, currently not meta sensitive
|
electricJetpack; // Electric Jetpack item, meta = damage value for charge level
|
||||||
advancedCircuit Advanced Circuit item, currently not meta sensitive
|
|
||||||
|
batPack; // BatPack item, meta = damage value for charge level
|
||||||
advancedAlloy Advanced Alloy item, currently not meta sensitive
|
advbatPack; // Adv.BatPack item, meta = damage value for charge level
|
||||||
|
lapPack; // LapPack item, meta = damage value for charge level
|
||||||
carbonFiber Raw Carbon Fiber item, currently not meta sensitive
|
energyPack; // EnergyPack item, meta = damage value for charge level
|
||||||
carbonMesh Raw Carbon Mesh item, currently not meta sensitive
|
|
||||||
carbonPlate Carbon Plate item, currently not meta sensitive
|
cfPack; // CF Pack item, meta = charges (as of v1.45)
|
||||||
|
solarHelmet; // Solar Helmet, currently not meta sensitive
|
||||||
matter UU-Matter item, currently not meta sensitive
|
staticBoots; // Static Boots, currently not meta sensitive
|
||||||
iridiumOre Iridium Ore item, currently not meta sensitive
|
nightvisionGoggles; // Nightvision Goggles, meta = damage value for charge level
|
||||||
iridiumPlate Iridium Plate item, currently not meta sensitive
|
|
||||||
|
// batteries
|
||||||
upgrade modules
|
reBattery; // Empty RE Battery item, currently not meta sensitive
|
||||||
overclockerUpgrade overclocker upgrade item, meta sensitive
|
chargedReBattery; // RE Battery item, meta = damage value for charge level
|
||||||
transformerUpgrade transformer upgrade item, meta sensitive
|
advBattery; // Adv Batteryitem, meta = damage value for charge level
|
||||||
energyStorageUpgrade energy storage upgrade item, meta sensitive
|
energyCrystal; // Energy Crystal item, meta = damage value for charge level
|
||||||
|
lapotronCrystal; // Lapotron Crystal item, meta = damage value for charge level
|
||||||
misc
|
suBattery; // SU Battery item, meta = damage value for charge level
|
||||||
coin Coin item, currently not meta sensitive
|
|
||||||
reinforcedDoor Reinforced Door item, currently not meta sensitive
|
// cables
|
||||||
constructionFoamPellet Construction Foam Pellet item, currently not meta sensitive
|
copperCableItem; // Copper Cable item, meta sensitive
|
||||||
cropSeed Crop seeds, stuff stored in NBT, don't use for crafting recipes!
|
insulatedCopperCableItem; // Insulated Copper Cable item, meta sensitive
|
||||||
cropnalyzer Cropnalyzer handheld device
|
|
||||||
fertilizer Basic IC2Item, used to provide nutrients toCropBlocks
|
goldCableItem; // Gold Cable item, meta sensitive
|
||||||
hydratingCell Cell used to hydrate Crops, meta = Content, 0 = Full, 9999 = Near empty
|
insulatedGoldCableItem; // Insulated Gold Cable item, meta sensitive
|
||||||
electricHoe Electric Hoe, meta = charge level
|
|
||||||
solarHelmet Solar Helmet item, currently not meta sensitive
|
@Deprecated
|
||||||
terraWart Terra Wart item, cures potion effects
|
doubleInsulatedGoldCableItem; // Double Insulated Gold Cable item, meta sensitive
|
||||||
weedEx Weed-EX can, meta = uses left
|
|
||||||
|
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
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -103,8 +103,8 @@ public interface IReactor {
|
||||||
/**
|
/**
|
||||||
* Get the item at the specified grid coordinates.
|
* Get the item at the specified grid coordinates.
|
||||||
*
|
*
|
||||||
* @param x X position of the item
|
* @param x X position of the item, out of bounds returns null
|
||||||
* @param y Y position of the item
|
* @param y Y position of the item, out of bounds returns null
|
||||||
* @return The item or null if there is no item
|
* @return The item or null if there is no item
|
||||||
*/
|
*/
|
||||||
public ItemStack getItemAt(int x, int y);
|
public ItemStack getItemAt(int x, int y);
|
||||||
|
@ -112,8 +112,8 @@ public interface IReactor {
|
||||||
/**
|
/**
|
||||||
* Set the item at the specified grid coordinates.
|
* Set the item at the specified grid coordinates.
|
||||||
*
|
*
|
||||||
* @param x X 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
|
* @param y Y position of the item, out of bounds is a no-op
|
||||||
* @param item The item to set.
|
* @param item The item to set.
|
||||||
*/
|
*/
|
||||||
public void setItemAt(int x, int y, ItemStack item);
|
public void setItemAt(int x, int y, ItemStack item);
|
||||||
|
|
|
@ -51,8 +51,10 @@ public interface IWrenchable {
|
||||||
/**
|
/**
|
||||||
* Determine the item the block will drop when the wrenching is successful.
|
* 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
|
* @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);
|
ItemStack getWrenchDrop(EntityPlayer entityPlayer);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue