diff --git a/dependencies.gradle b/dependencies.gradle index b6456d02b..981372657 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -1,5 +1,33 @@ // Add your dependencies here dependencies { + compile("com.github.GTNewHorizons:Baubles:master-SNAPSHOT:dev") + compile("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev") + + compileOnly("com.github.GTNewHorizons:Railcraft:master-SNAPSHOT:api") { + transitive = false + } + compileOnly("com.github.GTNewHorizons:StorageDrawers:master-SNAPSHOT:api") { + transitive = false + } + compileOnly("com.github.GTNewHorizons:ForgeMultipart:master-SNAPSHOT:dev") { + transitive = false + } + compileOnly("com.github.GTNewHorizons:NotEnoughItems:master-SNAPSHOT:dev") { + transitive = false + } + compileOnly("com.github.GTNewHorizons:CodeChickenLib:master-SNAPSHOT:dev") { + transitive = false + } + + compileOnly("curse.maven:cofh-lib-220333:2388749") { + transitive = false + } + compileOnly("com.mod-buildcraft:buildcraft:7.1.23:api") { + transitive = false + } + compileOnly("curse.maven:minefactory-reloaded-66672:2366150") { + transitive = false + } } diff --git a/repositories.gradle b/repositories.gradle index c8843905d..f717fc3aa 100644 --- a/repositories.gradle +++ b/repositories.gradle @@ -1,5 +1,10 @@ // Add any additional repositories for your dependencies here repositories { - + maven { + url "https://cursemaven.com" + } + maven { + url = "https://jitpack.io" + } } diff --git a/src/api/java/buildcraft/api/core/BCLog.java b/src/api/java/buildcraft/api/core/BCLog.java deleted file mode 100644 index 7f2896de1..000000000 --- a/src/api/java/buildcraft/api/core/BCLog.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.core; - -import java.lang.reflect.Method; - -import org.apache.logging.log4j.Level; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; - -public final class BCLog { - - public static final Logger logger = LogManager.getLogger("BuildCraft"); - - /** - * Deactivate constructor - */ - private BCLog() { - } - - public static void initLog() { - - logger.info("Starting BuildCraft " + getVersion()); - logger.info("Copyright (c) SpaceToad, 2011-2015"); - logger.info("http://www.mod-buildcraft.com"); - } - - public static void logErrorAPI(String mod, Throwable error, Class classFile) { - StringBuilder msg = new StringBuilder(mod); - msg.append(" API error, please update your mods. Error: ").append(error); - StackTraceElement[] stackTrace = error.getStackTrace(); - if (stackTrace.length > 0) { - msg.append(", ").append(stackTrace[0]); - } - - logger.log(Level.ERROR, msg.toString()); - - if (classFile != null) { - msg = new StringBuilder(mod); - msg.append(" API error: ").append(classFile.getSimpleName()).append(" is loaded from ").append(classFile.getProtectionDomain().getCodeSource().getLocation()); - logger.log(Level.ERROR, msg.toString()); - } - } - - public static String getVersion() { - try { - Class clazz = Class.forName("buildcraft.core.Version"); - Method method = clazz.getDeclaredMethod("getVersion"); - return String.valueOf(method.invoke(null)); - } catch (Exception e) { - return "UNKNOWN VERSION"; - } - } -} diff --git a/src/api/java/buildcraft/api/core/BlockIndex.java b/src/api/java/buildcraft/api/core/BlockIndex.java deleted file mode 100644 index 8c295fa8f..000000000 --- a/src/api/java/buildcraft/api/core/BlockIndex.java +++ /dev/null @@ -1,115 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.core; - -import net.minecraft.block.Block; -import net.minecraft.entity.Entity; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; - -/** - * This class is a comparable container for integer block positions. - */ -public class BlockIndex implements Comparable { - - public int x; - public int y; - public int z; - - public BlockIndex() { - - } - - /** - * Creates an index for a block located on x, y. z - */ - public BlockIndex(int x, int y, int z) { - - this.x = x; - this.y = y; - this.z = z; - } - - public BlockIndex(NBTTagCompound c) { - this.x = c.getInteger("i"); - this.y = c.getInteger("j"); - this.z = c.getInteger("k"); - } - - public BlockIndex(Entity entity) { - x = (int) Math.floor(entity.posX); - y = (int) Math.floor(entity.posY); - z = (int) Math.floor(entity.posZ); - } - - public BlockIndex(TileEntity entity) { - this(entity.xCoord, entity.yCoord, entity.zCoord); - } - - /** - * Provides a deterministic and complete ordering of block positions. - */ - @Override - public int compareTo(BlockIndex o) { - - if (o.x < x) { - return 1; - } else if (o.x > x) { - return -1; - } else if (o.z < z) { - return 1; - } else if (o.z > z) { - return -1; - } else if (o.y < y) { - return 1; - } else if (o.y > y) { - return -1; - } else { - return 0; - } - } - - public void writeTo(NBTTagCompound c) { - c.setInteger("i", x); - c.setInteger("j", y); - c.setInteger("k", z); - } - - public Block getBlock(World world) { - return world.getBlock(x, y, z); - } - - @Override - public String toString() { - return "{" + x + ", " + y + ", " + z + "}"; - } - - @Override - public boolean equals(Object obj) { - if (obj instanceof BlockIndex) { - BlockIndex b = (BlockIndex) obj; - - return b.x == x && b.y == y && b.z == z; - } - - return false; - } - - @Override - public int hashCode() { - return (x * 37 + y) * 37 + z; - } - - public boolean nextTo(BlockIndex blockIndex) { - return (Math.abs(blockIndex.x - x) <= 1 && blockIndex.y == y && blockIndex.z == z) - || (blockIndex.x == x && Math.abs(blockIndex.y - y) <= 1 && blockIndex.z == z) - || (blockIndex.x == x && blockIndex.y == y && Math.abs(blockIndex.z - z) <= 1); - } -} diff --git a/src/api/java/buildcraft/api/core/BuildCraftAPI.java b/src/api/java/buildcraft/api/core/BuildCraftAPI.java deleted file mode 100644 index 9cb0b07e2..000000000 --- a/src/api/java/buildcraft/api/core/BuildCraftAPI.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.core; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.Set; - -import net.minecraft.block.Block; -import net.minecraft.world.World; - -public final class BuildCraftAPI { - - public static ICoreProxy proxy; - - public static final Set softBlocks = new HashSet(); - public static final HashMap worldProperties = new HashMap(); - - /** - * Deactivate constructor - */ - private BuildCraftAPI() { - } - - public static IWorldProperty getWorldProperty(String name) { - return worldProperties.get(name); - } - - public static void registerWorldProperty(String name, IWorldProperty property) { - if (worldProperties.containsKey(name)) { - BCLog.logger.warn("The WorldProperty key '" + name + "' is being overidden with " + property.getClass().getSimpleName() + "!"); - } - worldProperties.put(name, property); - } - - public static boolean isSoftBlock(World world, int x, int y, int z) { - return worldProperties.get("soft").get(world, x, y, z); - } -} diff --git a/src/api/java/buildcraft/api/core/EnumColor.java b/src/api/java/buildcraft/api/core/EnumColor.java deleted file mode 100644 index 2147e7261..000000000 --- a/src/api/java/buildcraft/api/core/EnumColor.java +++ /dev/null @@ -1,201 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.core; - -import java.util.Locale; -import java.util.Random; - -import net.minecraft.util.IIcon; -import net.minecraft.util.StatCollector; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -public enum EnumColor { - - BLACK, - RED, - GREEN, - BROWN, - BLUE, - PURPLE, - CYAN, - LIGHT_GRAY, - GRAY, - PINK, - LIME, - YELLOW, - LIGHT_BLUE, - MAGENTA, - ORANGE, - WHITE; - - public static final EnumColor[] VALUES = values(); - public static final String[] DYES = { - "dyeBlack", - "dyeRed", - "dyeGreen", - "dyeBrown", - "dyeBlue", - "dyePurple", - "dyeCyan", - "dyeLightGray", - "dyeGray", - "dyePink", - "dyeLime", - "dyeYellow", - "dyeLightBlue", - "dyeMagenta", - "dyeOrange", - "dyeWhite"}; - public static final String[] NAMES = { - "Black", - "Red", - "Green", - "Brown", - "Blue", - "Purple", - "Cyan", - "LightGray", - "Gray", - "Pink", - "Lime", - "Yellow", - "LightBlue", - "Magenta", - "Orange", - "White"}; - public static final int[] DARK_HEX = { - 0x2D2D2D, - 0xA33835, - 0x394C1E, - 0x5C3A24, - 0x3441A2, - 0x843FBF, - 0x36809E, - 0x888888, - 0x444444, - 0xE585A0, - 0x3FAA36, - 0xCFC231, - 0x7F9AD1, - 0xFF64FF, - 0xFF6A00, - 0xFFFFFF}; - public static final int[] LIGHT_HEX = { - 0x181414, - 0xBE2B27, - 0x007F0E, - 0x89502D, - 0x253193, - 0x7e34bf, - 0x299799, - 0xa0a7a7, - 0x7A7A7A, - 0xD97199, - 0x39D52E, - 0xFFD91C, - 0x66AAFF, - 0xD943C6, - 0xEA7835, - 0xe4e4e4}; - - @SideOnly(Side.CLIENT) - private static IIcon[] brushIcons; - - public int getDarkHex() { - return DARK_HEX[ordinal()]; - } - - public int getLightHex() { - return LIGHT_HEX[ordinal()]; - } - - public static EnumColor fromId(int id) { - if (id < 0 || id >= VALUES.length) { - return WHITE; - } - return VALUES[id]; - } - - public static EnumColor fromDye(String dyeTag) { - for (int id = 0; id < DYES.length; id++) { - if (DYES[id].equals(dyeTag)) { - return VALUES[id]; - } - } - return null; - } - - public static EnumColor fromName(String name) { - for (int id = 0; id < NAMES.length; id++) { - if (NAMES[id].equals(name)) { - return VALUES[id]; - } - } - return null; - } - - public static EnumColor getRand() { - return VALUES[new Random().nextInt(VALUES.length)]; - } - - public EnumColor getNext() { - EnumColor next = VALUES[(ordinal() + 1) % VALUES.length]; - return next; - } - - public EnumColor getPrevious() { - EnumColor previous = VALUES[(ordinal() + VALUES.length - 1) % VALUES.length]; - return previous; - } - - public EnumColor inverse() { - return EnumColor.VALUES[15 - ordinal()]; - } - - public String getTag() { - return "color." + name().replace("_", ".").toLowerCase(Locale.ENGLISH); - } - - public String getBasicTag() { - return name().replace("_", ".").toLowerCase(Locale.ENGLISH); - } - - public String getName() { - return NAMES[ordinal()]; - } - - public String getLocalizedName() { - return StatCollector.translateToLocal(getTag()); - } - - public String getDye() { - return DYES[ordinal()]; - } - - @Override - public String toString() { - String s = name().replace("_", " "); - String[] words = s.split(" "); - StringBuilder b = new StringBuilder(); - for (String word : words) { - b.append(word.charAt(0)).append(word.substring(1).toLowerCase(Locale.ENGLISH)).append(" "); - } - return b.toString().trim(); - } - - public static void setIconArray(IIcon[] icons) { - brushIcons = icons; - } - - @SideOnly(Side.CLIENT) - public IIcon getIcon() { - return brushIcons [ordinal()]; - } -} diff --git a/src/api/java/buildcraft/api/core/IAreaProvider.java b/src/api/java/buildcraft/api/core/IAreaProvider.java deleted file mode 100644 index 4abcf6e95..000000000 --- a/src/api/java/buildcraft/api/core/IAreaProvider.java +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.core; - -/** - * To be implemented by TileEntities able to provide a square area on the world, typically BuildCraft markers. - */ -public interface IAreaProvider { - int xMin(); - - int yMin(); - - int zMin(); - - int xMax(); - - int yMax(); - - int zMax(); - - /** - * Remove from the world all objects used to define the area. - */ - void removeFromWorld(); -} diff --git a/src/api/java/buildcraft/api/core/IBox.java b/src/api/java/buildcraft/api/core/IBox.java deleted file mode 100644 index e1e6f7d80..000000000 --- a/src/api/java/buildcraft/api/core/IBox.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.core; - -public interface IBox extends IZone { - - IBox expand(int amount); - - IBox contract(int amount); - - Position pMin(); - - Position pMax(); - - void createLaserData(); - -} diff --git a/src/api/java/buildcraft/api/core/ICoreProxy.java b/src/api/java/buildcraft/api/core/ICoreProxy.java deleted file mode 100755 index 272faebfd..000000000 --- a/src/api/java/buildcraft/api/core/ICoreProxy.java +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.core; - -import java.lang.ref.WeakReference; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.WorldServer; - -public interface ICoreProxy { - WeakReference getBuildCraftPlayer(WorldServer world); -} diff --git a/src/api/java/buildcraft/api/core/IIconProvider.java b/src/api/java/buildcraft/api/core/IIconProvider.java deleted file mode 100644 index fa8657e64..000000000 --- a/src/api/java/buildcraft/api/core/IIconProvider.java +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.core; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.util.IIcon; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -public interface IIconProvider { - - /** - * @param iconIndex - */ - @SideOnly(Side.CLIENT) - IIcon getIcon(int iconIndex); - - /** - * A call for the provider to register its Icons. This may be called multiple times but should only be executed once per provider - * @param iconRegister - */ - @SideOnly(Side.CLIENT) - void registerIcons(IIconRegister iconRegister); - -} diff --git a/src/api/java/buildcraft/api/core/IInvSlot.java b/src/api/java/buildcraft/api/core/IInvSlot.java deleted file mode 100644 index ea7a7fa30..000000000 --- a/src/api/java/buildcraft/api/core/IInvSlot.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.core; - -import net.minecraft.item.ItemStack; - -public interface IInvSlot { - /** - * Returns the slot number of the underlying Inventory. - * - * @return the slot number - */ - int getIndex(); - - boolean canPutStackInSlot(ItemStack stack); - - boolean canTakeStackFromSlot(ItemStack stack); - - boolean isItemValidForSlot(ItemStack stack); - - ItemStack decreaseStackInSlot(int amount); - - ItemStack getStackInSlot(); - - void setStackInSlot(ItemStack stack); -} diff --git a/src/api/java/buildcraft/api/core/INBTStoreable.java b/src/api/java/buildcraft/api/core/INBTStoreable.java deleted file mode 100644 index 669eed33c..000000000 --- a/src/api/java/buildcraft/api/core/INBTStoreable.java +++ /dev/null @@ -1,8 +0,0 @@ -package buildcraft.api.core; - -import net.minecraft.nbt.NBTTagCompound; - -public interface INBTStoreable { - void readFromNBT(NBTTagCompound tag); - void writeToNBT(NBTTagCompound tag); -} diff --git a/src/api/java/buildcraft/api/core/IPathProvider.java b/src/api/java/buildcraft/api/core/IPathProvider.java deleted file mode 100644 index 2ff392a92..000000000 --- a/src/api/java/buildcraft/api/core/IPathProvider.java +++ /dev/null @@ -1,10 +0,0 @@ -package buildcraft.api.core; - -import java.util.List; - -/** - * To be implemented by TileEntities able to provide a path on the world, typically BuildCraft path markers. - */ -public interface IPathProvider { - List getPath(); -} diff --git a/src/api/java/buildcraft/api/core/ISerializable.java b/src/api/java/buildcraft/api/core/ISerializable.java deleted file mode 100644 index a7d011ebb..000000000 --- a/src/api/java/buildcraft/api/core/ISerializable.java +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * 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.core; - -import io.netty.buffer.ByteBuf; - -/** - * Implemented by classes representing serializable packet state - */ -public interface ISerializable { - /** - * Serializes the state to the stream - * - * @param data - */ - void writeData(ByteBuf data); - - /** - * Deserializes the state from the stream - * - * @param data - */ - void readData(ByteBuf data); -} diff --git a/src/api/java/buildcraft/api/core/IWorldProperty.java b/src/api/java/buildcraft/api/core/IWorldProperty.java deleted file mode 100755 index a55bef1fc..000000000 --- a/src/api/java/buildcraft/api/core/IWorldProperty.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.core; - -import net.minecraft.world.World; - -public interface IWorldProperty { - boolean get(World world, int x, int y, int z); - - void clear(); -} diff --git a/src/api/java/buildcraft/api/core/IZone.java b/src/api/java/buildcraft/api/core/IZone.java deleted file mode 100755 index 55ef4f80e..000000000 --- a/src/api/java/buildcraft/api/core/IZone.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.core; - -import java.util.Random; - -public interface IZone { - - double distanceTo(BlockIndex index); - - double distanceToSquared(BlockIndex index); - - boolean contains(double x, double y, double z); - - BlockIndex getRandomBlockIndex(Random rand); - -} diff --git a/src/api/java/buildcraft/api/core/JavaTools.java b/src/api/java/buildcraft/api/core/JavaTools.java deleted file mode 100755 index e8dd4d898..000000000 --- a/src/api/java/buildcraft/api/core/JavaTools.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.core; - -import java.util.Arrays; - -public final class JavaTools { - private JavaTools(){ - - } - - public static T[] concat(T[] first, T[] second) { - T[] result = Arrays.copyOf(first, first.length + second.length); - System.arraycopy(second, 0, result, first.length, second.length); - return result; - } - - public static int[] concat(int[] first, int[] second) { - int[] result = Arrays.copyOf(first, first.length + second.length); - System.arraycopy(second, 0, result, first.length, second.length); - return result; - } - - public static float[] concat(float[] first, float[] second) { - float[] result = Arrays.copyOf(first, first.length + second.length); - System.arraycopy(second, 0, result, first.length, second.length); - return result; - } - - public static String surroundWithQuotes(String stringToSurroundWithQuotes) { - return String.format("\"%s\"", stringToSurroundWithQuotes); - } - - public static String stripSurroundingQuotes(String stringToStripQuotes) { - return stringToStripQuotes.replaceAll("^\"|\"$", ""); - } -} diff --git a/src/api/java/buildcraft/api/core/Position.java b/src/api/java/buildcraft/api/core/Position.java deleted file mode 100644 index 426e09f40..000000000 --- a/src/api/java/buildcraft/api/core/Position.java +++ /dev/null @@ -1,200 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.core; - -import io.netty.buffer.ByteBuf; - -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; - -public class Position implements ISerializable { - - public double x, y, z; - public ForgeDirection orientation; - - public Position() { - x = 0; - y = 0; - z = 0; - orientation = ForgeDirection.UNKNOWN; - } - - public Position(double ci, double cj, double ck) { - x = ci; - y = cj; - z = ck; - orientation = ForgeDirection.UNKNOWN; - } - - public Position(double ci, double cj, double ck, ForgeDirection corientation) { - x = ci; - y = cj; - z = ck; - orientation = corientation; - - if (orientation == null) { - orientation = ForgeDirection.UNKNOWN; - } - } - - public Position(Position p) { - x = p.x; - y = p.y; - z = p.z; - orientation = p.orientation; - } - - public Position(NBTTagCompound nbttagcompound) { - readFromNBT(nbttagcompound); - } - - public Position(TileEntity tile) { - x = tile.xCoord; - y = tile.yCoord; - z = tile.zCoord; - orientation = ForgeDirection.UNKNOWN; - } - - public Position(BlockIndex index) { - x = index.x; - y = index.y; - z = index.z; - orientation = ForgeDirection.UNKNOWN; - } - - public void moveRight(double step) { - switch (orientation) { - case SOUTH: - x = x - step; - break; - case NORTH: - x = x + step; - break; - case EAST: - z = z + step; - break; - case WEST: - z = z - step; - break; - default: - } - } - - public void moveLeft(double step) { - moveRight(-step); - } - - public void moveForwards(double step) { - switch (orientation) { - case UP: - y = y + step; - break; - case DOWN: - y = y - step; - break; - case SOUTH: - z = z + step; - break; - case NORTH: - z = z - step; - break; - case EAST: - x = x + step; - break; - case WEST: - x = x - step; - break; - default: - } - } - - public void moveBackwards(double step) { - moveForwards(-step); - } - - public void moveUp(double step) { - switch (orientation) { - case SOUTH: - case NORTH: - case EAST: - case WEST: - y = y + step; - break; - default: - } - - } - - public void moveDown(double step) { - moveUp(-step); - } - - public void writeToNBT(NBTTagCompound nbttagcompound) { - if (orientation == null) { - orientation = ForgeDirection.UNKNOWN; - } - - nbttagcompound.setDouble("i", x); - nbttagcompound.setDouble("j", y); - nbttagcompound.setDouble("k", z); - nbttagcompound.setByte("orientation", (byte) orientation.ordinal()); - } - - public void readFromNBT(NBTTagCompound nbttagcompound) { - x = nbttagcompound.getDouble("i"); - y = nbttagcompound.getDouble("j"); - z = nbttagcompound.getDouble("k"); - orientation = ForgeDirection.values() [nbttagcompound.getByte("orientation")]; - } - - @Override - public String toString() { - return "{" + x + ", " + y + ", " + z + "}"; - } - - public Position min(Position p) { - return new Position(p.x > x ? x : p.x, p.y > y ? y : p.y, p.z > z ? z : p.z); - } - - public Position max(Position p) { - return new Position(p.x < x ? x : p.x, p.y < y ? y : p.y, p.z < z ? z : p.z); - } - - public boolean isClose(Position newPosition, float f) { - double dx = x - newPosition.x; - double dy = y - newPosition.y; - double dz = z - newPosition.z; - - double sqrDis = dx * dx + dy * dy + dz * dz; - - return !(sqrDis > f * f); - } - - @Override - public void readData(ByteBuf stream) { - x = stream.readDouble(); - y = stream.readDouble(); - z = stream.readDouble(); - orientation = ForgeDirection.getOrientation(stream.readByte()); - } - - @Override - public void writeData(ByteBuf stream) { - stream.writeDouble(x); - stream.writeDouble(y); - stream.writeDouble(z); - stream.writeByte(orientation.ordinal()); - } - - @Override - public int hashCode() { - return (51 * (int) x) + (13 * (int) y) + (int) z; - } -} diff --git a/src/api/java/buildcraft/api/core/SafeTimeTracker.java b/src/api/java/buildcraft/api/core/SafeTimeTracker.java deleted file mode 100644 index 3e56ee989..000000000 --- a/src/api/java/buildcraft/api/core/SafeTimeTracker.java +++ /dev/null @@ -1,85 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.core; - -import net.minecraft.world.World; - -public class SafeTimeTracker { - - private long lastMark = Long.MIN_VALUE; - private long duration = -1; - private long randomRange = 0; - private long lastRandomDelay = 0; - private long internalDelay = 1; - - /** - * @deprecated should use constructors with parameters instead - */ - public SafeTimeTracker () { - - } - - public SafeTimeTracker (long delay) { - internalDelay = delay; - } - - /** - * In many situations, it is a bad idea to have all objects of the same - * kind to be waiting for the exact same amount of time, as that can lead - * to some situation where they're all synchronized and got to work all - * at the same time. When created with a random range, the mark that is set - * when reaching the expect delay will be added with a random number - * between [0, range[, meaning that the event will take between 0 and range - * more tick to run. - */ - public SafeTimeTracker (long delay, long random) { - internalDelay = delay; - randomRange = random; - } - - public boolean markTimeIfDelay(World world) { - return markTimeIfDelay(world, internalDelay); - } - - /** - * Return true if a given delay has passed since last time marked was called - * successfully. - * - * @deprecated should use the constructor with a delay instead, and call - * this function without a parameter - */ - public boolean markTimeIfDelay(World world, long delay) { - if (world == null) { - return false; - } - - long currentTime = world.getTotalWorldTime(); - - if (currentTime < lastMark) { - lastMark = currentTime; - return false; - } else if (lastMark + delay + lastRandomDelay <= currentTime) { - duration = currentTime - lastMark; - lastMark = currentTime; - lastRandomDelay = (int) (Math.random() * randomRange); - - return true; - } else { - return false; - } - } - - public long durationOfLastDelay() { - return duration > 0 ? duration : 0; - } - - public void markTime(World world) { - lastMark = world.getTotalWorldTime(); - } -} \ No newline at end of file diff --git a/src/api/java/buildcraft/api/core/StackKey.java b/src/api/java/buildcraft/api/core/StackKey.java deleted file mode 100644 index 776aaafdf..000000000 --- a/src/api/java/buildcraft/api/core/StackKey.java +++ /dev/null @@ -1,134 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.core; - -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidStack; - -/** - * This class is used whenever stacks needs to be stored as keys. - */ -public final class StackKey { - public final ItemStack stack; - public final FluidStack fluidStack; - - public StackKey(FluidStack fluidStack) { - this(null, fluidStack); - } - - public StackKey(ItemStack stack) { - this(stack, null); - } - - public StackKey(ItemStack stack, FluidStack fluidStack) { - this.stack = stack; - this.fluidStack = fluidStack; - } - - public static StackKey stack(Item item, int amount, int damage) { - return new StackKey(new ItemStack(item, amount, damage)); - } - - public static StackKey stack(Block block, int amount, int damage) { - return new StackKey(new ItemStack(block, amount, damage)); - } - - public static StackKey stack(Item item) { - return new StackKey(new ItemStack(item, 1, 0)); - } - - public static StackKey stack(Block block) { - return new StackKey(new ItemStack(block, 1, 0)); - } - - public static StackKey stack(ItemStack itemStack) { - return new StackKey(itemStack); - } - - public static StackKey fluid(Fluid fluid, int amount) { - return new StackKey(new FluidStack(fluid, amount)); - } - - public static StackKey fluid(Fluid fluid) { - return new StackKey(new FluidStack(fluid, FluidContainerRegistry.BUCKET_VOLUME)); - } - - public static StackKey fluid(FluidStack fluidStack) { - return new StackKey(fluidStack); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || o.getClass() != StackKey.class) { - return false; - } - StackKey k = (StackKey) o; - if ((stack == null ^ k.stack == null) || (fluidStack == null ^ k.fluidStack == null)) { - return false; - } - if (stack != null) { - if (stack.getItem() != k.stack.getItem() || - stack.getHasSubtypes() && stack.getItemDamage() != k.stack.getItemDamage() || - !objectsEqual(stack.getTagCompound(), k.stack.getTagCompound())) { - return false; - } - } - if (fluidStack != null) { - if (fluidStack.getFluid().getID() != k.fluidStack.getFluid().getID() || - fluidStack.amount != k.fluidStack.amount || - !objectsEqual(fluidStack.tag, k.fluidStack.tag)) { - return false; - } - } - return true; - } - - @Override - public int hashCode() { - int result = 7; - if (stack != null) { - result = 31 * result + stack.getItem().hashCode(); - result = 31 * result + stack.getItemDamage(); - result = 31 * result + objectHashCode(stack.getTagCompound()); - } - result = 31 * result + 7; - if (fluidStack != null) { - result = 31 * result + fluidStack.getFluid().getID(); - result = 31 * result + fluidStack.amount; - result = 31 * result + objectHashCode(fluidStack.tag); - } - return result; - } - - private boolean objectsEqual(Object o1, Object o2) { - if (o1 == null && o2 == null) { - return true; - } else if (o1 == null || o2 == null) { - return false; - } else { - return o1.equals(o2); - } - } - - private int objectHashCode(Object o) { - return o != null ? o.hashCode() : 0; - } - - public StackKey copy() { - return new StackKey(stack != null ? stack.copy() : null, - fluidStack != null ? fluidStack.copy() : null); - } -} diff --git a/src/api/java/buildcraft/api/core/package-info.java b/src/api/java/buildcraft/api/core/package-info.java deleted file mode 100644 index 0fc4db4cc..000000000 --- a/src/api/java/buildcraft/api/core/package-info.java +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -@API(apiVersion = "1.5", owner = "BuildCraft|Core", provides = "BuildCraftAPI|core") -package buildcraft.api.core; -import cpw.mods.fml.common.API; - diff --git a/src/api/java/buildcraft/api/core/render/ICullable.java b/src/api/java/buildcraft/api/core/render/ICullable.java deleted file mode 100644 index b800c0851..000000000 --- a/src/api/java/buildcraft/api/core/render/ICullable.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * 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.core.render; - -import net.minecraft.world.IBlockAccess; -import net.minecraftforge.common.util.ForgeDirection; - -/* - * This interface designates a block as a state machine responsible for culling - * For implementation details look into FakeBlock implementation - */ -public interface ICullable { - - //Side Rendering States - //They are used to effectively cull obstructed sides while processing facades. - //Make sure your implementation is correct otherwise expect FPS drop - - void setRenderSide(ForgeDirection side, boolean render); - - void setRenderAllSides(); - - boolean shouldSideBeRendered(IBlockAccess blockAccess, int x, int y, int z, int side); - - void setRenderMask(int mask); - -} diff --git a/src/api/java/buildcraft/api/core/render/ITextureStateManager.java b/src/api/java/buildcraft/api/core/render/ITextureStateManager.java deleted file mode 100644 index 8161d6b93..000000000 --- a/src/api/java/buildcraft/api/core/render/ITextureStateManager.java +++ /dev/null @@ -1,7 +0,0 @@ -package buildcraft.api.core.render; - -import net.minecraft.util.IIcon; - -public interface ITextureStateManager { - void set(IIcon icon); -} diff --git a/src/api/java/buildcraft/api/core/render/ITextureStates.java b/src/api/java/buildcraft/api/core/render/ITextureStates.java deleted file mode 100644 index 835caf7fe..000000000 --- a/src/api/java/buildcraft/api/core/render/ITextureStates.java +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * 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.core.render; - -import net.minecraft.block.Block; -import net.minecraft.util.IIcon; - -public interface ITextureStates extends ICullable { - - ITextureStateManager getTextureState(); - - IIcon getIcon(int side, int meta); - - Block getBlock(); - -} diff --git a/src/api/java/buildcraft/api/gates/GateExpansionController.java b/src/api/java/buildcraft/api/gates/GateExpansionController.java deleted file mode 100644 index e37ae20a5..000000000 --- a/src/api/java/buildcraft/api/gates/GateExpansionController.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.gates; - -import java.util.List; - -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; - -import buildcraft.api.statements.IActionInternal; -import buildcraft.api.statements.IStatement; -import buildcraft.api.statements.IStatementParameter; -import buildcraft.api.statements.ITriggerInternal; - -public abstract class GateExpansionController { - - public final IGateExpansion type; - public final TileEntity pipeTile; - - public GateExpansionController(IGateExpansion type, TileEntity pipeTile) { - this.pipeTile = pipeTile; - this.type = type; - } - - public IGateExpansion getType() { - return type; - } - - public boolean isActive() { - return false; - } - - public void tick(IGate gate) { - } - - public void startResolution() { - } - - public boolean resolveAction(IStatement action, int count) { - return false; - } - - public boolean isTriggerActive(IStatement trigger, IStatementParameter[] parameters) { - return false; - } - - public void addTriggers(List list) { - } - - public void addActions(List list) { - } - - public void writeToNBT(NBTTagCompound nbt) { - } - - public void readFromNBT(NBTTagCompound nbt) { - } -} diff --git a/src/api/java/buildcraft/api/gates/GateExpansions.java b/src/api/java/buildcraft/api/gates/GateExpansions.java deleted file mode 100644 index bc667f58e..000000000 --- a/src/api/java/buildcraft/api/gates/GateExpansions.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.gates; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; - -import com.google.common.collect.HashBiMap; - -import net.minecraft.item.ItemStack; - -public final class GateExpansions { - private static final Map expansions = new HashMap(); - private static final ArrayList expansionIDs = new ArrayList(); - private static final Map recipes = HashBiMap.create(); - - private GateExpansions() { - } - - public static void registerExpansion(IGateExpansion expansion) { - registerExpansion(expansion.getUniqueIdentifier(), expansion); - } - - public static void registerExpansion(String identifier, IGateExpansion expansion) { - expansions.put(identifier, expansion); - expansionIDs.add(expansion); - } - - public static void registerExpansion(IGateExpansion expansion, ItemStack addedRecipe) { - registerExpansion(expansion.getUniqueIdentifier(), expansion); - recipes.put(expansion, addedRecipe); - } - - public static IGateExpansion getExpansion(String identifier) { - return expansions.get(identifier); - } - - public static Set getExpansions() { - Set set = new HashSet(); - set.addAll(expansionIDs); - return set; - } - - public static Map getRecipesForPostInit() { - return recipes; - } - - // The code below is used by networking. - - public static IGateExpansion getExpansionByID(int id) { - return expansionIDs.get(id); - } - - public static int getExpansionID(IGateExpansion expansion) { - return expansionIDs.indexOf(expansion); - } -} diff --git a/src/api/java/buildcraft/api/gates/IGate.java b/src/api/java/buildcraft/api/gates/IGate.java deleted file mode 100644 index 6127caadb..000000000 --- a/src/api/java/buildcraft/api/gates/IGate.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.gates; - -import java.util.List; - -import buildcraft.api.statements.IStatement; -import buildcraft.api.statements.IStatementParameter; -import buildcraft.api.statements.StatementSlot; -import buildcraft.api.statements.containers.ISidedStatementContainer; -import buildcraft.api.transport.IPipe; - -public interface IGate extends ISidedStatementContainer { - @Deprecated - void setPulsing(boolean pulse); - - IPipe getPipe(); - - List getTriggers(); - List getActions(); - - List getActiveActions(); - - List getTriggerParameters(int index); - List getActionParameters(int index); -} diff --git a/src/api/java/buildcraft/api/gates/IGateExpansion.java b/src/api/java/buildcraft/api/gates/IGateExpansion.java deleted file mode 100644 index ad61fad66..000000000 --- a/src/api/java/buildcraft/api/gates/IGateExpansion.java +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.gates; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; - -public interface IGateExpansion { - - String getUniqueIdentifier(); - - String getDisplayName(); - - GateExpansionController makeController(TileEntity pipeTile); - - void registerBlockOverlay(IIconRegister iconRegister); - - void registerItemOverlay(IIconRegister iconRegister); - - IIcon getOverlayBlock(); - - IIcon getOverlayItem(); -} diff --git a/src/api/java/buildcraft/api/gates/package-info.java b/src/api/java/buildcraft/api/gates/package-info.java deleted file mode 100644 index 83cb2a2c4..000000000 --- a/src/api/java/buildcraft/api/gates/package-info.java +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -@API(apiVersion = "4.1", owner = "BuildCraftAPI|core", provides = "BuildCraftAPI|gates") -package buildcraft.api.gates; -import cpw.mods.fml.common.API; - diff --git a/src/api/java/buildcraft/api/statements/ActionState.java b/src/api/java/buildcraft/api/statements/ActionState.java deleted file mode 100755 index 72e4d58ba..000000000 --- a/src/api/java/buildcraft/api/statements/ActionState.java +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.statements; - -public class ActionState { - -} diff --git a/src/api/java/buildcraft/api/statements/IActionExternal.java b/src/api/java/buildcraft/api/statements/IActionExternal.java deleted file mode 100644 index 1d6e2eb54..000000000 --- a/src/api/java/buildcraft/api/statements/IActionExternal.java +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.statements; - -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; - -public interface IActionExternal extends IStatement { - void actionActivate(TileEntity target, ForgeDirection side, IStatementContainer source, IStatementParameter[] parameters); -} diff --git a/src/api/java/buildcraft/api/statements/IActionInternal.java b/src/api/java/buildcraft/api/statements/IActionInternal.java deleted file mode 100644 index 6a019a459..000000000 --- a/src/api/java/buildcraft/api/statements/IActionInternal.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.statements; - -public interface IActionInternal extends IStatement { - - void actionActivate(IStatementContainer source, IStatementParameter[] parameters); - -} diff --git a/src/api/java/buildcraft/api/statements/IActionProvider.java b/src/api/java/buildcraft/api/statements/IActionProvider.java deleted file mode 100644 index 147d4d39d..000000000 --- a/src/api/java/buildcraft/api/statements/IActionProvider.java +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.statements; - -import java.util.Collection; - -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; - -public interface IActionProvider { - - /** - * Returns the list of actions that are available from the statement container holding the - * gate. - */ - Collection getInternalActions(IStatementContainer container); - - /** - * Returns the list of actions available to a gate next to the given block. - */ - Collection getExternalActions(ForgeDirection side, TileEntity tile); -} diff --git a/src/api/java/buildcraft/api/statements/IActionReceptor.java b/src/api/java/buildcraft/api/statements/IActionReceptor.java deleted file mode 100644 index db7cea027..000000000 --- a/src/api/java/buildcraft/api/statements/IActionReceptor.java +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.statements; - -public interface IActionReceptor { - void actionActivated(IStatement statement, IStatementParameter[] parameters); -} diff --git a/src/api/java/buildcraft/api/statements/IOverrideDefaultStatements.java b/src/api/java/buildcraft/api/statements/IOverrideDefaultStatements.java deleted file mode 100644 index c9c7db8ed..000000000 --- a/src/api/java/buildcraft/api/statements/IOverrideDefaultStatements.java +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.statements; - -import java.util.List; - -public interface IOverrideDefaultStatements { - List overrideTriggers(); - List overrideActions(); -} diff --git a/src/api/java/buildcraft/api/statements/IStatement.java b/src/api/java/buildcraft/api/statements/IStatement.java deleted file mode 100644 index e466efd2b..000000000 --- a/src/api/java/buildcraft/api/statements/IStatement.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.statements; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.util.IIcon; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -public interface IStatement { - /** - * Every statement needs a unique tag, it should be in the format of - * "<modid>:<name>. - * - * @return the unique id - */ - String getUniqueTag(); - - @SideOnly(Side.CLIENT) - IIcon getIcon(); - - @SideOnly(Side.CLIENT) - void registerIcons(IIconRegister iconRegister); - - /** - * Return the maximum number of parameter this statement can have, 0 if none. - */ - int maxParameters(); - - /** - * Return the minimum number of parameter this statement can have, 0 if none. - */ - int minParameters(); - - /** - * Return the statement description in the UI - */ - String getDescription(); - - /** - * Create parameters for the statement. - */ - IStatementParameter createParameter(int index); - - /** - * This returns the statement after a left rotation. Used in particular in - * blueprints orientation. - */ - IStatement rotateLeft(); -} diff --git a/src/api/java/buildcraft/api/statements/IStatementContainer.java b/src/api/java/buildcraft/api/statements/IStatementContainer.java deleted file mode 100644 index 43a4f51ef..000000000 --- a/src/api/java/buildcraft/api/statements/IStatementContainer.java +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.statements; - -import net.minecraft.tileentity.TileEntity; - -/** - * This is implemented by objects containing Statements, such as - * Gates and TileEntities. - */ -public interface IStatementContainer { - TileEntity getTile(); -} diff --git a/src/api/java/buildcraft/api/statements/IStatementParameter.java b/src/api/java/buildcraft/api/statements/IStatementParameter.java deleted file mode 100755 index 9a9e397cd..000000000 --- a/src/api/java/buildcraft/api/statements/IStatementParameter.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.statements; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.IIcon; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -public interface IStatementParameter { - - /** - * Every parameter needs a unique tag, it should be in the format of - * "<modi>:<name>". - * - * @return the unique id - */ - String getUniqueTag(); - - @SideOnly(Side.CLIENT) - IIcon getIcon(); - - ItemStack getItemStack(); - - /** - * Something that is initially unintuitive: you HAVE to - * keep your icons as static variables, due to the fact - * that every IStatementParameter is instantiated upon creation, - * in opposition to IStatements which are singletons (due to the - * fact that they, unlike Parameters, store no additional data) - */ - @SideOnly(Side.CLIENT) - void registerIcons(IIconRegister iconRegister); - - /** - * Return the parameter description in the UI - */ - String getDescription(); - - void onClick(IStatementContainer source, IStatement stmt, ItemStack stack, StatementMouseClick mouse); - - void readFromNBT(NBTTagCompound compound); - - void writeToNBT(NBTTagCompound compound); - - /** - * This returns the parameter after a left rotation. Used in particular in - * blueprints orientation. - */ - IStatementParameter rotateLeft(); -} diff --git a/src/api/java/buildcraft/api/statements/ITriggerExternal.java b/src/api/java/buildcraft/api/statements/ITriggerExternal.java deleted file mode 100644 index 532f67a5f..000000000 --- a/src/api/java/buildcraft/api/statements/ITriggerExternal.java +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.statements; - -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; - -public interface ITriggerExternal extends IStatement { - - boolean isTriggerActive(TileEntity target, ForgeDirection side, IStatementContainer source, IStatementParameter[] parameters); - -} diff --git a/src/api/java/buildcraft/api/statements/ITriggerExternalOverride.java b/src/api/java/buildcraft/api/statements/ITriggerExternalOverride.java deleted file mode 100644 index 7103c06ac..000000000 --- a/src/api/java/buildcraft/api/statements/ITriggerExternalOverride.java +++ /dev/null @@ -1,17 +0,0 @@ -package buildcraft.api.statements; - -import net.minecraftforge.common.util.ForgeDirection; - -/** - * This interface can be used by tiles to override external trigger - * behaviour. - * - * Please use wisely. - */ -public interface ITriggerExternalOverride { - public enum Result { - TRUE, FALSE, IGNORE - } - - Result override(ForgeDirection side, IStatementContainer source, IStatementParameter[] parameters); -} diff --git a/src/api/java/buildcraft/api/statements/ITriggerInternal.java b/src/api/java/buildcraft/api/statements/ITriggerInternal.java deleted file mode 100755 index a4241d3da..000000000 --- a/src/api/java/buildcraft/api/statements/ITriggerInternal.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.statements; - -public interface ITriggerInternal extends IStatement { - - boolean isTriggerActive(IStatementContainer source, IStatementParameter[] parameters); - -} diff --git a/src/api/java/buildcraft/api/statements/ITriggerProvider.java b/src/api/java/buildcraft/api/statements/ITriggerProvider.java deleted file mode 100644 index 548f107bf..000000000 --- a/src/api/java/buildcraft/api/statements/ITriggerProvider.java +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.statements; - -import java.util.Collection; - -import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.util.ForgeDirection; - -public interface ITriggerProvider { - - /** - * Returns the list of triggers that are available from the object holding the gate. - */ - Collection getInternalTriggers(IStatementContainer container); - - /** - * Returns the list of triggers available to a gate next to the given block. - */ - Collection getExternalTriggers(ForgeDirection side, TileEntity tile); - -} diff --git a/src/api/java/buildcraft/api/statements/StatementManager.java b/src/api/java/buildcraft/api/statements/StatementManager.java deleted file mode 100644 index fec7d9510..000000000 --- a/src/api/java/buildcraft/api/statements/StatementManager.java +++ /dev/null @@ -1,182 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.statements; - -import java.util.Collection; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.tileentity.TileEntity; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraftforge.common.util.ForgeDirection; - -public final class StatementManager { - - public static Map statements = new HashMap(); - public static Map> parameters = new HashMap>(); - private static List triggerProviders = new LinkedList(); - private static List actionProviders = new LinkedList(); - - /** - * Deactivate constructor - */ - private StatementManager() { - } - - public static void registerTriggerProvider(ITriggerProvider provider) { - if (provider != null && !triggerProviders.contains(provider)) { - triggerProviders.add(provider); - } - } - - public static void registerActionProvider(IActionProvider provider) { - if (provider != null && !actionProviders.contains(provider)) { - actionProviders.add(provider); - } - } - - public static void registerStatement(IStatement statement) { - statements.put(statement.getUniqueTag(), statement); - } - - public static void registerParameterClass(Class param) { - parameters.put(createParameter(param).getUniqueTag(), param); - } - - @Deprecated - public static void registerParameterClass(String name, Class param) { - parameters.put(name, param); - } - - public static List getExternalTriggers(ForgeDirection side, TileEntity entity) { - List result; - - if (entity instanceof IOverrideDefaultStatements) { - result = ((IOverrideDefaultStatements) entity).overrideTriggers(); - if (result != null) { - return result; - } - } - - result = new LinkedList(); - - for (ITriggerProvider provider : triggerProviders) { - Collection toAdd = provider.getExternalTriggers(side, entity); - - if (toAdd != null) { - for (ITriggerExternal t : toAdd) { - if (!result.contains(t)) { - result.add(t); - } - } - } - } - - return result; - } - - public static List getExternalActions(ForgeDirection side, TileEntity entity) { - List result = new LinkedList(); - - if (entity instanceof IOverrideDefaultStatements) { - result = ((IOverrideDefaultStatements) entity).overrideActions(); - if (result != null) { - return result; - } else { - result = new LinkedList(); - } - } - - for (IActionProvider provider : actionProviders) { - Collection toAdd = provider.getExternalActions(side, entity); - - if (toAdd != null) { - for (IActionExternal t : toAdd) { - if (!result.contains(t)) { - result.add(t); - } - } - } - } - - return result; - } - - public static List getInternalTriggers(IStatementContainer container) { - List result = new LinkedList(); - - for (ITriggerProvider provider : triggerProviders) { - Collection toAdd = provider.getInternalTriggers(container); - - if (toAdd != null) { - for (ITriggerInternal t : toAdd) { - if (!result.contains(t)) { - result.add(t); - } - } - } - } - - return result; - } - - public static List getInternalActions(IStatementContainer container) { - List result = new LinkedList(); - - for (IActionProvider provider : actionProviders) { - Collection toAdd = provider.getInternalActions(container); - - if (toAdd != null) { - for (IActionInternal t : toAdd) { - if (!result.contains(t)) { - result.add(t); - } - } - } - } - - return result; - } - - public static IStatementParameter createParameter(String kind) { - return createParameter(parameters.get(kind)); - } - - private static IStatementParameter createParameter(Class param) { - try { - return param.newInstance(); - } catch (InstantiationException e) { - e.printStackTrace(); - } catch (IllegalAccessException e) { - e.printStackTrace(); - } - - return null; - } - - /** - * Generally, this function should be called by every mod implementing - * the Statements API ***as a container*** (that is, adding its own gates) - * on the client side from a given Item of choice. - */ - @SideOnly(Side.CLIENT) - public static void registerIcons(IIconRegister register) { - for (IStatement statement : statements.values()) { - statement.registerIcons(register); - } - - for (Class parameter : parameters.values()) { - createParameter(parameter).registerIcons(register); - } - } -} diff --git a/src/api/java/buildcraft/api/statements/StatementMouseClick.java b/src/api/java/buildcraft/api/statements/StatementMouseClick.java deleted file mode 100644 index 54688ebb8..000000000 --- a/src/api/java/buildcraft/api/statements/StatementMouseClick.java +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.statements; - -public final class StatementMouseClick { - private int button; - private boolean shift; - - public StatementMouseClick(int button, boolean shift) { - this.button = button; - this.shift = shift; - } - - public boolean isShift() { - return shift; - } - - public int getButton() { - return button; - } -} diff --git a/src/api/java/buildcraft/api/statements/StatementParameterItemStack.java b/src/api/java/buildcraft/api/statements/StatementParameterItemStack.java deleted file mode 100755 index 3bccda5d3..000000000 --- a/src/api/java/buildcraft/api/statements/StatementParameterItemStack.java +++ /dev/null @@ -1,88 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.statements; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.IIcon; - -public class StatementParameterItemStack implements IStatementParameter { - - protected ItemStack stack; - - @Override - public IIcon getIcon() { - return null; - } - - @Override - public ItemStack getItemStack() { - return stack; - } - - @Override - public void onClick(IStatementContainer source, IStatement stmt, ItemStack stack, StatementMouseClick mouse) { - if (stack != null) { - this.stack = stack.copy(); - this.stack.stackSize = 1; - } else { - this.stack = null; - } - } - - @Override - public void writeToNBT(NBTTagCompound compound) { - if (stack != null) { - NBTTagCompound tagCompound = new NBTTagCompound(); - stack.writeToNBT(tagCompound); - compound.setTag("stack", tagCompound); - } - } - - @Override - public void readFromNBT(NBTTagCompound compound) { - stack = ItemStack.loadItemStackFromNBT(compound.getCompoundTag("stack")); - } - - @Override - public boolean equals(Object object) { - if (object instanceof StatementParameterItemStack) { - StatementParameterItemStack param = (StatementParameterItemStack) object; - - return ItemStack.areItemStacksEqual(stack, param.stack) - && ItemStack.areItemStackTagsEqual(stack, param.stack); - } else { - return false; - } - } - - @Override - public String getDescription() { - if (stack != null) { - return stack.getDisplayName(); - } else { - return ""; - } - } - - @Override - public String getUniqueTag() { - return "buildcraft:stack"; - } - - @Override - public void registerIcons(IIconRegister iconRegister) { - - } - - @Override - public IStatementParameter rotateLeft() { - return this; - } -} diff --git a/src/api/java/buildcraft/api/statements/StatementSlot.java b/src/api/java/buildcraft/api/statements/StatementSlot.java deleted file mode 100644 index 6d8c1c2ce..000000000 --- a/src/api/java/buildcraft/api/statements/StatementSlot.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * 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.statements; - -public class StatementSlot { - public IStatement statement; - public IStatementParameter[] parameters; - - @Override - public boolean equals(Object o) { - if (o == null || !(o instanceof StatementSlot)) { - return false; - } - StatementSlot s = (StatementSlot) o; - if (s.statement != statement || parameters.length != s.parameters.length) { - return false; - } - for (int i = 0; i < parameters.length; i++) { - IStatementParameter p1 = parameters[i]; - IStatementParameter p2 = s.parameters[i]; - if (p1 == null && p2 != null) { - return false; - } - if (!(p1.equals(p2))) { - return false; - } - } - return true; - } -} diff --git a/src/api/java/buildcraft/api/statements/containers/IRedstoneStatementContainer.java b/src/api/java/buildcraft/api/statements/containers/IRedstoneStatementContainer.java deleted file mode 100644 index 0856041cb..000000000 --- a/src/api/java/buildcraft/api/statements/containers/IRedstoneStatementContainer.java +++ /dev/null @@ -1,19 +0,0 @@ -package buildcraft.api.statements.containers; - -import net.minecraftforge.common.util.ForgeDirection; - -public interface IRedstoneStatementContainer { - /** - * Get the redstone input from a given side. - * @param side The side - use "UNKNOWN" for maximum input. - * @return The redstone input, from 0 to 15. - */ - int getRedstoneInput(ForgeDirection side); - - /** - * Set the redstone input for a given side. - * @param side The side - use "UNKNOWN" for all sides. - * @return Whether the set was successful. - */ - boolean setRedstoneOutput(ForgeDirection side, int value); -} diff --git a/src/api/java/buildcraft/api/statements/containers/ISidedStatementContainer.java b/src/api/java/buildcraft/api/statements/containers/ISidedStatementContainer.java deleted file mode 100644 index 6262bf2f8..000000000 --- a/src/api/java/buildcraft/api/statements/containers/ISidedStatementContainer.java +++ /dev/null @@ -1,12 +0,0 @@ -package buildcraft.api.statements.containers; - -import net.minecraftforge.common.util.ForgeDirection; - -import buildcraft.api.statements.IStatementContainer; - -/** - * Created by asie on 3/14/15. - */ -public interface ISidedStatementContainer extends IStatementContainer { - ForgeDirection getSide(); -} diff --git a/src/api/java/buildcraft/api/statements/package-info.java b/src/api/java/buildcraft/api/statements/package-info.java deleted file mode 100644 index ed7613ea2..000000000 --- a/src/api/java/buildcraft/api/statements/package-info.java +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -@API(apiVersion = "1.1", owner = "BuildCraftAPI|core", provides = "BuildCraftAPI|statements") -package buildcraft.api.statements; -import cpw.mods.fml.common.API; - diff --git a/src/api/java/buildcraft/api/transport/IInjectable.java b/src/api/java/buildcraft/api/transport/IInjectable.java deleted file mode 100644 index 6a05a688a..000000000 --- a/src/api/java/buildcraft/api/transport/IInjectable.java +++ /dev/null @@ -1,23 +0,0 @@ -package buildcraft.api.transport; - -import net.minecraft.item.ItemStack; -import net.minecraftforge.common.util.ForgeDirection; - -import buildcraft.api.core.EnumColor; - -public interface IInjectable { - boolean canInjectItems(ForgeDirection from); - - /** - * Offers an ItemStack for 3addition to the pipe. Will be rejected if the - * pipe doesn't accept items from that side. - * - * @param stack ItemStack offered for addition. Do not manipulate this! - * @param doAdd If false no actual addition should take place. Implementors - * should simulate. - * @param from Orientation the ItemStack is offered from. - * @param color The color of the item to be added to the pipe, or null for no color. - * @return Amount of items used from the passed stack. - */ - int injectItem(ItemStack stack, boolean doAdd, ForgeDirection from, EnumColor color); -} diff --git a/src/api/java/buildcraft/api/transport/IItemPipe.java b/src/api/java/buildcraft/api/transport/IItemPipe.java deleted file mode 100644 index f5f766775..000000000 --- a/src/api/java/buildcraft/api/transport/IItemPipe.java +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * 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.transport; - -/** - * To be implemented by the real item pipe in Transport mod, but leaves knowledge for classes that do not have direct dependency on transport. - */ -public interface IItemPipe { - -} diff --git a/src/api/java/buildcraft/api/transport/IPipe.java b/src/api/java/buildcraft/api/transport/IPipe.java deleted file mode 100755 index 94b021d02..000000000 --- a/src/api/java/buildcraft/api/transport/IPipe.java +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.transport; - -import net.minecraftforge.common.util.ForgeDirection; - -import buildcraft.api.gates.IGate; - -public interface IPipe { - IPipeTile getTile(); - - IGate getGate(ForgeDirection side); - - boolean hasGate(ForgeDirection side); - - boolean isWired(PipeWire wire); - - boolean isWireActive(PipeWire wire); -} diff --git a/src/api/java/buildcraft/api/transport/IPipeConnection.java b/src/api/java/buildcraft/api/transport/IPipeConnection.java deleted file mode 100644 index 4899f24bd..000000000 --- a/src/api/java/buildcraft/api/transport/IPipeConnection.java +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.transport; - -import net.minecraftforge.common.util.ForgeDirection; - -public interface IPipeConnection { - - enum ConnectOverride { - - CONNECT, DISCONNECT, DEFAULT - } - - /** - * Allows you to override pipe connection logic. - * - * @param type - * @param with - * @return CONNECT to force a connection, DISCONNECT to force no connection, - * and DEFAULT to let the pipe decide. - */ - ConnectOverride overridePipeConnection(IPipeTile.PipeType type, ForgeDirection with); -} diff --git a/src/api/java/buildcraft/api/transport/IPipeTile.java b/src/api/java/buildcraft/api/transport/IPipeTile.java deleted file mode 100644 index 1bdd04f09..000000000 --- a/src/api/java/buildcraft/api/transport/IPipeTile.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.transport; - -import net.minecraft.block.Block; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; - -import buildcraft.api.core.EnumColor; -import buildcraft.api.transport.pluggable.PipePluggable; - -public interface IPipeTile extends IInjectable { - enum PipeType { - ITEM, FLUID, POWER, STRUCTURE - } - - PipeType getPipeType(); - - World getWorld(); - - int x(); - - int y(); - - int z(); - - /** - * True if the pipe is connected to the block/pipe in the specific direction - * - * @param with - * @return true if connect - */ - boolean isPipeConnected(ForgeDirection with); - - Block getNeighborBlock(ForgeDirection dir); - TileEntity getNeighborTile(ForgeDirection dir); - IPipe getNeighborPipe(ForgeDirection dir); - - IPipe getPipe(); - int getPipeColor(); - - PipePluggable getPipePluggable(ForgeDirection direction); // Now in IPluggableProvider - boolean hasPipePluggable(ForgeDirection direction); // Now in IPluggableProvider - boolean hasBlockingPluggable(ForgeDirection direction); - - void scheduleNeighborChange(); - void scheduleRenderUpdate(); - - // For compatibility with BC 6.2.x and below - int injectItem(ItemStack stack, boolean doAdd, ForgeDirection from, EnumColor color); - - @Deprecated // Now in IInjectable - int injectItem(ItemStack stack, boolean doAdd, ForgeDirection from); -} diff --git a/src/api/java/buildcraft/api/transport/IStripesActivator.java b/src/api/java/buildcraft/api/transport/IStripesActivator.java deleted file mode 100644 index 47308ae0a..000000000 --- a/src/api/java/buildcraft/api/transport/IStripesActivator.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.transport; - -import net.minecraft.item.ItemStack; -import net.minecraftforge.common.util.ForgeDirection; - -public interface IStripesActivator { - void sendItem(ItemStack itemStack, ForgeDirection direction); - void dropItem(ItemStack itemStack, ForgeDirection direction); -} diff --git a/src/api/java/buildcraft/api/transport/IStripesHandler.java b/src/api/java/buildcraft/api/transport/IStripesHandler.java deleted file mode 100644 index a9cc011f6..000000000 --- a/src/api/java/buildcraft/api/transport/IStripesHandler.java +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.transport; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; -import net.minecraftforge.common.util.ForgeDirection; - -public interface IStripesHandler { - enum StripesHandlerType { - ITEM_USE, - BLOCK_BREAK - } - - StripesHandlerType getType(); - - boolean shouldHandle(ItemStack stack); - - boolean handle(World world, int x, int y, int z, ForgeDirection direction, - ItemStack stack, EntityPlayer player, IStripesActivator activator); -} diff --git a/src/api/java/buildcraft/api/transport/IStripesPipe.java b/src/api/java/buildcraft/api/transport/IStripesPipe.java deleted file mode 100644 index 30a8452d5..000000000 --- a/src/api/java/buildcraft/api/transport/IStripesPipe.java +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.transport; - -public interface IStripesPipe extends IPipe, IStripesActivator { -} diff --git a/src/api/java/buildcraft/api/transport/PipeManager.java b/src/api/java/buildcraft/api/transport/PipeManager.java deleted file mode 100755 index 896f08210..000000000 --- a/src/api/java/buildcraft/api/transport/PipeManager.java +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.transport; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import net.minecraft.world.World; - -import buildcraft.api.transport.pluggable.PipePluggable; - -public abstract class PipeManager { - - public static List stripesHandlers = new ArrayList(); - public static ArrayList> pipePluggables = new ArrayList>(); - private static Map> pipePluggableNames = - new HashMap>(); - private static Map, String> pipePluggableByNames = - new HashMap, String>(); - private static Map stripesHandlerPriorities = - new HashMap(); - - @Deprecated - public static boolean canExtractItems(Object extractor, World world, int i, int j, int k) { - return true; - } - - @Deprecated - public static boolean canExtractFluids(Object extractor, World world, int i, int j, int k) { - return true; - } - - @Deprecated - public static void registerStripesHandler(IStripesHandler handler) { - registerStripesHandler(handler, 0); - } - - /** - * Register a Stripes Pipe handler. - * @param handler The handler. - * @param priority The priority - 0 is normal, higher numbers have higher priority. - */ - public static void registerStripesHandler(IStripesHandler handler, int priority) { - stripesHandlers.add(handler); - stripesHandlerPriorities.put(handler, priority); - - Collections.sort(stripesHandlers, new Comparator() { - @Override - public int compare(IStripesHandler o1, IStripesHandler o2) { - return stripesHandlerPriorities.get(o2) - stripesHandlerPriorities.get(o1); - } - }); - } - - public static void registerPipePluggable(Class pluggable, String name) { - pipePluggables.add(pluggable); - pipePluggableNames.put(name, pluggable); - pipePluggableByNames.put(pluggable, name); - } - - public static Class getPluggableByName(String pluggableName) { - return pipePluggableNames.get(pluggableName); - } - - public static String getPluggableName(Class aClass) { - return pipePluggableByNames.get(aClass); - } -} diff --git a/src/api/java/buildcraft/api/transport/PipeWire.java b/src/api/java/buildcraft/api/transport/PipeWire.java deleted file mode 100644 index eb8665e15..000000000 --- a/src/api/java/buildcraft/api/transport/PipeWire.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.transport; - -import java.util.Locale; - -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -public enum PipeWire { - - RED, BLUE, GREEN, YELLOW; - public static Item item; - public static final PipeWire[] VALUES = values(); - - public PipeWire reverse() { - switch (this) { - case RED: - return YELLOW; - case BLUE: - return GREEN; - case GREEN: - return BLUE; - default: - return RED; - } - } - - public String getTag() { - return name().toLowerCase(Locale.ENGLISH) + "PipeWire"; - } - - public String getColor() { - String name = this.toString().toLowerCase(Locale.ENGLISH); - char first = Character.toUpperCase(name.charAt(0)); - return first + name.substring(1); - } - - public ItemStack getStack() { - return getStack(1); - } - - public ItemStack getStack(int qty) { - if (item == null) { - return null; - } else { - return new ItemStack(item, qty, ordinal()); - } - } - - public boolean isPipeWire(ItemStack stack) { - if (stack == null) { - return false; - } else if (stack.getItem() != item) { - return false; - } else { - return stack.getItemDamage() == ordinal(); - } - } - - public static PipeWire fromOrdinal(int ordinal) { - if (ordinal < 0 || ordinal >= VALUES.length) { - return RED; - } else { - return VALUES[ordinal]; - } - } -} diff --git a/src/api/java/buildcraft/api/transport/package-info.java b/src/api/java/buildcraft/api/transport/package-info.java deleted file mode 100644 index b670143c6..000000000 --- a/src/api/java/buildcraft/api/transport/package-info.java +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -@API(apiVersion = "4.1", owner = "BuildCraftAPI|core", provides = "BuildCraftAPI|transport") -package buildcraft.api.transport; -import cpw.mods.fml.common.API; - diff --git a/src/api/java/buildcraft/api/transport/pluggable/IFacadePluggable.java b/src/api/java/buildcraft/api/transport/pluggable/IFacadePluggable.java deleted file mode 100644 index 6289714ac..000000000 --- a/src/api/java/buildcraft/api/transport/pluggable/IFacadePluggable.java +++ /dev/null @@ -1,13 +0,0 @@ -package buildcraft.api.transport.pluggable; - -import net.minecraft.block.Block; - -public interface IFacadePluggable { - Block getCurrentBlock(); - - int getCurrentMetadata(); - - boolean isTransparent(); - - boolean isHollow(); -} diff --git a/src/api/java/buildcraft/api/transport/pluggable/IPipePluggableDynamicRenderer.java b/src/api/java/buildcraft/api/transport/pluggable/IPipePluggableDynamicRenderer.java deleted file mode 100644 index 614c65ff9..000000000 --- a/src/api/java/buildcraft/api/transport/pluggable/IPipePluggableDynamicRenderer.java +++ /dev/null @@ -1,9 +0,0 @@ -package buildcraft.api.transport.pluggable; - -import net.minecraftforge.common.util.ForgeDirection; - -import buildcraft.api.transport.IPipe; - -public interface IPipePluggableDynamicRenderer { - void renderPluggable(IPipe pipe, ForgeDirection side, PipePluggable pipePluggable, double x, double y, double z); -} diff --git a/src/api/java/buildcraft/api/transport/pluggable/IPipePluggableItem.java b/src/api/java/buildcraft/api/transport/pluggable/IPipePluggableItem.java deleted file mode 100644 index 0ac208905..000000000 --- a/src/api/java/buildcraft/api/transport/pluggable/IPipePluggableItem.java +++ /dev/null @@ -1,10 +0,0 @@ -package buildcraft.api.transport.pluggable; - -import net.minecraft.item.ItemStack; -import net.minecraftforge.common.util.ForgeDirection; - -import buildcraft.api.transport.IPipe; - -public interface IPipePluggableItem { - PipePluggable createPipePluggable(IPipe pipe, ForgeDirection side, ItemStack stack); -} diff --git a/src/api/java/buildcraft/api/transport/pluggable/IPipePluggableRenderer.java b/src/api/java/buildcraft/api/transport/pluggable/IPipePluggableRenderer.java deleted file mode 100644 index 2cd4bc276..000000000 --- a/src/api/java/buildcraft/api/transport/pluggable/IPipePluggableRenderer.java +++ /dev/null @@ -1,13 +0,0 @@ -package buildcraft.api.transport.pluggable; - -import net.minecraft.client.renderer.RenderBlocks; -import net.minecraftforge.common.util.ForgeDirection; - -import buildcraft.api.core.render.ITextureStates; -import buildcraft.api.transport.IPipe; - -public interface IPipePluggableRenderer { - void renderPluggable(RenderBlocks renderblocks, IPipe pipe, ForgeDirection side, - PipePluggable pipePluggable, ITextureStates blockStateMachine, - int renderPass, int x, int y, int z); -} diff --git a/src/api/java/buildcraft/api/transport/pluggable/PipePluggable.java b/src/api/java/buildcraft/api/transport/pluggable/PipePluggable.java deleted file mode 100644 index 223ce7096..000000000 --- a/src/api/java/buildcraft/api/transport/pluggable/PipePluggable.java +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * The BuildCraft API is distributed under the terms of the MIT License. - * Please check the contents of the license, which should be located - * as "LICENSE.API" in the BuildCraft source code distribution. - */ -package buildcraft.api.transport.pluggable; - -import net.minecraft.item.ItemStack; -import net.minecraft.util.AxisAlignedBB; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraftforge.common.util.ForgeDirection; - -import buildcraft.api.core.INBTStoreable; -import buildcraft.api.core.ISerializable; -import buildcraft.api.transport.IPipeTile; - -/** - * An IPipePluggable MUST have an empty constructor for client-side - * rendering! - */ -public abstract class PipePluggable implements INBTStoreable, ISerializable { - public abstract ItemStack[] getDropItems(IPipeTile pipe); - - public void update(IPipeTile pipe, ForgeDirection direction) { - - } - - public void onAttachedPipe(IPipeTile pipe, ForgeDirection direction) { - validate(pipe, direction); - } - - public void onDetachedPipe(IPipeTile pipe, ForgeDirection direction) { - invalidate(); - } - - public abstract boolean isBlocking(IPipeTile pipe, ForgeDirection direction); - - public void invalidate() { - - } - - public void validate(IPipeTile pipe, ForgeDirection direction) { - - } - - public boolean isSolidOnSide(IPipeTile pipe, ForgeDirection direction) { - return false; - } - - public abstract AxisAlignedBB getBoundingBox(ForgeDirection side); - - @SideOnly(Side.CLIENT) - public abstract IPipePluggableRenderer getRenderer(); - - @SideOnly(Side.CLIENT) - public IPipePluggableDynamicRenderer getDynamicRenderer() { - return null; - } - - public boolean requiresRenderUpdate(PipePluggable old) { - return true; - } -} diff --git a/src/api/java/cofh/api/energy/IEnergyConnection.java b/src/api/java/cofh/api/energy/IEnergyConnection.java deleted file mode 100644 index fd2968537..000000000 --- a/src/api/java/cofh/api/energy/IEnergyConnection.java +++ /dev/null @@ -1,21 +0,0 @@ -package cofh.api.energy; - -import net.minecraftforge.common.util.ForgeDirection; - -/** - * Implement this interface on TileEntities which should connect to energy transportation blocks. This is intended for blocks which generate energy but do not - * accept it; otherwise just use IEnergyHandler. - * - * Note that {@link IEnergyHandler} is an extension of this. - * - * @author King Lemming - * - */ -public interface IEnergyConnection { - - /** - * Returns TRUE if the TileEntity can connect on a given side. - */ - boolean canConnectEnergy(ForgeDirection from); - -} \ No newline at end of file diff --git a/src/api/java/cofh/api/energy/IEnergyReceiver.java b/src/api/java/cofh/api/energy/IEnergyReceiver.java deleted file mode 100644 index a048056b8..000000000 --- a/src/api/java/cofh/api/energy/IEnergyReceiver.java +++ /dev/null @@ -1,38 +0,0 @@ -package cofh.api.energy; - -import net.minecraftforge.common.util.ForgeDirection; - -/** - * Implement this interface on Tile Entities which should receive energy, generally storing it in one or more internal {@link IEnergyStorage} objects. - *

