diff --git a/common/buildcraft/api/blueprints/IBuilderContext.java b/api/buildcraft/api/blueprints/IBuilderContext.java similarity index 100% rename from common/buildcraft/api/blueprints/IBuilderContext.java rename to api/buildcraft/api/blueprints/IBuilderContext.java diff --git a/common/buildcraft/api/blueprints/ITileBuilder.java b/api/buildcraft/api/blueprints/ITileBuilder.java similarity index 100% rename from common/buildcraft/api/blueprints/ITileBuilder.java rename to api/buildcraft/api/blueprints/ITileBuilder.java diff --git a/common/buildcraft/api/blueprints/MappingRegistry.java b/api/buildcraft/api/blueprints/MappingRegistry.java similarity index 100% rename from common/buildcraft/api/blueprints/MappingRegistry.java rename to api/buildcraft/api/blueprints/MappingRegistry.java diff --git a/common/buildcraft/api/blueprints/Schematic.java b/api/buildcraft/api/blueprints/Schematic.java similarity index 99% rename from common/buildcraft/api/blueprints/Schematic.java rename to api/buildcraft/api/blueprints/Schematic.java index 556e51e9..75490869 100755 --- a/common/buildcraft/api/blueprints/Schematic.java +++ b/api/buildcraft/api/blueprints/Schematic.java @@ -15,7 +15,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraftforge.common.util.Constants; -import buildcraft.core.inventory.InventoryIterator.IInvSlot; +import buildcraft.api.core.IInvSlot; /** * This class allow to specify specific behavior for blocks stored in diff --git a/common/buildcraft/api/blueprints/SchematicBlock.java b/api/buildcraft/api/blueprints/SchematicBlock.java similarity index 100% rename from common/buildcraft/api/blueprints/SchematicBlock.java rename to api/buildcraft/api/blueprints/SchematicBlock.java diff --git a/common/buildcraft/api/blueprints/SchematicBlockBase.java b/api/buildcraft/api/blueprints/SchematicBlockBase.java similarity index 100% rename from common/buildcraft/api/blueprints/SchematicBlockBase.java rename to api/buildcraft/api/blueprints/SchematicBlockBase.java diff --git a/common/buildcraft/api/blueprints/SchematicEntity.java b/api/buildcraft/api/blueprints/SchematicEntity.java similarity index 100% rename from common/buildcraft/api/blueprints/SchematicEntity.java rename to api/buildcraft/api/blueprints/SchematicEntity.java diff --git a/common/buildcraft/api/blueprints/SchematicFactory.java b/api/buildcraft/api/blueprints/SchematicFactory.java similarity index 100% rename from common/buildcraft/api/blueprints/SchematicFactory.java rename to api/buildcraft/api/blueprints/SchematicFactory.java diff --git a/common/buildcraft/api/blueprints/SchematicFactoryBlock.java b/api/buildcraft/api/blueprints/SchematicFactoryBlock.java similarity index 100% rename from common/buildcraft/api/blueprints/SchematicFactoryBlock.java rename to api/buildcraft/api/blueprints/SchematicFactoryBlock.java diff --git a/common/buildcraft/api/blueprints/SchematicFactoryEntity.java b/api/buildcraft/api/blueprints/SchematicFactoryEntity.java similarity index 100% rename from common/buildcraft/api/blueprints/SchematicFactoryEntity.java rename to api/buildcraft/api/blueprints/SchematicFactoryEntity.java diff --git a/common/buildcraft/api/blueprints/SchematicFactoryMask.java b/api/buildcraft/api/blueprints/SchematicFactoryMask.java similarity index 100% rename from common/buildcraft/api/blueprints/SchematicFactoryMask.java rename to api/buildcraft/api/blueprints/SchematicFactoryMask.java diff --git a/common/buildcraft/api/blueprints/SchematicMask.java b/api/buildcraft/api/blueprints/SchematicMask.java similarity index 100% rename from common/buildcraft/api/blueprints/SchematicMask.java rename to api/buildcraft/api/blueprints/SchematicMask.java diff --git a/common/buildcraft/api/blueprints/SchematicRegistry.java b/api/buildcraft/api/blueprints/SchematicRegistry.java similarity index 100% rename from common/buildcraft/api/blueprints/SchematicRegistry.java rename to api/buildcraft/api/blueprints/SchematicRegistry.java diff --git a/common/buildcraft/api/blueprints/SchematicTile.java b/api/buildcraft/api/blueprints/SchematicTile.java similarity index 100% rename from common/buildcraft/api/blueprints/SchematicTile.java rename to api/buildcraft/api/blueprints/SchematicTile.java diff --git a/common/buildcraft/api/blueprints/Translation.java b/api/buildcraft/api/blueprints/Translation.java similarity index 100% rename from common/buildcraft/api/blueprints/Translation.java rename to api/buildcraft/api/blueprints/Translation.java diff --git a/common/buildcraft/api/blueprints/package-info.java b/api/buildcraft/api/blueprints/package-info.java similarity index 100% rename from common/buildcraft/api/blueprints/package-info.java rename to api/buildcraft/api/blueprints/package-info.java diff --git a/common/buildcraft/api/core/BCLog.java b/api/buildcraft/api/core/BCLog.java similarity index 76% rename from common/buildcraft/api/core/BCLog.java rename to api/buildcraft/api/core/BCLog.java index 0e6f0f4d..20f35c81 100644 --- a/common/buildcraft/api/core/BCLog.java +++ b/api/buildcraft/api/core/BCLog.java @@ -8,8 +8,7 @@ */ package buildcraft.api.core; -import buildcraft.core.Version; -import cpw.mods.fml.common.FMLLog; +import java.lang.reflect.Method; import java.util.logging.Level; import java.util.logging.Logger; @@ -21,7 +20,7 @@ public class BCLog { // TODO: check if the code below is still useful and remove otherwise. //logger.setParent(FMLLog.getLogger()); - logger.info("Starting BuildCraft " + Version.getVersion()); + logger.info("Starting BuildCraft " + getVersion()); logger.info("Copyright (c) SpaceToad, 2011"); logger.info("http://www.mod-buildcraft.com"); } @@ -40,4 +39,14 @@ public class BCLog { logger.log(Level.SEVERE, 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/common/buildcraft/api/core/BuildCraftAPI.java b/api/buildcraft/api/core/BuildCraftAPI.java similarity index 100% rename from common/buildcraft/api/core/BuildCraftAPI.java rename to api/buildcraft/api/core/BuildCraftAPI.java diff --git a/common/buildcraft/api/core/IAreaProvider.java b/api/buildcraft/api/core/IAreaProvider.java similarity index 100% rename from common/buildcraft/api/core/IAreaProvider.java rename to api/buildcraft/api/core/IAreaProvider.java diff --git a/common/buildcraft/api/core/IBox.java b/api/buildcraft/api/core/IBox.java similarity index 100% rename from common/buildcraft/api/core/IBox.java rename to api/buildcraft/api/core/IBox.java diff --git a/common/buildcraft/api/core/ICoreProxy.java b/api/buildcraft/api/core/ICoreProxy.java similarity index 100% rename from common/buildcraft/api/core/ICoreProxy.java rename to api/buildcraft/api/core/ICoreProxy.java diff --git a/common/buildcraft/api/core/IIconProvider.java b/api/buildcraft/api/core/IIconProvider.java similarity index 100% rename from common/buildcraft/api/core/IIconProvider.java rename to api/buildcraft/api/core/IIconProvider.java diff --git a/api/buildcraft/api/core/IInvSlot.java b/api/buildcraft/api/core/IInvSlot.java new file mode 100644 index 00000000..9fb02126 --- /dev/null +++ b/api/buildcraft/api/core/IInvSlot.java @@ -0,0 +1,22 @@ +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); + + ItemStack decreaseStackInSlot(); + + ItemStack getStackInSlot(); + + void setStackInSlot(ItemStack stack); +} diff --git a/common/buildcraft/api/core/JavaTools.java b/api/buildcraft/api/core/JavaTools.java similarity index 100% rename from common/buildcraft/api/core/JavaTools.java rename to api/buildcraft/api/core/JavaTools.java diff --git a/common/buildcraft/api/core/LaserKind.java b/api/buildcraft/api/core/LaserKind.java similarity index 100% rename from common/buildcraft/api/core/LaserKind.java rename to api/buildcraft/api/core/LaserKind.java diff --git a/common/buildcraft/api/core/NetworkData.java b/api/buildcraft/api/core/NetworkData.java similarity index 100% rename from common/buildcraft/api/core/NetworkData.java rename to api/buildcraft/api/core/NetworkData.java diff --git a/common/buildcraft/api/core/Position.java b/api/buildcraft/api/core/Position.java similarity index 100% rename from common/buildcraft/api/core/Position.java rename to api/buildcraft/api/core/Position.java diff --git a/common/buildcraft/api/core/SafeTimeTracker.java b/api/buildcraft/api/core/SafeTimeTracker.java similarity index 100% rename from common/buildcraft/api/core/SafeTimeTracker.java rename to api/buildcraft/api/core/SafeTimeTracker.java diff --git a/common/buildcraft/api/core/StackKey.java b/api/buildcraft/api/core/StackKey.java similarity index 100% rename from common/buildcraft/api/core/StackKey.java rename to api/buildcraft/api/core/StackKey.java diff --git a/common/buildcraft/api/core/package-info.java b/api/buildcraft/api/core/package-info.java similarity index 100% rename from common/buildcraft/api/core/package-info.java rename to api/buildcraft/api/core/package-info.java diff --git a/common/buildcraft/api/filler/FillerManager.java b/api/buildcraft/api/filler/FillerManager.java similarity index 100% rename from common/buildcraft/api/filler/FillerManager.java rename to api/buildcraft/api/filler/FillerManager.java diff --git a/common/buildcraft/api/filler/IFillerPattern.java b/api/buildcraft/api/filler/IFillerPattern.java similarity index 100% rename from common/buildcraft/api/filler/IFillerPattern.java rename to api/buildcraft/api/filler/IFillerPattern.java diff --git a/common/buildcraft/api/filler/IFillerRegistry.java b/api/buildcraft/api/filler/IFillerRegistry.java similarity index 100% rename from common/buildcraft/api/filler/IFillerRegistry.java rename to api/buildcraft/api/filler/IFillerRegistry.java diff --git a/common/buildcraft/api/filler/IPatternIterator.java b/api/buildcraft/api/filler/IPatternIterator.java similarity index 100% rename from common/buildcraft/api/filler/IPatternIterator.java rename to api/buildcraft/api/filler/IPatternIterator.java diff --git a/common/buildcraft/api/filler/package-info.java b/api/buildcraft/api/filler/package-info.java similarity index 100% rename from common/buildcraft/api/filler/package-info.java rename to api/buildcraft/api/filler/package-info.java diff --git a/common/buildcraft/api/fuels/IronEngineCoolant.java b/api/buildcraft/api/fuels/IronEngineCoolant.java similarity index 100% rename from common/buildcraft/api/fuels/IronEngineCoolant.java rename to api/buildcraft/api/fuels/IronEngineCoolant.java diff --git a/common/buildcraft/api/fuels/IronEngineFuel.java b/api/buildcraft/api/fuels/IronEngineFuel.java similarity index 100% rename from common/buildcraft/api/fuels/IronEngineFuel.java rename to api/buildcraft/api/fuels/IronEngineFuel.java diff --git a/common/buildcraft/api/fuels/package-info.java b/api/buildcraft/api/fuels/package-info.java similarity index 100% rename from common/buildcraft/api/fuels/package-info.java rename to api/buildcraft/api/fuels/package-info.java diff --git a/common/buildcraft/api/gates/ActionManager.java b/api/buildcraft/api/gates/ActionManager.java similarity index 100% rename from common/buildcraft/api/gates/ActionManager.java rename to api/buildcraft/api/gates/ActionManager.java diff --git a/common/buildcraft/api/gates/GateExpansionController.java b/api/buildcraft/api/gates/GateExpansionController.java similarity index 100% rename from common/buildcraft/api/gates/GateExpansionController.java rename to api/buildcraft/api/gates/GateExpansionController.java diff --git a/common/buildcraft/api/gates/GateExpansions.java b/api/buildcraft/api/gates/GateExpansions.java similarity index 100% rename from common/buildcraft/api/gates/GateExpansions.java rename to api/buildcraft/api/gates/GateExpansions.java diff --git a/common/buildcraft/api/gates/IAction.java b/api/buildcraft/api/gates/IAction.java similarity index 100% rename from common/buildcraft/api/gates/IAction.java rename to api/buildcraft/api/gates/IAction.java diff --git a/common/buildcraft/api/gates/IActionProvider.java b/api/buildcraft/api/gates/IActionProvider.java similarity index 100% rename from common/buildcraft/api/gates/IActionProvider.java rename to api/buildcraft/api/gates/IActionProvider.java diff --git a/common/buildcraft/api/gates/IActionReceptor.java b/api/buildcraft/api/gates/IActionReceptor.java similarity index 100% rename from common/buildcraft/api/gates/IActionReceptor.java rename to api/buildcraft/api/gates/IActionReceptor.java diff --git a/common/buildcraft/api/gates/IGateExpansion.java b/api/buildcraft/api/gates/IGateExpansion.java similarity index 100% rename from common/buildcraft/api/gates/IGateExpansion.java rename to api/buildcraft/api/gates/IGateExpansion.java diff --git a/common/buildcraft/api/gates/IOverrideDefaultTriggers.java b/api/buildcraft/api/gates/IOverrideDefaultTriggers.java similarity index 100% rename from common/buildcraft/api/gates/IOverrideDefaultTriggers.java rename to api/buildcraft/api/gates/IOverrideDefaultTriggers.java diff --git a/common/buildcraft/api/gates/ITileTrigger.java b/api/buildcraft/api/gates/ITileTrigger.java similarity index 100% rename from common/buildcraft/api/gates/ITileTrigger.java rename to api/buildcraft/api/gates/ITileTrigger.java diff --git a/common/buildcraft/api/gates/ITrigger.java b/api/buildcraft/api/gates/ITrigger.java similarity index 100% rename from common/buildcraft/api/gates/ITrigger.java rename to api/buildcraft/api/gates/ITrigger.java diff --git a/common/buildcraft/api/gates/ITriggerParameter.java b/api/buildcraft/api/gates/ITriggerParameter.java similarity index 100% rename from common/buildcraft/api/gates/ITriggerParameter.java rename to api/buildcraft/api/gates/ITriggerParameter.java diff --git a/common/buildcraft/api/gates/ITriggerProvider.java b/api/buildcraft/api/gates/ITriggerProvider.java similarity index 100% rename from common/buildcraft/api/gates/ITriggerProvider.java rename to api/buildcraft/api/gates/ITriggerProvider.java diff --git a/common/buildcraft/api/gates/TriggerParameter.java b/api/buildcraft/api/gates/TriggerParameter.java similarity index 100% rename from common/buildcraft/api/gates/TriggerParameter.java rename to api/buildcraft/api/gates/TriggerParameter.java diff --git a/common/buildcraft/api/gates/package-info.java b/api/buildcraft/api/gates/package-info.java similarity index 100% rename from common/buildcraft/api/gates/package-info.java rename to api/buildcraft/api/gates/package-info.java diff --git a/common/buildcraft/api/mj/MjBattery.java b/api/buildcraft/api/mj/MjBattery.java similarity index 100% rename from common/buildcraft/api/mj/MjBattery.java rename to api/buildcraft/api/mj/MjBattery.java diff --git a/common/buildcraft/api/package-info.java b/api/buildcraft/api/package-info.java similarity index 100% rename from common/buildcraft/api/package-info.java rename to api/buildcraft/api/package-info.java diff --git a/common/buildcraft/api/power/ILaserTarget.java b/api/buildcraft/api/power/ILaserTarget.java similarity index 100% rename from common/buildcraft/api/power/ILaserTarget.java rename to api/buildcraft/api/power/ILaserTarget.java diff --git a/common/buildcraft/api/power/IPowerEmitter.java b/api/buildcraft/api/power/IPowerEmitter.java similarity index 100% rename from common/buildcraft/api/power/IPowerEmitter.java rename to api/buildcraft/api/power/IPowerEmitter.java diff --git a/common/buildcraft/api/power/IPowerReceptor.java b/api/buildcraft/api/power/IPowerReceptor.java similarity index 100% rename from common/buildcraft/api/power/IPowerReceptor.java rename to api/buildcraft/api/power/IPowerReceptor.java diff --git a/common/buildcraft/api/power/PowerHandler.java b/api/buildcraft/api/power/PowerHandler.java similarity index 100% rename from common/buildcraft/api/power/PowerHandler.java rename to api/buildcraft/api/power/PowerHandler.java diff --git a/common/buildcraft/api/power/package-info.java b/api/buildcraft/api/power/package-info.java similarity index 100% rename from common/buildcraft/api/power/package-info.java rename to api/buildcraft/api/power/package-info.java diff --git a/common/buildcraft/api/recipes/BuildcraftRecipes.java b/api/buildcraft/api/recipes/BuildcraftRecipes.java similarity index 100% rename from common/buildcraft/api/recipes/BuildcraftRecipes.java rename to api/buildcraft/api/recipes/BuildcraftRecipes.java diff --git a/common/buildcraft/api/recipes/IAssemblyRecipeManager.java b/api/buildcraft/api/recipes/IAssemblyRecipeManager.java similarity index 100% rename from common/buildcraft/api/recipes/IAssemblyRecipeManager.java rename to api/buildcraft/api/recipes/IAssemblyRecipeManager.java diff --git a/common/buildcraft/api/recipes/IIntegrationRecipeManager.java b/api/buildcraft/api/recipes/IIntegrationRecipeManager.java similarity index 100% rename from common/buildcraft/api/recipes/IIntegrationRecipeManager.java rename to api/buildcraft/api/recipes/IIntegrationRecipeManager.java diff --git a/common/buildcraft/api/recipes/IRefineryRecipeManager.java b/api/buildcraft/api/recipes/IRefineryRecipeManager.java similarity index 100% rename from common/buildcraft/api/recipes/IRefineryRecipeManager.java rename to api/buildcraft/api/recipes/IRefineryRecipeManager.java diff --git a/common/buildcraft/api/recipes/package-info.java b/api/buildcraft/api/recipes/package-info.java similarity index 100% rename from common/buildcraft/api/recipes/package-info.java rename to api/buildcraft/api/recipes/package-info.java diff --git a/common/buildcraft/api/tools/IToolPipette.java b/api/buildcraft/api/tools/IToolPipette.java similarity index 100% rename from common/buildcraft/api/tools/IToolPipette.java rename to api/buildcraft/api/tools/IToolPipette.java diff --git a/common/buildcraft/api/tools/IToolWrench.java b/api/buildcraft/api/tools/IToolWrench.java similarity index 100% rename from common/buildcraft/api/tools/IToolWrench.java rename to api/buildcraft/api/tools/IToolWrench.java diff --git a/common/buildcraft/api/tools/package-info.java b/api/buildcraft/api/tools/package-info.java similarity index 100% rename from common/buildcraft/api/tools/package-info.java rename to api/buildcraft/api/tools/package-info.java diff --git a/common/buildcraft/api/transport/IExtractionHandler.java b/api/buildcraft/api/transport/IExtractionHandler.java similarity index 100% rename from common/buildcraft/api/transport/IExtractionHandler.java rename to api/buildcraft/api/transport/IExtractionHandler.java diff --git a/common/buildcraft/api/transport/IPipeConnection.java b/api/buildcraft/api/transport/IPipeConnection.java similarity index 100% rename from common/buildcraft/api/transport/IPipeConnection.java rename to api/buildcraft/api/transport/IPipeConnection.java diff --git a/common/buildcraft/api/transport/IPipeDefinition.java b/api/buildcraft/api/transport/IPipeDefinition.java similarity index 100% rename from common/buildcraft/api/transport/IPipeDefinition.java rename to api/buildcraft/api/transport/IPipeDefinition.java diff --git a/common/buildcraft/api/transport/IPipeTile.java b/api/buildcraft/api/transport/IPipeTile.java similarity index 100% rename from common/buildcraft/api/transport/IPipeTile.java rename to api/buildcraft/api/transport/IPipeTile.java diff --git a/common/buildcraft/api/transport/PipeBehavior.java b/api/buildcraft/api/transport/PipeBehavior.java similarity index 100% rename from common/buildcraft/api/transport/PipeBehavior.java rename to api/buildcraft/api/transport/PipeBehavior.java diff --git a/common/buildcraft/api/transport/PipeManager.java b/api/buildcraft/api/transport/PipeManager.java similarity index 100% rename from common/buildcraft/api/transport/PipeManager.java rename to api/buildcraft/api/transport/PipeManager.java diff --git a/common/buildcraft/api/transport/PipeWire.java b/api/buildcraft/api/transport/PipeWire.java similarity index 100% rename from common/buildcraft/api/transport/PipeWire.java rename to api/buildcraft/api/transport/PipeWire.java diff --git a/common/buildcraft/api/transport/package-info.java b/api/buildcraft/api/transport/package-info.java similarity index 100% rename from common/buildcraft/api/transport/package-info.java rename to api/buildcraft/api/transport/package-info.java diff --git a/build.gradle b/build.gradle index 5212ed76..a5df64af 100755 --- a/build.gradle +++ b/build.gradle @@ -51,6 +51,11 @@ sourceSets { // include 'some inclusion' } } + api { + java { + srcDir 'api' + } + } } processResources @@ -77,9 +82,15 @@ processResources // add a source jar task sourceJar(type: Jar) { from sourceSets.main.allSource + from sourceSets.api.allSource classifier = 'sources' } +// add api classes to javadoc +javadoc { + source += sourceSets.api.allSource +} + // add a javadoc jar task javadocJar(type: Jar, dependsOn: javadoc) { classifier = 'javadoc' @@ -89,11 +100,22 @@ task javadocJar(type: Jar, dependsOn: javadoc) { // because the normal output has been made to be obfuscated task deobfJar(type: Jar) { from sourceSets.main.output + from sourceSets.api.output classifier = 'dev' } +task apiJar(type: Jar) { + from sourceSets.api.output + classifier = 'api' +} + +// add api classes to main package +jar { + from sourceSets.api.output +} + // make sure all of these happen when we run build -build.dependsOn sourceJar, javadocJar, deobfJar +build.dependsOn sourceJar, javadocJar, deobfJar, apiJar // -------------------- // maven section @@ -115,6 +137,7 @@ artifacts { archives sourceJar archives javadocJar archives deobfJar + archives apiJar } uploadArchives { diff --git a/common/buildcraft/core/blueprints/BptBuilderBlueprint.java b/common/buildcraft/core/blueprints/BptBuilderBlueprint.java index 03e0c408..3932240f 100644 --- a/common/buildcraft/core/blueprints/BptBuilderBlueprint.java +++ b/common/buildcraft/core/blueprints/BptBuilderBlueprint.java @@ -35,7 +35,7 @@ import buildcraft.core.BlockIndex; import buildcraft.core.blueprints.BuildingSlotBlock.Mode; import buildcraft.core.inventory.InventoryCopy; import buildcraft.core.inventory.InventoryIterator; -import buildcraft.core.inventory.InventoryIterator.IInvSlot; +import buildcraft.api.core.IInvSlot; import buildcraft.core.inventory.StackHelper; import buildcraft.core.utils.BlockUtil; diff --git a/common/buildcraft/core/blueprints/BptBuilderTemplate.java b/common/buildcraft/core/blueprints/BptBuilderTemplate.java index e74c5341..2a395d39 100644 --- a/common/buildcraft/core/blueprints/BptBuilderTemplate.java +++ b/common/buildcraft/core/blueprints/BptBuilderTemplate.java @@ -19,7 +19,7 @@ import buildcraft.builders.TileAbstractBuilder; import buildcraft.core.BlockIndex; import buildcraft.core.blueprints.BuildingSlotBlock.Mode; import buildcraft.core.inventory.InventoryIterator; -import buildcraft.core.inventory.InventoryIterator.IInvSlot; +import buildcraft.api.core.IInvSlot; import buildcraft.core.utils.BlockUtil; public class BptBuilderTemplate extends BptBuilderBase { diff --git a/common/buildcraft/core/inventory/InvUtils.java b/common/buildcraft/core/inventory/InvUtils.java index 8e833a93..494d514f 100644 --- a/common/buildcraft/core/inventory/InvUtils.java +++ b/common/buildcraft/core/inventory/InvUtils.java @@ -19,7 +19,7 @@ import net.minecraft.tileentity.TileEntityChest; import net.minecraft.world.World; import net.minecraftforge.common.util.Constants; import net.minecraftforge.common.util.ForgeDirection; -import buildcraft.core.inventory.InventoryIterator.IInvSlot; +import buildcraft.api.core.IInvSlot; import buildcraft.core.inventory.filters.ArrayStackFilter; import buildcraft.core.inventory.filters.IStackFilter; diff --git a/common/buildcraft/core/inventory/InventoryIterator.java b/common/buildcraft/core/inventory/InventoryIterator.java index 59587a6e..374221db 100644 --- a/common/buildcraft/core/inventory/InventoryIterator.java +++ b/common/buildcraft/core/inventory/InventoryIterator.java @@ -8,6 +8,7 @@ */ package buildcraft.core.inventory; +import buildcraft.api.core.IInvSlot; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; @@ -30,23 +31,4 @@ public class InventoryIterator { return new InventoryIteratorSimple(inv); } - 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); - - ItemStack decreaseStackInSlot(); - - ItemStack getStackInSlot(); - - void setStackInSlot(ItemStack stack); - } } diff --git a/common/buildcraft/core/inventory/InventoryIteratorSided.java b/common/buildcraft/core/inventory/InventoryIteratorSided.java index e04b324c..303b2b29 100644 --- a/common/buildcraft/core/inventory/InventoryIteratorSided.java +++ b/common/buildcraft/core/inventory/InventoryIteratorSided.java @@ -8,8 +8,9 @@ */ package buildcraft.core.inventory; -import buildcraft.core.inventory.InventoryIterator.IInvSlot; import java.util.Iterator; + +import buildcraft.api.core.IInvSlot; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; diff --git a/common/buildcraft/core/inventory/InventoryIteratorSimple.java b/common/buildcraft/core/inventory/InventoryIteratorSimple.java index 7e3b7a63..603ae99e 100644 --- a/common/buildcraft/core/inventory/InventoryIteratorSimple.java +++ b/common/buildcraft/core/inventory/InventoryIteratorSimple.java @@ -8,8 +8,9 @@ */ package buildcraft.core.inventory; -import buildcraft.core.inventory.InventoryIterator.IInvSlot; import java.util.Iterator; + +import buildcraft.api.core.IInvSlot; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; diff --git a/common/buildcraft/core/inventory/TransactorRoundRobin.java b/common/buildcraft/core/inventory/TransactorRoundRobin.java index 6016e52a..2dcef7c7 100644 --- a/common/buildcraft/core/inventory/TransactorRoundRobin.java +++ b/common/buildcraft/core/inventory/TransactorRoundRobin.java @@ -11,7 +11,7 @@ package buildcraft.core.inventory; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; -import buildcraft.core.inventory.InventoryIterator.IInvSlot; +import buildcraft.api.core.IInvSlot; public class TransactorRoundRobin extends TransactorSimple { diff --git a/common/buildcraft/core/inventory/TransactorSimple.java b/common/buildcraft/core/inventory/TransactorSimple.java index a28cd97e..2ea24ea4 100644 --- a/common/buildcraft/core/inventory/TransactorSimple.java +++ b/common/buildcraft/core/inventory/TransactorSimple.java @@ -14,7 +14,7 @@ import java.util.List; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; -import buildcraft.core.inventory.InventoryIterator.IInvSlot; +import buildcraft.api.core.IInvSlot; import buildcraft.core.inventory.filters.IStackFilter; public class TransactorSimple extends Transactor { diff --git a/common/buildcraft/core/recipes/AssemblyRecipeManager.java b/common/buildcraft/core/recipes/AssemblyRecipeManager.java index a86de95f..6d8c2e54 100644 --- a/common/buildcraft/core/recipes/AssemblyRecipeManager.java +++ b/common/buildcraft/core/recipes/AssemblyRecipeManager.java @@ -11,7 +11,7 @@ package buildcraft.core.recipes; import buildcraft.api.recipes.IAssemblyRecipeManager; import buildcraft.core.inventory.ITransactor; import buildcraft.core.inventory.InventoryIterator; -import buildcraft.core.inventory.InventoryIterator.IInvSlot; +import buildcraft.api.core.IInvSlot; import buildcraft.core.inventory.Transactor; import buildcraft.core.inventory.filters.ArrayStackFilter; import java.util.LinkedList; diff --git a/common/buildcraft/core/triggers/TriggerInventory.java b/common/buildcraft/core/triggers/TriggerInventory.java index 4bfa4f79..c18bd90b 100644 --- a/common/buildcraft/core/triggers/TriggerInventory.java +++ b/common/buildcraft/core/triggers/TriggerInventory.java @@ -18,7 +18,7 @@ import buildcraft.api.gates.ITileTrigger; import buildcraft.api.gates.ITrigger; import buildcraft.api.gates.ITriggerParameter; import buildcraft.core.inventory.InventoryIterator; -import buildcraft.core.inventory.InventoryIterator.IInvSlot; +import buildcraft.api.core.IInvSlot; import buildcraft.core.inventory.StackHelper; import buildcraft.core.utils.StringUtils; diff --git a/common/buildcraft/core/triggers/TriggerInventoryLevel.java b/common/buildcraft/core/triggers/TriggerInventoryLevel.java index 53b37e03..8ee90ba8 100644 --- a/common/buildcraft/core/triggers/TriggerInventoryLevel.java +++ b/common/buildcraft/core/triggers/TriggerInventoryLevel.java @@ -18,7 +18,7 @@ import buildcraft.api.gates.ITileTrigger; import buildcraft.api.gates.ITrigger; import buildcraft.api.gates.ITriggerParameter; import buildcraft.core.inventory.InventoryIterator; -import buildcraft.core.inventory.InventoryIterator.IInvSlot; +import buildcraft.api.core.IInvSlot; import buildcraft.core.inventory.StackHelper; import buildcraft.core.utils.StringUtils; diff --git a/common/buildcraft/factory/TileAutoWorkbench.java b/common/buildcraft/factory/TileAutoWorkbench.java index 0a6cc751..5319e9ba 100644 --- a/common/buildcraft/factory/TileAutoWorkbench.java +++ b/common/buildcraft/factory/TileAutoWorkbench.java @@ -25,7 +25,7 @@ import buildcraft.core.TileBuildCraft; import buildcraft.core.inventory.InvUtils; import buildcraft.core.inventory.InventoryConcatenator; import buildcraft.core.inventory.InventoryIterator; -import buildcraft.core.inventory.InventoryIterator.IInvSlot; +import buildcraft.api.core.IInvSlot; import buildcraft.core.inventory.SimpleInventory; import buildcraft.core.inventory.StackHelper; import buildcraft.core.utils.CraftingHelper; diff --git a/common/buildcraft/silicon/TileAdvancedCraftingTable.java b/common/buildcraft/silicon/TileAdvancedCraftingTable.java index eb9243af..27b5f629 100644 --- a/common/buildcraft/silicon/TileAdvancedCraftingTable.java +++ b/common/buildcraft/silicon/TileAdvancedCraftingTable.java @@ -43,7 +43,7 @@ import buildcraft.core.TileBuffer; import buildcraft.core.inventory.InvUtils; import buildcraft.core.inventory.InventoryCopy; import buildcraft.core.inventory.InventoryIterator; -import buildcraft.core.inventory.InventoryIterator.IInvSlot; +import buildcraft.api.core.IInvSlot; import buildcraft.core.inventory.InventoryMapper; import buildcraft.core.inventory.SimpleInventory; import buildcraft.core.inventory.StackHelper; diff --git a/gradlew b/gradlew old mode 100644 new mode 100755