From 123aa6ed288b2f67b0d47177f4d27cd6893daf3a Mon Sep 17 00:00:00 2001 From: Shawn Buckley Date: Wed, 21 Oct 2015 22:15:09 -0400 Subject: Reformat code --- .../api/interfaces/IColorModulationContainer.java | 2 +- .../java/gregtech/api/interfaces/ICondition.java | 200 ++--- .../gregtech/api/interfaces/IDamagableItem.java | 2 +- .../gregtech/api/interfaces/IDebugableBlock.java | 35 +- .../java/gregtech/api/interfaces/IDescribable.java | 8 +- .../java/gregtech/api/interfaces/IFoodStat.java | 38 +- .../gregtech/api/interfaces/IIconContainer.java | 28 +- .../gregtech/api/interfaces/IItemBehaviour.java | 34 +- .../gregtech/api/interfaces/IItemContainer.java | 47 +- .../api/interfaces/IOreRecipeRegistrator.java | 15 +- .../gregtech/api/interfaces/IProjectileItem.java | 20 +- .../api/interfaces/IRedstoneCircuitBlock.java | 100 +-- .../gregtech/api/interfaces/ISubTagContainer.java | 28 +- .../java/gregtech/api/interfaces/ITexture.java | 21 +- .../java/gregtech/api/interfaces/IToolStats.java | 264 +++---- .../api/interfaces/internal/IBCTileEntity.java | 2 +- .../interfaces/internal/IGT_CraftingRecipe.java | 2 +- .../gregtech/api/interfaces/internal/IGT_Mod.java | 56 +- .../api/interfaces/internal/IGT_RecipeAdder.java | 830 +++++++++++---------- .../api/interfaces/internal/IIC2TileEntity.java | 2 +- .../api/interfaces/internal/IThaumcraftCompat.java | 55 +- .../api/interfaces/internal/IUETileEntity.java | 2 +- .../interfaces/metatileentity/IMetaTileEntity.java | 604 +++++++-------- .../metatileentity/IMetaTileEntityCable.java | 4 +- .../metatileentity/IMetaTileEntityItemPipe.java | 145 ++-- .../tileentity/IBasicEnergyContainer.java | 185 ++--- .../interfaces/tileentity/IColoredTileEntity.java | 21 +- .../api/interfaces/tileentity/ICoverable.java | 65 +- .../api/interfaces/tileentity/IDigitalChest.java | 42 +- .../interfaces/tileentity/IEnergyConductor.java | 60 +- .../interfaces/tileentity/IEnergyConnected.java | 139 ++-- .../tileentity/IExperimentalEnergyTileEntity.java | 143 ++-- .../api/interfaces/tileentity/IFibreConnected.java | 48 +- .../tileentity/IGearEnergyTileEntity.java | 25 +- .../tileentity/IGregTechDeviceInformation.java | 27 +- .../interfaces/tileentity/IGregTechTileEntity.java | 181 ++--- .../api/interfaces/tileentity/IHasInventory.java | 50 +- .../tileentity/IHasWorldObjectAndCoords.java | 155 ++-- .../tileentity/IMachineBlockUpdateable.java | 14 +- .../interfaces/tileentity/IMachineProgress.java | 122 +-- .../tileentity/IPipeRenderedTileEntity.java | 8 +- .../interfaces/tileentity/IRedstoneEmitter.java | 60 +- .../interfaces/tileentity/IRedstoneReceiver.java | 40 +- .../interfaces/tileentity/IRedstoneTileEntity.java | 20 +- .../interfaces/tileentity/ITexturedTileEntity.java | 8 +- .../api/interfaces/tileentity/ITurnable.java | 50 +- .../interfaces/tileentity/IUpgradableMachine.java | 68 +- 47 files changed, 2121 insertions(+), 1954 deletions(-) (limited to 'src/main/java/gregtech/api/interfaces') diff --git a/src/main/java/gregtech/api/interfaces/IColorModulationContainer.java b/src/main/java/gregtech/api/interfaces/IColorModulationContainer.java index b1151cf808..ad3aa3c908 100644 --- a/src/main/java/gregtech/api/interfaces/IColorModulationContainer.java +++ b/src/main/java/gregtech/api/interfaces/IColorModulationContainer.java @@ -1,5 +1,5 @@ package gregtech.api.interfaces; public interface IColorModulationContainer { - public short[] getRGBA(); + public short[] getRGBA(); } diff --git a/src/main/java/gregtech/api/interfaces/ICondition.java b/src/main/java/gregtech/api/interfaces/ICondition.java index 507315ee91..9e31da7338 100644 --- a/src/main/java/gregtech/api/interfaces/ICondition.java +++ b/src/main/java/gregtech/api/interfaces/ICondition.java @@ -1,104 +1,104 @@ package gregtech.api.interfaces; public interface ICondition { - public boolean isTrue(O aObject); - - // Utility Classes for adding relations between Conditions. - - public static class Not implements ICondition { - private final ICondition mCondition; - - public Not(ICondition aCondition) { - mCondition = aCondition; - } - - @Override - public boolean isTrue(O aObject) { - return !mCondition.isTrue(aObject); - } - } - - public static class Or implements ICondition { - private final ICondition[] mConditions; - - public Or(ICondition... aConditions) { - mConditions = aConditions; - } - - @Override - public boolean isTrue(O aObject) { - for (ICondition tCondition : mConditions) if (tCondition.isTrue(aObject)) return true; - return false; - } - } - - public static class Nor implements ICondition { - private final ICondition[] mConditions; - - public Nor(ICondition... aConditions) { - mConditions = aConditions; - } - - @Override - public boolean isTrue(O aObject) { - for (ICondition tCondition : mConditions) if (tCondition.isTrue(aObject)) return false; - return true; - } - } - - public static class And implements ICondition { - private final ICondition[] mConditions; - - public And(ICondition... aConditions) { - mConditions = aConditions; - } - - @Override - public boolean isTrue(O aObject) { - for (ICondition tCondition : mConditions) if (!tCondition.isTrue(aObject)) return false; - return true; - } - } - - public static class Nand implements ICondition { - private final ICondition[] mConditions; - - public Nand(ICondition... aConditions) { - mConditions = aConditions; - } - - @Override - public boolean isTrue(O aObject) { - for (ICondition tCondition : mConditions) if (!tCondition.isTrue(aObject)) return true; - return false; - } - } - - public static class Xor implements ICondition { - private final ICondition mCondition1, mCondition2; - - public Xor(ICondition aCondition1, ICondition aCondition2) { - mCondition1 = aCondition1; - mCondition2 = aCondition2; - } - - @Override - public boolean isTrue(O aObject) { - return mCondition1.isTrue(aObject) != mCondition2.isTrue(aObject); - } - } - - public static class Equal implements ICondition { - private final ICondition mCondition1, mCondition2; - - public Equal(ICondition aCondition1, ICondition aCondition2) { - mCondition1 = aCondition1; - mCondition2 = aCondition2; - } - - @Override - public boolean isTrue(O aObject) { - return mCondition1.isTrue(aObject) == mCondition2.isTrue(aObject); - } - } + public boolean isTrue(O aObject); + + // Utility Classes for adding relations between Conditions. + + public static class Not implements ICondition { + private final ICondition mCondition; + + public Not(ICondition aCondition) { + mCondition = aCondition; + } + + @Override + public boolean isTrue(O aObject) { + return !mCondition.isTrue(aObject); + } + } + + public static class Or implements ICondition { + private final ICondition[] mConditions; + + public Or(ICondition... aConditions) { + mConditions = aConditions; + } + + @Override + public boolean isTrue(O aObject) { + for (ICondition tCondition : mConditions) if (tCondition.isTrue(aObject)) return true; + return false; + } + } + + public static class Nor implements ICondition { + private final ICondition[] mConditions; + + public Nor(ICondition... aConditions) { + mConditions = aConditions; + } + + @Override + public boolean isTrue(O aObject) { + for (ICondition tCondition : mConditions) if (tCondition.isTrue(aObject)) return false; + return true; + } + } + + public static class And implements ICondition { + private final ICondition[] mConditions; + + public And(ICondition... aConditions) { + mConditions = aConditions; + } + + @Override + public boolean isTrue(O aObject) { + for (ICondition tCondition : mConditions) if (!tCondition.isTrue(aObject)) return false; + return true; + } + } + + public static class Nand implements ICondition { + private final ICondition[] mConditions; + + public Nand(ICondition... aConditions) { + mConditions = aConditions; + } + + @Override + public boolean isTrue(O aObject) { + for (ICondition tCondition : mConditions) if (!tCondition.isTrue(aObject)) return true; + return false; + } + } + + public static class Xor implements ICondition { + private final ICondition mCondition1, mCondition2; + + public Xor(ICondition aCondition1, ICondition aCondition2) { + mCondition1 = aCondition1; + mCondition2 = aCondition2; + } + + @Override + public boolean isTrue(O aObject) { + return mCondition1.isTrue(aObject) != mCondition2.isTrue(aObject); + } + } + + public static class Equal implements ICondition { + private final ICondition mCondition1, mCondition2; + + public Equal(ICondition aCondition1, ICondition aCondition2) { + mCondition1 = aCondition1; + mCondition2 = aCondition2; + } + + @Override + public boolean isTrue(O aObject) { + return mCondition1.isTrue(aObject) == mCondition2.isTrue(aObject); + } + } } \ No newline at end of file diff --git a/src/main/java/gregtech/api/interfaces/IDamagableItem.java b/src/main/java/gregtech/api/interfaces/IDamagableItem.java index f47c65f545..b7ebd6690d 100644 --- a/src/main/java/gregtech/api/interfaces/IDamagableItem.java +++ b/src/main/java/gregtech/api/interfaces/IDamagableItem.java @@ -3,5 +3,5 @@ package gregtech.api.interfaces; import net.minecraft.item.ItemStack; public interface IDamagableItem { - public boolean doDamageToItem(ItemStack aStack, int aVanillaDamage); + public boolean doDamageToItem(ItemStack aStack, int aVanillaDamage); } \ No newline at end of file diff --git a/src/main/java/gregtech/api/interfaces/IDebugableBlock.java b/src/main/java/gregtech/api/interfaces/IDebugableBlock.java index ce95982018..bdb550ff53 100644 --- a/src/main/java/gregtech/api/interfaces/IDebugableBlock.java +++ b/src/main/java/gregtech/api/interfaces/IDebugableBlock.java @@ -1,26 +1,27 @@ package gregtech.api.interfaces; -import java.util.ArrayList; - import net.minecraft.entity.player.EntityPlayer; +import java.util.ArrayList; + /** * You are allowed to include this File in your Download, as i will not change it. */ public interface IDebugableBlock { - /** - * Returns a Debug Message, for a generic DebugItem - * Blocks have to implement this interface NOT TileEntities! - * @param aPlayer the Player, who rightclicked with his Debug Item - * @param aX Block-Coordinate - * @param aY Block-Coordinate - * @param aZ Block-Coordinate - * @param aLogLevel the Log Level of the Debug Item. - * 0 = Obvious - * 1 = Visible for the regular Scanner - * 2 = Only visible to more advanced Scanners - * 3 = Debug ONLY - * @return a String-Array containing the DebugInfo, every Index is a separate line (0 = first Line) - */ - public ArrayList getDebugInfo(EntityPlayer aPlayer, int aX, int aY, int aZ, int aLogLevel); + /** + * Returns a Debug Message, for a generic DebugItem + * Blocks have to implement this interface NOT TileEntities! + * + * @param aPlayer the Player, who rightclicked with his Debug Item + * @param aX Block-Coordinate + * @param aY Block-Coordinate + * @param aZ Block-Coordinate + * @param aLogLevel the Log Level of the Debug Item. + * 0 = Obvious + * 1 = Visible for the regular Scanner + * 2 = Only visible to more advanced Scanners + * 3 = Debug ONLY + * @return a String-Array containing the DebugInfo, every Index is a separate line (0 = first Line) + */ + public ArrayList getDebugInfo(EntityPlayer aPlayer, int aX, int aY, int aZ, int aLogLevel); } \ No newline at end of file diff --git a/src/main/java/gregtech/api/interfaces/IDescribable.java b/src/main/java/gregtech/api/interfaces/IDescribable.java index 7ccf1a6627..d4bcf58de8 100644 --- a/src/main/java/gregtech/api/interfaces/IDescribable.java +++ b/src/main/java/gregtech/api/interfaces/IDescribable.java @@ -4,8 +4,8 @@ package gregtech.api.interfaces; * To get simple things like a ToolTip Description */ public interface IDescribable { - /** - * The Tooltip Text - */ - public String[] getDescription(); + /** + * The Tooltip Text + */ + public String[] getDescription(); } diff --git a/src/main/java/gregtech/api/interfaces/IFoodStat.java b/src/main/java/gregtech/api/interfaces/IFoodStat.java index cb01e102c6..b6773e9d65 100644 --- a/src/main/java/gregtech/api/interfaces/IFoodStat.java +++ b/src/main/java/gregtech/api/interfaces/IFoodStat.java @@ -6,16 +6,30 @@ import net.minecraft.item.EnumAction; import net.minecraft.item.ItemStack; public interface IFoodStat { - /** Warning the "aPlayer" Parameter may be null! */ - public int getFoodLevel(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer); - /** Warning the "aPlayer" Parameter may be null! */ - public float getSaturation(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer); - /** Warning the "aPlayer" Parameter may be null! */ - public boolean alwaysEdible(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer); - /** Warning the "aPlayer" Parameter may be null! */ - public boolean isRotten(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer); - /** Warning the "aPlayer" Parameter may be null! */ - public EnumAction getFoodAction(GT_MetaBase_Item aItem, ItemStack aStack); - - public void onEaten(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer); + /** + * Warning the "aPlayer" Parameter may be null! + */ + public int getFoodLevel(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer); + + /** + * Warning the "aPlayer" Parameter may be null! + */ + public float getSaturation(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer); + + /** + * Warning the "aPlayer" Parameter may be null! + */ + public boolean alwaysEdible(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer); + + /** + * Warning the "aPlayer" Parameter may be null! + */ + public boolean isRotten(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer); + + /** + * Warning the "aPlayer" Parameter may be null! + */ + public EnumAction getFoodAction(GT_MetaBase_Item aItem, ItemStack aStack); + + public void onEaten(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer); } \ No newline at end of file diff --git a/src/main/java/gregtech/api/interfaces/IIconContainer.java b/src/main/java/gregtech/api/interfaces/IIconContainer.java index dc9a845f06..c8b995e9a7 100644 --- a/src/main/java/gregtech/api/interfaces/IIconContainer.java +++ b/src/main/java/gregtech/api/interfaces/IIconContainer.java @@ -4,18 +4,18 @@ import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; public interface IIconContainer { - /** - * @return A regular Icon. - */ - public IIcon getIcon(); - - /** - * @return Icon of the Overlay (or null if there is no Icon) - */ - public IIcon getOverlayIcon(); - - /** - * @return the Default Texture File for this Icon. - */ - public ResourceLocation getTextureFile(); + /** + * @return A regular Icon. + */ + public IIcon getIcon(); + + /** + * @return Icon of the Overlay (or null if there is no Icon) + */ + public IIcon getOverlayIcon(); + + /** + * @return the Default Texture File for this Icon. + */ + public ResourceLocation getTextureFile(); } diff --git a/src/main/java/gregtech/api/interfaces/IItemBehaviour.java b/src/main/java/gregtech/api/interfaces/IItemBehaviour.java index 1f28b6a696..1d75f41e17 100644 --- a/src/main/java/gregtech/api/interfaces/IItemBehaviour.java +++ b/src/main/java/gregtech/api/interfaces/IItemBehaviour.java @@ -2,9 +2,6 @@ package gregtech.api.interfaces; import gregtech.api.enums.SubTag; import gregtech.api.items.GT_MetaBase_Item; - -import java.util.List; - import net.minecraft.dispenser.IBlockSource; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -14,17 +11,30 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +import java.util.List; + public interface IItemBehaviour { - public boolean onLeftClickEntity(E aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity); - public boolean onItemUse(E aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ); - public boolean onItemUseFirst(E aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ); + public boolean onLeftClickEntity(E aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity); + + public boolean onItemUse(E aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ); + + public boolean onItemUseFirst(E aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ); + public ItemStack onItemRightClick(E aItem, ItemStack aStack, World aWorld, EntityPlayer aPlayer); + public List getAdditionalToolTips(E aItem, List aList, ItemStack aStack); + public void onUpdate(E aItem, ItemStack aStack, World aWorld, Entity aPlayer, int aTimer, boolean aIsInHand); - public boolean isItemStackUsable(E aItem, ItemStack aStack); - public boolean canDispense(E aItem, IBlockSource aSource, ItemStack aStack); - public ItemStack onDispense(E aItem, IBlockSource aSource, ItemStack aStack); - public boolean hasProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack); - public EntityArrow getProjectile(E aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ); - public EntityArrow getProjectile(E aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed); + + public boolean isItemStackUsable(E aItem, ItemStack aStack); + + public boolean canDispense(E aItem, IBlockSource aSource, ItemStack aStack); + + public ItemStack onDispense(E aItem, IBlockSource aSource, ItemStack aStack); + + public boolean hasProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack); + + public EntityArrow getProjectile(E aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ); + + public EntityArrow getProjectile(E aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed); } \ No newline at end of file diff --git a/src/main/java/gregtech/api/interfaces/IItemContainer.java b/src/main/java/gregtech/api/interfaces/IItemContainer.java index e61553ce7d..3c1bd87543 100644 --- a/src/main/java/gregtech/api/interfaces/IItemContainer.java +++ b/src/main/java/gregtech/api/interfaces/IItemContainer.java @@ -5,20 +5,35 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; public interface IItemContainer { - public Item getItem(); - public Block getBlock(); - public boolean isStackEqual(Object aStack); - public boolean isStackEqual(Object aStack, boolean aWildcard, boolean aIgnoreNBT); - public ItemStack get(long aAmount, Object... aReplacements); - public ItemStack getWildcard(long aAmount, Object... aReplacements); - public ItemStack getUndamaged(long aAmount, Object... aReplacements); - public ItemStack getAlmostBroken(long aAmount, Object... aReplacements); - public ItemStack getWithDamage(long aAmount, long aMetaValue, Object... aReplacements); - public IItemContainer set(Item aItem); - public IItemContainer set(ItemStack aStack); - public IItemContainer registerOre(Object... aOreNames); - public IItemContainer registerWildcardAsOre(Object... aOreNames); - public ItemStack getWithCharge(long aAmount, int aEnergy, Object... aReplacements); - public ItemStack getWithName(long aAmount, String aDisplayName, Object... aReplacements); - public boolean hasBeenSet(); + public Item getItem(); + + public Block getBlock(); + + public boolean isStackEqual(Object aStack); + + public boolean isStackEqual(Object aStack, boolean aWildcard, boolean aIgnoreNBT); + + public ItemStack get(long aAmount, Object... aReplacements); + + public ItemStack getWildcard(long aAmount, Object... aReplacements); + + public ItemStack getUndamaged(long aAmount, Object... aReplacements); + + public ItemStack getAlmostBroken(long aAmount, Object... aReplacements); + + public ItemStack getWithDamage(long aAmount, long aMetaValue, Object... aReplacements); + + public IItemContainer set(Item aItem); + + public IItemContainer set(ItemStack aStack); + + public IItemContainer registerOre(Object... aOreNames); + + public IItemContainer registerWildcardAsOre(Object... aOreNames); + + public ItemStack getWithCharge(long aAmount, int aEnergy, Object... aReplacements); + + public ItemStack getWithName(long aAmount, String aDisplayName, Object... aReplacements); + + public boolean hasBeenSet(); } \ No newline at end of file diff --git a/src/main/java/gregtech/api/interfaces/IOreRecipeRegistrator.java b/src/main/java/gregtech/api/interfaces/IOreRecipeRegistrator.java index 4535c4d6c8..1f0ec91bba 100644 --- a/src/main/java/gregtech/api/interfaces/IOreRecipeRegistrator.java +++ b/src/main/java/gregtech/api/interfaces/IOreRecipeRegistrator.java @@ -5,11 +5,12 @@ import gregtech.api.enums.OrePrefixes; import net.minecraft.item.ItemStack; public interface IOreRecipeRegistrator { - /** - * Contains a Code Fragment, used in the OrePrefix to register Recipes. Better than using a switch/case, like I did before. - * @param aPrefix always != null - * @param aMaterial always != null, and can be == _NULL if the Prefix is Self Referencing or not Material based! - * @param aStack always != null - */ - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack); + /** + * Contains a Code Fragment, used in the OrePrefix to register Recipes. Better than using a switch/case, like I did before. + * + * @param aPrefix always != null + * @param aMaterial always != null, and can be == _NULL if the Prefix is Self Referencing or not Material based! + * @param aStack always != null + */ + public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack); } \ No newline at end of file diff --git a/src/main/java/gregtech/api/interfaces/IProjectileItem.java b/src/main/java/gregtech/api/interfaces/IProjectileItem.java index 0b06a65373..22211a6f0c 100644 --- a/src/main/java/gregtech/api/interfaces/IProjectileItem.java +++ b/src/main/java/gregtech/api/interfaces/IProjectileItem.java @@ -7,10 +7,18 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.World; public interface IProjectileItem { - /** @return if this Item has an Arrow Entity */ - public boolean hasProjectile(SubTag aProjectileType, ItemStack aStack); - /** @return an Arrow Entity to be spawned. If null then this is not an Arrow. Note: Other Projectiles still extend EntityArrow */ - public EntityArrow getProjectile(SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ); - /** @return an Arrow Entity to be spawned. If null then this is not an Arrow. Note: Other Projectiles still extend EntityArrow */ - public EntityArrow getProjectile(SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed); + /** + * @return if this Item has an Arrow Entity + */ + public boolean hasProjectile(SubTag aProjectileType, ItemStack aStack); + + /** + * @return an Arrow Entity to be spawned. If null then this is not an Arrow. Note: Other Projectiles still extend EntityArrow + */ + public EntityArrow getProjectile(SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ); + + /** + * @return an Arrow Entity to be spawned. If null then this is not an Arrow. Note: Other Projectiles still extend EntityArrow + */ + public EntityArrow getProjectile(SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed); } \ No newline at end of file diff --git a/src/main/java/gregtech/api/interfaces/IRedstoneCircuitBlock.java b/src/main/java/gregtech/api/interfaces/IRedstoneCircuitBlock.java index 13c63b7555..8838992c62 100644 --- a/src/main/java/gregtech/api/interfaces/IRedstoneCircuitBlock.java +++ b/src/main/java/gregtech/api/interfaces/IRedstoneCircuitBlock.java @@ -9,58 +9,58 @@ import net.minecraft.tileentity.TileEntity; * Implemented by the MetaTileEntity of the Redstone Circuit Block */ public interface IRedstoneCircuitBlock { - /** - * The Output Direction the Circuit Block is Facing - */ + /** + * The Output Direction the Circuit Block is Facing + */ public byte getOutputFacing(); - + /** * sets Output Redstone State at Side */ - public boolean setRedstone(byte aStrength, byte aSide); - - /** - * returns Output Redstone State at Side - * Note that setRedstone checks if there is a Difference between the old and the new Setting before consuming any Energy - */ - public byte getOutputRedstone(byte aSide); - - /** - * returns Input Redstone Signal at Side - */ - public byte getInputRedstone(byte aSide); - - /** - * If this Side is Covered up and therefor not doing any Redstone - */ - public GT_CoverBehavior getCover(byte aSide); - - public int getCoverID(byte aSide); - - public int getCoverVariable(byte aSide); - - /** - * returns whatever Block-ID is adjacent to the Redstone Circuit Block - */ - public Block getBlockAtSide(byte aSide); - - /** - * returns whatever Meta-Value is adjacent to the Redstone Circuit Block - */ - public byte getMetaIDAtSide(byte aSide); - - /** - * returns whatever TileEntity is adjacent to the Redstone Circuit Block - */ - public TileEntity getTileEntityAtSide(byte aSide); - - /** - * returns whatever TileEntity is used by the Redstone Circuit Block - */ - public ICoverable getOwnTileEntity(); - - /** - * returns worldObj.rand.nextInt(aRange) - */ - public int getRandom(int aRange); + public boolean setRedstone(byte aStrength, byte aSide); + + /** + * returns Output Redstone State at Side + * Note that setRedstone checks if there is a Difference between the old and the new Setting before consuming any Energy + */ + public byte getOutputRedstone(byte aSide); + + /** + * returns Input Redstone Signal at Side + */ + public byte getInputRedstone(byte aSide); + + /** + * If this Side is Covered up and therefor not doing any Redstone + */ + public GT_CoverBehavior getCover(byte aSide); + + public int getCoverID(byte aSide); + + public int getCoverVariable(byte aSide); + + /** + * returns whatever Block-ID is adjacent to the Redstone Circuit Block + */ + public Block getBlockAtSide(byte aSide); + + /** + * returns whatever Meta-Value is adjacent to the Redstone Circuit Block + */ + public byte getMetaIDAtSide(byte aSide); + + /** + * returns whatever TileEntity is adjacent to the Redstone Circuit Block + */ + public TileEntity getTileEntityAtSide(byte aSide); + + /** + * returns whatever TileEntity is used by the Redstone Circuit Block + */ + public ICoverable getOwnTileEntity(); + + /** + * returns worldObj.rand.nextInt(aRange) + */ + public int getRandom(int aRange); } diff --git a/src/main/java/gregtech/api/interfaces/ISubTagContainer.java b/src/main/java/gregtech/api/interfaces/ISubTagContainer.java index ae7d59ec1d..c7ccc45e96 100644 --- a/src/main/java/gregtech/api/interfaces/ISubTagContainer.java +++ b/src/main/java/gregtech/api/interfaces/ISubTagContainer.java @@ -3,18 +3,18 @@ package gregtech.api.interfaces; import gregtech.api.enums.SubTag; public interface ISubTagContainer { - /** - * @return if the Tag is inside the List. - */ - public boolean contains(SubTag aTag); - - /** - * @return The ISubTagContainer you called this Function on, for convenience. - */ - public ISubTagContainer add(SubTag... aTags); - - /** - * @return if the Tag was there before it has been removed. - */ - public boolean remove(SubTag aTag); + /** + * @return if the Tag is inside the List. + */ + public boolean contains(SubTag aTag); + + /** + * @return The ISubTagContainer you called this Function on, for convenience. + */ + public ISubTagContainer add(SubTag... aTags); + + /** + * @return if the Tag was there before it has been removed. + */ + public boolean remove(SubTag aTag); } \ No newline at end of file diff --git a/src/main/java/gregtech/api/interfaces/ITexture.java b/src/main/java/gregtech/api/interfaces/ITexture.java index 534a738c45..43efeac7c4 100644 --- a/src/main/java/gregtech/api/interfaces/ITexture.java +++ b/src/main/java/gregtech/api/interfaces/ITexture.java @@ -4,12 +4,17 @@ import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; public interface ITexture { - public void renderXPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ); - public void renderXNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ); - public void renderYPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ); - public void renderYNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ); - public void renderZPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ); - public void renderZNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ); - - public boolean isValidTexture(); + public void renderXPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ); + + public void renderXNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ); + + public void renderYPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ); + + public void renderYNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ); + + public void renderZPos(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ); + + public void renderZNeg(RenderBlocks aRenderer, Block aBlock, int aX, int aY, int aZ); + + public boolean isValidTexture(); } \ No newline at end of file diff --git a/src/main/java/gregtech/api/interfaces/IToolStats.java b/src/main/java/gregtech/api/interfaces/IToolStats.java index 9f894bfac8..d6819ec1ab 100644 --- a/src/main/java/gregtech/api/interfaces/IToolStats.java +++ b/src/main/java/gregtech/api/interfaces/IToolStats.java @@ -1,9 +1,6 @@ package gregtech.api.interfaces; import gregtech.api.items.GT_MetaGenerated_Tool; - -import java.util.List; - import net.minecraft.block.Block; import net.minecraft.enchantment.Enchantment; import net.minecraft.entity.Entity; @@ -13,135 +10,144 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.DamageSource; import net.minecraftforge.event.world.BlockEvent; +import java.util.List; + /** * The Stats for GT Tools. Not including any Material Modifiers. - * + *

* And this is supposed to not have any ItemStack Parameters as these are generic Stats. */ public interface IToolStats { - /** - * Called when aPlayer crafts this Tool - */ - public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer); - - /** - * Called when this gets added to a Tool Item - */ - public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID); - - /** - * @return Damage the Tool receives when breaking a Block. 100 is one Damage Point (or 100 EU). - */ - public int getToolDamagePerBlockBreak(); - - /** - * @return Damage the Tool receives when converting the drops of a Block. 100 is one Damage Point (or 100 EU). - */ - public int getToolDamagePerDropConversion(); - - /** - * @return Damage the Tool receives when being used as Container Item. 100 is one use, however it is usually 8 times more than normal. - */ - public int getToolDamagePerContainerCraft(); - - /** - * @return Damage the Tool receives when being used as Weapon, 200 is the normal Value, 100 for actual Weapons. - */ - public int getToolDamagePerEntityAttack(); - - /** - * @return Basic Quality of the Tool, 0 is normal. If increased, it will increase the general quality of all Tools of this Type. Decreasing is also possible. - */ - public int getBaseQuality(); - - /** - * @return The Damage Bonus for this Type of Tool against Mobs. 1.0F is normal punch. - */ - public float getBaseDamage(); - - /** - * @return This gets the Hurt Resistance time for Entities getting hit. (always does 1 as minimum) - */ - public int getHurtResistanceTime(int aOriginalHurtResistance, Entity aEntity); - - /** - * @return This is a multiplier for the Tool Speed. 1.0F = no special Speed. - */ - public float getSpeedMultiplier(); - - /** - * @return This is a multiplier for the Tool Speed. 1.0F = no special Durability. - */ - public float getMaxDurabilityMultiplier(); - - public DamageSource getDamageSource(EntityLivingBase aPlayer, Entity aEntity); - - public String getMiningSound(); - public String getCraftingSound(); - public String getEntityHitSound(); - public String getBreakingSound(); - - public Enchantment[] getEnchantments(ItemStack aStack); - public int[] getEnchantmentLevels(ItemStack aStack); - - /** - * @return If this Tool can be used for blocking Damage like a Sword. - */ - public boolean canBlock(); - - /** - * @return If this Tool can be used as an RC Crowbar. - */ - public boolean isCrowbar(); - - /** - * @return If this Tool can be used as an RC Crowbar. - */ - public boolean isGrafter(); - - /** - * @return If this Tool can be used as Weapon i.e. if that is the main purpose. - */ - public boolean isWeapon(); - - /** - * @return If this Tool is a Ranged Weapon. Return false at isWeapon unless you have a Blade attached to your Bow/Gun or something - */ - public boolean isRangedWeapon(); - - /** - * @return If this Tool can be used as Weapon i.e. if that is the main purpose. - */ - public boolean isMiningTool(); - - /** - * aBlock.getHarvestTool(aMetaData) can return the following Values for example. - * "axe", "pickaxe", "sword", "shovel", "hoe", "grafter", "saw", "wrench", "crowbar", "file", "hammer", "plow", "plunger", "scoop", "screwdriver", "sense", "scythe", "softhammer", "cutter", "plasmatorch" - * @return If this is a minable Block. Tool Quality checks (like Diamond Tier or something) are separate from this check. - */ - public boolean isMinableBlock(Block aBlock, byte aMetaData); - - /** - * This lets you modify the Drop List, when this type of Tool has been used. - * @return the Amount of modified Items. - */ - public int convertBlockDrops(List aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent); - - /** - * @return Returns a broken Version of the Item. - */ - public ItemStack getBrokenItem(ItemStack aStack); - - /** - * @return the Damage actually done to the Mob. - */ - public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer); - - /** - * @return the Damage actually done to the Mob. - */ - public float getMagicDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer); - - public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack); - public short[] getRGBa(boolean aIsToolHead, ItemStack aStack); + /** + * Called when aPlayer crafts this Tool + */ + public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer); + + /** + * Called when this gets added to a Tool Item + */ + public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID); + + /** + * @return Damage the Tool receives when breaking a Block. 100 is one Damage Point (or 100 EU). + */ + public int getToolDamagePerBlockBreak(); + + /** + * @return Damage the Tool receives when converting the drops of a Block. 100 is one Damage Point (or 100 EU). + */ + public int getToolDamagePerDropConversion(); + + /** + * @return Damage the Tool receives when being used as Container Item. 100 is one use, however it is usually 8 times more than normal. + */ + public int getToolDamagePerContainerCraft(); + + /** + * @return Damage the Tool receives when being used as Weapon, 200 is the normal Value, 100 for actual Weapons. + */ + public int getToolDamagePerEntityAttack(); + + /** + * @return Basic Quality of the Tool, 0 is normal. If increased, it will increase the general quality of all Tools of this Type. Decreasing is also possible. + */ + public int getBaseQuality(); + + /** + * @return The Damage Bonus for this Type of Tool against Mobs. 1.0F is normal punch. + */ + public float getBaseDamage(); + + /** + * @return This gets the Hurt Resistance time for Entities getting hit. (always does 1 as minimum) + */ + public int getHurtResistanceTime(int aOriginalHurtResistance, Entity aEntity); + + /** + * @return This is a multiplier for the Tool Speed. 1.0F = no special Speed. + */ + public float getSpeedMultiplier(); + + /** + * @return This is a multiplier for the Tool Speed. 1.0F = no special Durability. + */ + public float getMaxDurabilityMultiplier(); + + public DamageSource getDamageSource(EntityLivingBase aPlayer, Entity aEntity); + + public String getMiningSound(); + + public String getCraftingSound(); + + public String getEntityHitSound(); + + public String getBreakingSound(); + + public Enchantment[] getEnchantments(ItemStack aStack); + + public int[] getEnchantmentLevels(ItemStack aStack); + + /** + * @return If this Tool can be used for blocking Damage like a Sword. + */ + public boolean canBlock(); + + /** + * @return If this Tool can be used as an RC Crowbar. + */ + public boolean isCrowbar(); + + /** + * @return If this Tool can be used as an RC Crowbar. + */ + public boolean isGrafter(); + + /** + * @return If this Tool can be used as Weapon i.e. if that is the main purpose. + */ + public boolean isWeapon(); + + /** + * @return If this Tool is a Ranged Weapon. Return false at isWeapon unless you have a Blade attached to your Bow/Gun or something + */ + public boolean isRangedWeapon(); + + /** + * @return If this Tool can be used as Weapon i.e. if that is the main purpose. + */ + public boolean isMiningTool(); + + /** + * aBlock.getHarvestTool(aMetaData) can return the following Values for example. + * "axe", "pickaxe", "sword", "shovel", "hoe", "grafter", "saw", "wrench", "crowbar", "file", "hammer", "plow", "plunger", "scoop", "screwdriver", "sense", "scythe", "softhammer", "cutter", "plasmatorch" + * + * @return If this is a minable Block. Tool Quality checks (like Diamond Tier or something) are separate from this check. + */ + public boolean isMinableBlock(Block aBlock, byte aMetaData); + + /** + * This lets you modify the Drop List, when this type of Tool has been used. + * + * @return the Amount of modified Items. + */ + public int convertBlockDrops(List aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent); + + /** + * @return Returns a broken Version of the Item. + */ + public ItemStack getBrokenItem(ItemStack aStack); + + /** + * @return the Damage actually done to the Mob. + */ + public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer); + + /** + * @return the Damage actually done to the Mob. + */ + public float getMagicDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer); + + public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack); + + public short[] getRGBa(boolean aIsToolHead, ItemStack aStack); } \ No newline at end of file diff --git a/src/main/java/gregtech/api/interfaces/internal/IBCTileEntity.java b/src/main/java/gregtech/api/interfaces/internal/IBCTileEntity.java index 3d471731ff..7eee5ce98f 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IBCTileEntity.java +++ b/src/main/java/gregtech/api/interfaces/internal/IBCTileEntity.java @@ -4,5 +4,5 @@ package gregtech.api.interfaces.internal; * A simple compound Interface for generic BuildCraft Code. */ public interface IBCTileEntity /*extends IPowerReceptor*/ { - // + // } \ No newline at end of file diff --git a/src/main/java/gregtech/api/interfaces/internal/IGT_CraftingRecipe.java b/src/main/java/gregtech/api/interfaces/internal/IGT_CraftingRecipe.java index a886cf67ac..4c1aa49c05 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IGT_CraftingRecipe.java +++ b/src/main/java/gregtech/api/interfaces/internal/IGT_CraftingRecipe.java @@ -3,5 +3,5 @@ package gregtech.api.interfaces.internal; import net.minecraft.item.crafting.IRecipe; public interface IGT_CraftingRecipe extends IRecipe { - public boolean isRemovable(); + public boolean isRemovable(); } diff --git a/src/main/java/gregtech/api/interfaces/internal/IGT_Mod.java b/src/main/java/gregtech/api/interfaces/internal/IGT_Mod.java index f64d120ec8..945c988480 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IGT_Mod.java +++ b/src/main/java/gregtech/api/interfaces/internal/IGT_Mod.java @@ -6,29 +6,41 @@ import net.minecraft.world.World; /** * Interface used by the Mods Main Class to reference to internals. - * + *

* Don't even think about including this File in your Mod. */ public interface IGT_Mod { - /** This means that Server specific Basefiles are definitely existing! Not if the World is actually server side or not! */ - public boolean isServerSide(); - /** This means that Client specific Basefiles are definitely existing! Not if the World is actually client side or not! */ - public boolean isClientSide(); - /** This means that Bukkit specific Basefiles are definitely existing! Not if the World is actually bukkit server or not! */ - public boolean isBukkitSide(); - /** works only ClientSide otherwise returns null */ - public EntityPlayer getThePlayer(); - - //---------- Internal Usage Only ---------- - - /** - * works only ClientSide otherwise returns 0 - * @return the Index of the added Armor - */ - public int addArmor(String aArmorPrefix); - - /** - * Plays the Sonictron Sound for the ItemStack on the Client Side - */ - public void doSonictronSound(ItemStack aStack, World aWorld, double aX, double aY, double aZ); + /** + * This means that Server specific Basefiles are definitely existing! Not if the World is actually server side or not! + */ + public boolean isServerSide(); + + /** + * This means that Client specific Basefiles are definitely existing! Not if the World is actually client side or not! + */ + public boolean isClientSide(); + + /** + * This means that Bukkit specific Basefiles are definitely existing! Not if the World is actually bukkit server or not! + */ + public boolean isBukkitSide(); + + /** + * works only ClientSide otherwise returns null + */ + public EntityPlayer getThePlayer(); + + //---------- Internal Usage Only ---------- + + /** + * works only ClientSide otherwise returns 0 + * + * @return the Index of the added Armor + */ + public int addArmor(String aArmorPrefix); + + /** + * Plays the Sonictron Sound for the ItemStack on the Client Side + */ + public void doSonictronSound(ItemStack aStack, World aWorld, double aX, double aY, double aZ); } \ No newline at end of file diff --git a/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java b/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java index ce72d93374..23769af184 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java +++ b/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java @@ -5,408 +5,430 @@ import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; public interface IGT_RecipeAdder { - /** - * Adds a FusionreactorRecipe - * Does not work anymore! - */ - @Deprecated - public boolean addFusionReactorRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aFusionDurationInTicks, int aFusionEnergyPerTick, int aEnergyNeededForStartingFusion); - - /** - * Adds a FusionreactorRecipe - * @param aInput1 = first Input (not null, and respects StackSize) - * @param aInput2 = second Input (not null, and respects StackSize) - * @param aOutput = Output of the Fusion (can be null, and respects StackSize) - * @param aFusionDurationInTicks = How many ticks the Fusion lasts (must be > 0) - * @param aFusionEnergyPerTick = The EU generated per Tick (can even be negative!) - * @param aEnergyNeededForStartingFusion = EU needed for heating the Reactor up (must be >= 0) - * @return true if the Recipe got added, otherwise false. - */ - public boolean addFusionReactorRecipe(FluidStack aInput1, FluidStack aInput2, FluidStack aOutput1, int aFusionDurationInTicks, int aFusionEnergyPerTick, int aEnergyNeededForStartingFusion); - - /** - * Adds a Centrifuge Recipe - * @param aInput1 must be != null - * @param aCellInput this is for the needed Cells, > 0 for Tincellcount, < 0 for negative Fuelcancount, == 0 for nothing - * @param aOutput1 must be != null - * @param aOutput2 can be null - * @param aOutput3 can be null - * @param aOutput4 can be null - * @param aDuration must be > 0 - */ - public boolean addCentrifugeRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration); - - /** - * Adds a Centrifuge Recipe - * @param aInput1 must be != null - * @param aOutput1 must be != null - * @param aOutput2 can be null - * @param aOutput3 can be null - * @param aOutput4 can be null - * @param aDuration must be > 0 - */ - public boolean addCentrifugeRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int[] aChances, int aDuration, int aEUt); - - /** - * Adds a Electrolyzer Recipe - * @param aInput1 must be != null - * @param aCellInput this is for the needed Cells, > 0 for Tincellcount, < 0 for negative Fuelcancount, == 0 for nothing - * @param aOutput1 must be != null - * @param aOutput2 can be null - * @param aOutput3 can be null - * @param aOutput4 can be null - * @param aDuration must be > 0 - * @param aEUt should be > 0 - */ - public boolean addElectrolyzerRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration, int aEUt); - - /** - * Adds a Electrolyzer Recipe - * @param aInput1 must be != null - * @param aCellInput this is for the needed Cells, > 0 for Tincellcount, < 0 for negative Fuelcancount, == 0 for nothing - * @param aOutput1 must be != null - * @param aOutput2 can be null - * @param aOutput3 can be null - * @param aOutput4 can be null - * @param aDuration must be > 0 - * @param aEUt should be > 0 - */ - public boolean addElectrolyzerRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int[] aChances, int aDuration, int aEUt); - - /** - * Adds a Chemical Recipe - * @param aInput1 must be != null - * @param aInput2 must be != null - * @param aOutput1 must be != null - * @param aDuration must be > 0 - */ - public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput, int aDuration); - - /** - * Adds a Chemical Recipe - * @param aInput1 must be != null - * @param aInput2 must be != null - * @param aOutput1 must be != null - * @param aDuration must be > 0 - */ - public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration); - - /** - * Adds a Blast Furnace Recipe - * @param aInput1 must be != null - * @param aInput2 can be null - * @param aOutput1 must be != null - * @param aOutput2 can be null - * @param aDuration must be > 0 - * @param aEUt should be > 0 - * @param aLevel should be > 0 is the minimum Heat Level needed for this Recipe - */ - @Deprecated - public boolean addBlastRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, int aLevel); - - /** - * Adds a Blast Furnace Recipe - * @param aInput1 must be != null - * @param aInput2 can be null - * @param aOutput1 must be != null - * @param aOutput2 can be null - * @param aDuration must be > 0 - * @param aEUt should be > 0 - * @param aLevel should be > 0 is the minimum Heat Level needed for this Recipe - */ - public boolean addBlastRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, int aLevel); - - /** - * Adds a Canning Machine Recipe - * @param aInput1 must be != null - * @param aOutput1 must be != null - * @param aDuration must be > 0, 100 ticks is standard. - * @param aEUt should be > 0, 1 EU/t is standard. - */ - public boolean addCannerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt); - - /** - * Adds an Alloy Smelter Recipe - * @param aInput1 must be != null - * @param aInput2 can be null - * @param aOutput1 must be != null - * @param aOutput2 can be null - * @param aDuration must be > 0 - * @param aEUt should be > 0 - */ - public boolean addAlloySmelterRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt); - - /** - * Adds a CNC-Machine Recipe - * @param aInput1 must be != null - * @param aOutput1 must be != null - * @param aDuration must be > 0 - * @param aEUt should be > 0 - */ - public boolean addCNCRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt); - - /** - * Adds a Circuit Assembler Recipe - * @param aInput1 must be != null - * @param aOutput1 must be != null - * @param aDuration must be > 0 - * @param aEUt should be > 0 - */ - public boolean addAssemblerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt); - - /** - * Adds a Circuit Assembler Recipe - * @param aInput1 must be != null - * @param aOutput1 must be != null - * @param aDuration must be > 0 - * @param aEUt should be > 0 - */ - public boolean addAssemblerRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt); - - /** - * Adds a Forge Hammer Recipe - * @param aInput1 must be != null - * @param aOutput1 must be != null - * @param aDuration must be > 0 - * @param aEUt should be > 0 - */ - public boolean addForgeHammerRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt); - - /** - * Adds a Wiremill Recipe - * @param aInput1 must be != null - * @param aOutput1 must be != null - * @param aDuration must be > 0 - * @param aEUt should be > 0 - */ - public boolean addWiremillRecipe(ItemStack aInput, ItemStack aOutput, int aDuration, int aEUt); - - /** - * Adds a Polariser Recipe - * @param aInput1 must be != null - * @param aOutput1 must be != null - * @param aDuration must be > 0 - * @param aEUt should be > 0 - */ - public boolean addPolarizerRecipe(ItemStack aInput, ItemStack aOutput, int aDuration, int aEUt); - - /** - * Adds a Plate Bending Machine Recipe - * @param aInput1 must be != null - * @param aOutput1 must be != null - * @param aDuration must be > 0 - * @param aEUt should be > 0 - */ - public boolean addBenderRecipe(ItemStack aInput, ItemStack aOutput, int aDuration, int aEUt); - - /** - * Adds a Extruder Machine Recipe - * @param aInput1 must be != null - * @param aShape must be != null, Set the stackSize to 0 if you don't want to let it consume this Item. - * @param aOutput1 must be != null - * @param aDuration must be > 0 - * @param aEUt should be > 0 - */ - public boolean addExtruderRecipe(ItemStack aInput, ItemStack aShape, ItemStack aOutput, int aDuration, int aEUt); - - /** - * Adds a Slicer Machine Recipe - * @param aInput1 must be != null - * @param aShape must be != null, Set the stackSize to 0 if you don't want to let it consume this Item. - * @param aOutput1 must be != null - * @param aDuration must be > 0 - * @param aEUt should be > 0 - */ - public boolean addSlicerRecipe(ItemStack aInput, ItemStack aShape, ItemStack aOutput, int aDuration, int aEUt); - - /** - * Adds an Implosion Compressor Recipe - * @param aInput1 must be != null - * @param aInput2 amount of ITNT, should be > 0 - * @param aOutput1 must be != null - * @param aOutput2 can be null - */ - public boolean addImplosionRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2); - - /** - * Adds a Grinder Recipe - * @param aInput1 must be != null - * @param aInput2 id for the Cell needed for this Recipe - * @param aOutput1 must be != null - * @param aOutput2 can be null - * @param aOutput3 can be null - * @param aOutput4 can be null - */ - public boolean addGrinderRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4); - - /** - * Adds a Distillation Tower Recipe - * @param aInput1 must be != null - * @param aOutputs must be != null 1-5 Fluids - * @param aOutput2 can be null - */ - public boolean addDistillationTowerRecipe(FluidStack aInput, FluidStack[] aOutputs, ItemStack aOutput2, int aDuration, int aEUt); - - - public boolean addSimpleArcFurnaceRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt); - - public boolean addPlasmaArcFurnaceRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt); - - public boolean addPlasmaArcFurnaceRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs,FluidStack aFluidPutput, int[] aChances, int aDuration, int aEUt); - - - - - - - /** - * Adds a Distillation Tower Recipe - */ - public boolean addDistillationRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, int aDuration, int aEUt); - - /** - * Adds a Lathe Machine Recipe - */ - public boolean addLatheRecipe(ItemStack aInput1, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt); - - /** - * Adds a Cutter Recipe - */ - public boolean addCutterRecipe(ItemStack aInput, FluidStack aLubricant, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt); - - /** - * Adds Cutter Recipes with default Lubricants - */ - public boolean addCutterRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt); - - /** - * Adds a Boxing Recipe - */ - public boolean addBoxingRecipe(ItemStack aContainedItem, ItemStack aEmptyBox, ItemStack aFullBox, int aDuration, int aEUt); - - /** - * Adds an Unboxing Recipe - */ - public boolean addUnboxingRecipe(ItemStack aFullBox, ItemStack aContainedItem, ItemStack aEmptyBox, int aDuration, int aEUt); - - /** - * Adds a Vacuum Freezer Recipe - * @param aInput1 must be != null - * @param aOutput1 must be != null - * @param aDuration must be > 0 - */ - public boolean addVacuumFreezerRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration); - - /** - * Adds a Fuel for My Generators - * @param aInput1 must be != null - * @param aOutput1 can be null - * @param aEU EU per MilliBucket. If no Liquid Form of this Container is available, then it will give you EU*1000 per Item. - * @param aType 0 = Diesel; 1 = Gas Turbine; 2 = Thermal; 3 = Dense Fluid; 4 = Plasma; 5 = Magic; And if something is unclear or missing, then look at the GT_Recipe-Class - */ - public boolean addFuel(ItemStack aInput1, ItemStack aOutput1, int aEU, int aType); - - /** - * Adds an Amplifier Recipe for the Amplifabricator - */ - public boolean addAmplifier(ItemStack aAmplifierItem, int aDuration, int aAmplifierAmountOutputted); - - /** - * Adds a Recipe for the Brewing Machine (intentionally limited to Fluid IDs) - */ - public boolean addBrewingRecipe(ItemStack aIngredient, Fluid aInput, Fluid aOutput, boolean aHidden); - - /** - * Adds a Recipe for the Fermenter - */ - public boolean addFermentingRecipe(FluidStack aInput, FluidStack aOutput, int aDuration, boolean aHidden); - - /** - * Adds a Recipe for the Fluid Heater - */ - public boolean addFluidHeaterRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt); - - /** - * Adds a Recipe for the Distillery - */ - public boolean addDistilleryRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean aHidden); - - /** - * Adds a Recipe for the Fluid Solidifier - */ - public boolean addFluidSolidifierRecipe(ItemStack aMold, FluidStack aInput, ItemStack aOutput, int aDuration, int aEUt); - - /** - * Adds a Recipe for Fluid Smelting - */ - public boolean addFluidSmelterRecipe(ItemStack aInput, ItemStack aRemains, FluidStack aOutput, int aChance, int aDuration, int aEUt); - - /** - * Adds a Recipe for Fluid Extraction - */ - public boolean addFluidExtractionRecipe(ItemStack aInput, ItemStack aRemains, FluidStack aOutput, int aChance, int aDuration, int aEUt); - - /** - * Adds a Recipe for the Fluid Canner - */ - public boolean addFluidCannerRecipe(ItemStack aInput, ItemStack aOutput, FluidStack aFluidInput, FluidStack aFluidOutput); - - /** - * Adds a Recipe for the Chemical Bath - */ - public boolean addChemicalBathRecipe(ItemStack aInput, FluidStack aBathingFluid, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, int[] aChances, int aDuration, int aEUt); - - /** - * Adds a Recipe for the Electromagnetic Separator - */ - public boolean addElectromagneticSeparatorRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, int[] aChances, int aDuration, int aEUt); - - /** - * Adds a Recipe for the Printer - */ - public boolean addPrinterRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aSpecialSlot, ItemStack aOutput, int aDuration, int aEUt); - - /** - * Adds a Recipe for the Autoclave - */ - public boolean addAutoclaveRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt); - - /** - * Adds a Recipe for the Mixer - */ - public boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt); - - /** - * Adds a Recipe for the Laser Engraver - */ - public boolean addLaserEngraverRecipe(ItemStack aItemToEngrave, ItemStack aLens, ItemStack aEngravedItem, int aDuration, int aEUt); - - /** - * Adds a Recipe for the Forming Press - */ - public boolean addFormingPressRecipe(ItemStack aItemToImprint, ItemStack aForm, ItemStack aImprintedItem, int aDuration, int aEUt); - - /** - * Adds a Recipe for the Sifter. (up to 9 Outputs) - */ - public boolean addSifterRecipe(ItemStack aItemToSift, ItemStack[] aSiftedItems, int[] aChances, int aDuration, int aEUt); - - /** - * Adds a Recipe for the Arc Furnace. (up to 4 Outputs) - */ - public boolean addArcFurnaceRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt); - - /** - * Adds a Recipe for the GT Pulveriser. (up to 4 Outputs) - */ - public boolean addPulveriserRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt); - - /** - * Adds a Sound to the Sonictron9001 - * you should NOT call this in the preInit-Phase! - * @param aItemStack = The Item you want to display for this Sound - * @param aSoundName = The Name of the Sound in the resources/newsound-folder like Vanillasounds - * @return true if the Sound got added, otherwise false. - */ - public boolean addSonictronSound(ItemStack aItemStack, String aSoundName); + /** + * Adds a FusionreactorRecipe + * Does not work anymore! + */ + @Deprecated + public boolean addFusionReactorRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aFusionDurationInTicks, int aFusionEnergyPerTick, int aEnergyNeededForStartingFusion); + + /** + * Adds a FusionreactorRecipe + * + * @param aInput1 = first Input (not null, and respects StackSize) + * @param aInput2 = second Input (not null, and respects StackSize) + * @param aOutput = Output of the Fusion (can be null, and respects StackSize) + * @param aFusionDurationInTicks = How many ticks the Fusion lasts (must be > 0) + * @param aFusionEnergyPerTick = The EU generated per Tick (can even be negative!) + * @param aEnergyNeededForStartingFusion = EU needed for heating the Reactor up (must be >= 0) + * @return true if the Recipe got added, otherwise false. + */ + public boolean addFusionReactorRecipe(FluidStack aInput1, FluidStack aInput2, FluidStack aOutput1, int aFusionDurationInTicks, int aFusionEnergyPerTick, int aEnergyNeededForStartingFusion); + + /** + * Adds a Centrifuge Recipe + * + * @param aInput1 must be != null + * @param aCellInput this is for the needed Cells, > 0 for Tincellcount, < 0 for negative Fuelcancount, == 0 for nothing + * @param aOutput1 must be != null + * @param aOutput2 can be null + * @param aOutput3 can be null + * @param aOutput4 can be null + * @param aDuration must be > 0 + */ + public boolean addCentrifugeRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration); + + /** + * Adds a Centrifuge Recipe + * + * @param aInput1 must be != null + * @param aOutput1 must be != null + * @param aOutput2 can be null + * @param aOutput3 can be null + * @param aOutput4 can be null + * @param aDuration must be > 0 + */ + public boolean addCentrifugeRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int[] aChances, int aDuration, int aEUt); + + /** + * Adds a Electrolyzer Recipe + * + * @param aInput1 must be != null + * @param aCellInput this is for the needed Cells, > 0 for Tincellcount, < 0 for negative Fuelcancount, == 0 for nothing + * @param aOutput1 must be != null + * @param aOutput2 can be null + * @param aOutput3 can be null + * @param aOutput4 can be null + * @param aDuration must be > 0 + * @param aEUt should be > 0 + */ + public boolean addElectrolyzerRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration, int aEUt); + + /** + * Adds a Electrolyzer Recipe + * + * @param aInput1 must be != null + * @param aCellInput this is for the needed Cells, > 0 for Tincellcount, < 0 for negative Fuelca