- * A reference implementation is provided {@link TileEnergyHandler}. - * - * @author King Lemming - * - */ -public interface IEnergyReceiver extends IEnergyConnection { - - /** - * Add energy to an IEnergyReceiver, internal distribution is left entirely to the IEnergyReceiver. - * - * @param from - * Orientation the energy is received from. - * @param maxReceive - * Maximum amount of energy to receive. - * @param simulate - * If TRUE, the charge will only be simulated. - * @return Amount of energy that was (or would have been, if simulated) received. - */ - int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate); - - /** - * Returns the amount of energy currently stored. - */ - int getEnergyStored(ForgeDirection from); - - /** - * Returns the maximum amount of energy that can be stored. - */ - int getMaxEnergyStored(ForgeDirection from); - -} diff --git a/src/api/java/com/jaquadro/minecraft/storagedrawers/api/inventory/IDrawerInventory.java b/src/api/java/com/jaquadro/minecraft/storagedrawers/api/inventory/IDrawerInventory.java deleted file mode 100644 index 47396c799..000000000 --- a/src/api/java/com/jaquadro/minecraft/storagedrawers/api/inventory/IDrawerInventory.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.jaquadro.minecraft.storagedrawers.api.inventory; - -import net.minecraft.inventory.ISidedInventory; -import net.minecraft.item.ItemStack; - -public interface IDrawerInventory extends ISidedInventory -{ - /** - * Gets a drawer's group slot index from an IInventory slot index. - * - * @param inventorySlot An IInventory slot index returned from getInventorySlot. - */ - int getDrawerSlot (int inventorySlot); - - /** - * Gets an IInventory slot index suitable for operations for the given type. - * - * @param drawerSlot The index of the drawer within its group. - * @param type The type of IInventory slot to return an index for. - */ - int getInventorySlot (int drawerSlot, SlotType type); - - /** - * Gets the type associated with a given IInventory slot index. - * - * @param inventorySlot An IInventory slot index returned from getInventorySlot. - */ - SlotType getInventorySlotType (int inventorySlot); - - boolean canInsertItem (int slot, ItemStack stack); - - boolean canExtractItem (int slot, ItemStack stack); - - boolean syncInventoryIfNeeded (); -} diff --git a/src/api/java/com/jaquadro/minecraft/storagedrawers/api/inventory/SlotType.java b/src/api/java/com/jaquadro/minecraft/storagedrawers/api/inventory/SlotType.java deleted file mode 100644 index dbb002ed8..000000000 --- a/src/api/java/com/jaquadro/minecraft/storagedrawers/api/inventory/SlotType.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.jaquadro.minecraft.storagedrawers.api.inventory; - -/** - * Classifies different IInventory slots according to how they should be used. - */ -public enum SlotType -{ - /** An inventory slot for input-only operations; stack sizes artificially held low. */ - INPUT, - - /** An inventory slot for output-only operations; stack sizes artificially held high. */ - OUTPUT; - - public static final SlotType[] values = values(); -} diff --git a/src/api/java/com/jaquadro/minecraft/storagedrawers/api/storage/IDrawer.java b/src/api/java/com/jaquadro/minecraft/storagedrawers/api/storage/IDrawer.java deleted file mode 100644 index 9afb8b20f..000000000 --- a/src/api/java/com/jaquadro/minecraft/storagedrawers/api/storage/IDrawer.java +++ /dev/null @@ -1,110 +0,0 @@ -package com.jaquadro.minecraft.storagedrawers.api.storage; - -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -public interface IDrawer -{ - /** - * Gets an ItemStack of size 1 representing the type, metadata, and tags of the stored items. - * The returned ItemStack should not be modified for any reason. Make a copy if you need to store or modify it. - */ - ItemStack getStoredItemPrototype (); - - /** - * Gets an ItemStack initialized to the number of items stored in this drawer. - * The returned ItemStack is guaranteed to be a new copy and can be used for any purpose. Does not affect drawer contents. - */ - ItemStack getStoredItemCopy (); - - /** - * Sets the type of the stored item and initializes it to the given amount. Any existing item will be replaced. - * - * @param itemPrototype An ItemStack representing the type, metadata, and tags of the item to store. - * @param amount The amount to initialize the stored item count to. - */ - void setStoredItem (ItemStack itemPrototype, int amount); - - /** - * Gets the number of items stored in this drawer. - */ - int getStoredItemCount (); - - /** - * Sets the number of items stored in this drawer. Triggers syncing of inventories and client data. - * Setting a drawer's count to 0 may also result in the item type being cleared, depending in implementation. - * - * @param amount The new amount of items stored in this drawer. - */ - void setStoredItemCount (int amount); - - /** - * Gets the maximum number of items that can be stored in this drawer. - * This value will vary depending on the max stack size of the stored item type. - */ - int getMaxCapacity (); - - /** - * Gets the maximum number of items that could be stored in this drawer if it held the given item. - * - * @param itemPrototype The item type to query. - */ - int getMaxCapacity (ItemStack itemPrototype); - - /** - * Gets the number of items that could still be added to this drawer before it is full. - */ - int getRemainingCapacity (); - - /** - * Gets the max stack size of the item type stored in this drawer. Convenience method. - */ - int getStoredItemStackSize (); - - /** - * Gets whether or not an item of the given type and data can be stored in this drawer. - * - * Stack size and available capacity are not considered. For drawers that are not empty, this - * method can allow ore-dictionary compatible items to be accepted into the drawer, as defined by what - * the drawer considers to be an equivalent item. - * For drawers that are empty, locking status is considered. - * - * @param itemPrototype An ItemStack representing the type, metadata, and tags of an item. - */ - boolean canItemBeStored (ItemStack itemPrototype); - - /** - * Gets whether or not an item of the given type and data can be extracted from this drawer. - * - * This is intended to allow outbound ore-dictionary conversions of compatible items, as defined by what - * the drawer considers to be an equivalent item. - * - * @param itemPrototype An ItemStack representing the type, metadata, and tags of an item. - */ - boolean canItemBeExtracted (ItemStack itemPrototype); - - /** - * Gets whether or not the drawer has items. - * A drawer set with an item type and 0 count is not considered empty. - */ - boolean isEmpty (); - - /** - * Gets auxiliary data that has been associated with this drawer. - * - * @param key The key used to identify the data. - * @return An opaque object that was previously stored. - */ - Object getExtendedData (String key); - - /** - * Stores auxiliary data with this drawer, mainly for use in integration. - * @param key The key to identify the data with. - * @param data The data to store. - */ - void setExtendedData (String key, Object data); - - void writeToNBT (NBTTagCompound tag); - - void readFromNBT (NBTTagCompound tag); -} diff --git a/src/api/java/com/jaquadro/minecraft/storagedrawers/api/storage/IDrawerGroup.java b/src/api/java/com/jaquadro/minecraft/storagedrawers/api/storage/IDrawerGroup.java deleted file mode 100644 index 1f1eefef9..000000000 --- a/src/api/java/com/jaquadro/minecraft/storagedrawers/api/storage/IDrawerGroup.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.jaquadro.minecraft.storagedrawers.api.storage; - -import com.jaquadro.minecraft.storagedrawers.api.inventory.IDrawerInventory; - -public interface IDrawerGroup -{ - /** - * Gets the number of drawers contained within this group. - */ - int getDrawerCount (); - - /** - * Gets the drawer at the given slot within this group. - */ - IDrawer getDrawer (int slot); - - /** - * Gets whether the drawer in the given slot is usable. - */ - boolean isDrawerEnabled (int slot); - - IDrawerInventory getDrawerInventory (); - - boolean markDirtyIfNeeded (); -} diff --git a/src/api/java/mods/railcraft/api/core/items/IMinecartItem.java b/src/api/java/mods/railcraft/api/core/items/IMinecartItem.java deleted file mode 100644 index 8f8652022..000000000 --- a/src/api/java/mods/railcraft/api/core/items/IMinecartItem.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * ****************************************************************************** - * Copyright 2011-2015 CovertJaguar - * - * This work (the API) is licensed under the "MIT" License, see LICENSE.md for details. - * *************************************************************************** - */ - -package mods.railcraft.api.core.items; - -import com.mojang.authlib.GameProfile; -import net.minecraft.entity.item.EntityMinecart; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -/** - * This interface should be implemented by any cart item, - * but it is generally optional. - * - * @author CovertJaguar - */ -public interface IMinecartItem -{ - - /** - * Controls whether this cart item can be placed by the Cart and Train Dispensers. - * - * Generally, you can ignore the placeCart() function if this returns false. - * - * @param cart - * @return true if it can be placed, false otherwise - */ - public boolean canBePlacedByNonPlayer(ItemStack cart); - - /** - * Places a cart at the specified location. - * - * Implementing this function is optional. - * - * @param owner the name of the player placing the cart or "[MyMod]" with the brackets - * @param cart An ItemStack that contains the cart - * @param world The World - * @param i x-Coord - * @param j y-Coord - * @param k z-Coord - * @return the cart placed or null if failed - */ - public EntityMinecart placeCart(GameProfile owner, ItemStack cart, World world, int i, int j, int k); -} \ No newline at end of file diff --git a/src/api/java/powercrystals/minefactoryreloaded/api/IDeepStorageUnit.java b/src/api/java/powercrystals/minefactoryreloaded/api/IDeepStorageUnit.java deleted file mode 100644 index 4626f71ea..000000000 --- a/src/api/java/powercrystals/minefactoryreloaded/api/IDeepStorageUnit.java +++ /dev/null @@ -1,29 +0,0 @@ -package powercrystals.minefactoryreloaded.api; - -import net.minecraft.item.ItemStack; - -public interface IDeepStorageUnit -{ - /** - * @return A populated ItemStack with stackSize for the full amount of materials in the DSU. - * May have a stackSize > getMaxStackSize(). May have a stackSize of 0 (indicating locked contents). - */ - ItemStack getStoredItemType(); - - /** - * Sets the total amount of the item currently being stored, or zero if all items are to be removed. - */ - void setStoredItemCount(int amount); - - /** - * Sets the type of the stored item and initializes the number of stored items to amount. - * Will overwrite any existing stored items. - */ - void setStoredItemType(ItemStack type, int amount); - - /** - * @return The maximum number of items the DSU can hold. - * May change based on the current type stored. - */ - int getMaxStoredCount(); -} \ No newline at end of file diff --git a/src/api/java/thaumcraft/api/IGoggles.java b/src/api/java/thaumcraft/api/IGoggles.java deleted file mode 100644 index 2f53d8163..000000000 --- a/src/api/java/thaumcraft/api/IGoggles.java +++ /dev/null @@ -1,22 +0,0 @@ -package thaumcraft.api; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.ItemStack; - -/** - * - * @author Azanor - * - * Equipped head slot items that extend this class will be able to perform most functions that - * goggles of revealing can apart from view nodes which is handled by IRevealer. - * - */ - -public interface IGoggles { - - /* - * If this method returns true things like block essentia contents will be shown. - */ - public boolean showIngamePopups(ItemStack itemstack, EntityLivingBase player); - -} diff --git a/src/api/java/thaumcraft/api/IRunicArmor.java b/src/api/java/thaumcraft/api/IRunicArmor.java deleted file mode 100644 index 5dd311006..000000000 --- a/src/api/java/thaumcraft/api/IRunicArmor.java +++ /dev/null @@ -1,22 +0,0 @@ -package thaumcraft.api; - -import net.minecraft.item.ItemStack; - -/** - * - * @author Azanor - * - * Armor or bauble slot items that implement this interface can provide runic shielding. - * Recharging, hardening, etc. is handled internally by thaumcraft. - * - */ - -public interface IRunicArmor { - - /** - * returns how much charge this item can provide. This is the base shielding value - any hardening is stored and calculated internally. - */ - public int getRunicCharge(ItemStack itemstack); - - -} diff --git a/src/api/java/thaumcraft/api/IScribeTools.java b/src/api/java/thaumcraft/api/IScribeTools.java deleted file mode 100644 index 7a450056e..000000000 --- a/src/api/java/thaumcraft/api/IScribeTools.java +++ /dev/null @@ -1,14 +0,0 @@ -package thaumcraft.api; - - -/** - * - * @author Azanor - * - * Interface used to identify scribing tool items used in research table - * - */ - -public interface IScribeTools { - -} \ No newline at end of file diff --git a/src/api/java/thaumcraft/api/crafting/IInfusionStabiliser.java b/src/api/java/thaumcraft/api/crafting/IInfusionStabiliser.java deleted file mode 100644 index 768b25ffc..000000000 --- a/src/api/java/thaumcraft/api/crafting/IInfusionStabiliser.java +++ /dev/null @@ -1,19 +0,0 @@ -package thaumcraft.api.crafting; - -import net.minecraft.world.World; - -/** - * - * @author Azanor - * - * Blocks that implement this interface act as infusion crafting stabilisers like candles and skulls - * - */ -public interface IInfusionStabiliser { - - /** - * returns true if the block can stabilise things - */ - public boolean canStabaliseInfusion(World world, int x, int y, int z); - -} \ No newline at end of file diff --git a/src/api/java/thaumcraft/api/nodes/IRevealer.java b/src/api/java/thaumcraft/api/nodes/IRevealer.java deleted file mode 100644 index 14a19b54d..000000000 --- a/src/api/java/thaumcraft/api/nodes/IRevealer.java +++ /dev/null @@ -1,22 +0,0 @@ -package thaumcraft.api.nodes; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.ItemStack; - -/** - * - * @author Azanor - * - * Equipped head slot items that extend this class will make nodes visible in world. - * - */ - -public interface IRevealer { - - /* - * If this method returns true the nodes will be visible. - */ - public boolean showNodes(ItemStack itemstack, EntityLivingBase player); - - -}