aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/interfaces
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/api/interfaces')
-rw-r--r--src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java151
-rw-r--r--src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java152
-rw-r--r--src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java200
-rw-r--r--src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java31
4 files changed, 302 insertions, 232 deletions
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 9d8bca28f8..966ba03cd4 100644
--- a/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java
+++ b/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java
@@ -1,6 +1,5 @@
package gregtech.api.interfaces.internal;
-import gregtech.api.util.GT_Recipe;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
@@ -18,7 +17,7 @@ public interface IGT_RecipeAdder {
*
* @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 aOutput1 = 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)
@@ -39,6 +38,8 @@ public interface IGT_RecipeAdder {
*/
public boolean addCentrifugeRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration);
+ public boolean addCentrifugeRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration, int aEUt);
+
/**
* Adds a Centrifuge Recipe
*
@@ -51,6 +52,7 @@ public interface IGT_RecipeAdder {
*/
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);
+ 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, boolean aCleanroom);
/**
*
* @param aInput1 must be != null
@@ -93,23 +95,26 @@ public interface IGT_RecipeAdder {
*
* @param aInput1 must be != null
* @param aInput2 must be != null
- * @param aOutput1 must be != null
+ * @param aOutput must be != null
* @param aDuration must be > 0
*/
public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput, int aDuration);
+ public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput, int aDuration, int aEUt);
+
/**
* Adds a Chemical Recipe
*
* @param aInput1 must be != null
* @param aInput2 must be != null
- * @param aOutput1 must be != null
+ * @param aOutput 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 Chemical Recipe
+ * Only use this when the recipe conflicts in MultiBlock!
*
* @param aInput1 must be != null
* @param aInput2 must be != null
@@ -117,11 +122,12 @@ public interface IGT_RecipeAdder {
* @param aOutput2 must be != null
* @param aDuration must be > 0
*/
- public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration);
+ public boolean addChemicalRecipeForBasicMachineOnly(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration, int aEUtick);
+
+ public boolean addChemicalRecipeForBasicMachineOnly(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration, int aEUtick, boolean aCleanroom);
/**
* Adds a Chemical Recipe
- * Only use this when the recipe conflicts in MultiBlock!
*
* @param aInput1 must be != null
* @param aInput2 must be != null
@@ -129,8 +135,8 @@ public interface IGT_RecipeAdder {
* @param aOutput2 must be != null
* @param aDuration must be > 0
*/
- public boolean addChemicalRecipeForBasicMachineOnly(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration, int aEUtick);
-
+ public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration);
+
/**
* Adds Recipes for creating a radically polymerized polymer from a base Material (for example Ethylene -> Polyethylene)
* @param aBasicMaterial The basic Material
@@ -150,6 +156,7 @@ public interface IGT_RecipeAdder {
*/
public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUtick);
+ public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration, int aEUtick, boolean aCleanroom);
/**
* Adds a Chemical Recipe
*
@@ -163,19 +170,24 @@ public interface IGT_RecipeAdder {
public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration, int aEUtick);
/**
- * Adds a Chemical Recipe that only exists in the Large Chemical Reactor
- *
- * @param aInputs item inputs
- * @param aFluidInputs fluid inputs
- * @param aFluidOutputs fluid outputs
- * @param aOutputs item outputs
- * @param aDuration must be > 0
- * @param aEUtick must be > 0
- * aInputs and aFluidInputs must contain at least one valid input.
- * aOutputs and aFluidOutputs must contain at least one valid output.
- */
+ + * Adds a Chemical Recipe that only exists in the Large Chemical Reactor
+ + *
+ + * @param aInputs item inputs
+ + * @param aFluidInputs fluid inputs
+ + * @param aFluidOutputs fluid outputs
+ + * @param aOutputs item outputs
+ + * @param aDuration must be > 0
+ + * @param aEUtick must be > 0
+ + * aInputs and aFluidInputs must contain at least one valid input.
+ + * aOutputs and aFluidOutputs must contain at least one valid output.
+ + */
+
public boolean addMultiblockChemicalRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int aDuration, int aEUtick);
-
+
+
+ public boolean addChemicalRecipeDeprecated(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration, int aEUtick);
+
+
/**
* Adds a Blast Furnace Recipe
*
@@ -213,8 +225,10 @@ public interface IGT_RecipeAdder {
* @param aOutput2 must be != null if aOutput1 == null
* @param aDuration must be > 0
*/
+
public boolean addPrimitiveBlastRecipe(ItemStack aInput1, ItemStack aInput2, int aCoalAmount, ItemStack aOutput1, ItemStack aOutput2, int aDuration);
+
/**
* Adds a Canning Machine Recipe
*
@@ -239,7 +253,7 @@ public interface IGT_RecipeAdder {
public boolean addAlloySmelterRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt, boolean hidden);
-
+
/**
* Adds a CNC-Machine Recipe
*
@@ -255,38 +269,43 @@ public interface IGT_RecipeAdder {
*
* @param aInput1 must be != null
* @param aOutput1 must be != null
+ * @param aInput2 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 an Assembler Recipe
- *
- * @param aInput1 must be != null
- * @param aInput2 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 an Assembler Recipe
+ + *
+ + * @param aInputs must be != null
+ + * @param aOutput1 must be != null
+ + * @param aDuration must be > 0
+ + * @param aEUt should be > 0
+ + */
+ public boolean addAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt);
/**
* Adds an Assembler Recipe
*
- * @param aInputs must be != null
+ * @param aInput1 must be != null
* @param aOutput1 must be != null
* @param aDuration must be > 0
* @param aEUt should be > 0
*/
- public boolean addAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt);
+ public boolean addAssemblerRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt);
public boolean addAssemblerRecipe(ItemStack aInput1, Object aOreDict, int aAmount, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt);
public boolean addAssemblerRecipe(ItemStack[] aInputs, Object aOreDict, int aAmount, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt);
+ public boolean addAssemblerRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt, boolean aCleanroom);
+
+ public boolean addAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt, boolean aCleanroom);
+
+
/**
- * Adds a Circuit Assembler Recipe
+ * Adds an Circuit Assembler Recipe
*
* @param aInputs must be 1-6 ItemStacks
* @param aFluidInput 0-1 fluids
@@ -295,9 +314,11 @@ public interface IGT_RecipeAdder {
* @param aEUt should be > 0
*/
public boolean addCircuitAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput, int aDuration, int aEUt);
-
+
+ public boolean addCircuitAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput, int aDuration, int aEUt, boolean aCleanroom);
+
/**
- * Adds a Assemblyline Recipe
+ * Adds an Assemblyline Recipe
*
* @param aInputs must be != null, 4-16 inputs
* @param aFluidInputs 0-4 fluids
@@ -320,8 +341,8 @@ public interface IGT_RecipeAdder {
/**
* Adds a Wiremill Recipe
*
- * @param aInput1 must be != null
- * @param aOutput1 must be != null
+ * @param aInput must be != null
+ * @param aOutput must be != null
* @param aDuration must be > 0
* @param aEUt should be > 0
*/
@@ -330,8 +351,8 @@ public interface IGT_RecipeAdder {
/**
* Adds a Polariser Recipe
*
- * @param aInput1 must be != null
- * @param aOutput1 must be != null
+ * @param aInput must be != null
+ * @param aOutput must be != null
* @param aDuration must be > 0
* @param aEUt should be > 0
*/
@@ -340,8 +361,8 @@ public interface IGT_RecipeAdder {
/**
* Adds a Plate Bending Machine Recipe
*
- * @param aInput1 must be != null
- * @param aOutput1 must be != null
+ * @param aInput must be != null
+ * @param aOutput must be != null
* @param aDuration must be > 0
* @param aEUt should be > 0
*/
@@ -350,9 +371,9 @@ public interface IGT_RecipeAdder {
/**
* Adds a Extruder Machine Recipe
*
- * @param aInput1 must be != null
+ * @param aInput 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 aOutput must be != null
* @param aDuration must be > 0
* @param aEUt should be > 0
*/
@@ -361,9 +382,9 @@ public interface IGT_RecipeAdder {
/**
* Adds a Slicer Machine Recipe
*
- * @param aInput1 must be != null
+ * @param aInput 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 aOutput must be != null
* @param aDuration must be > 0
* @param aEUt should be > 0
*/
@@ -405,7 +426,7 @@ public interface IGT_RecipeAdder {
/**
* Adds a Distillation Tower Recipe
*
- * @param aInput1 must be != null
+ * @param aInput must be != null
* @param aOutputs must be != null 1-5 Fluids
* @param aOutput2 can be null
*/
@@ -439,6 +460,8 @@ public interface IGT_RecipeAdder {
*/
public boolean addCutterRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt);
+ public boolean addCutterRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, boolean aCleanroom);
+
/**
* Adds a Boxing Recipe
*/
@@ -468,6 +491,8 @@ public interface IGT_RecipeAdder {
*/
public boolean addVacuumFreezerRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration);
+ public boolean addVacuumFreezerRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt);
+
/**
* Adds a Fuel for My Generators
*
@@ -488,11 +513,17 @@ public interface IGT_RecipeAdder {
*/
public boolean addBrewingRecipe(ItemStack aIngredient, Fluid aInput, Fluid aOutput, boolean aHidden);
+ public boolean addBrewingRecipe(ItemStack aIngredient, Fluid aInput, Fluid aOutput, int aDuration, int aEUt, boolean aHidden);
+
+ public boolean addBrewingRecipeCustom(ItemStack aIngredient, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean aHidden);
+
/**
* Adds a Recipe for the Fermenter
*/
public boolean addFermentingRecipe(FluidStack aInput, FluidStack aOutput, int aDuration, boolean aHidden);
+ public boolean addFermentingRecipe(FluidStack aInput, FluidStack aOutput, int aDuration, int aEUT, boolean aHidden);
+
/**
* Adds a Recipe for the Fluid Heater
*/
@@ -501,6 +532,7 @@ public interface IGT_RecipeAdder {
/**
* Adds a Recipe for the Distillery
*/
+
public boolean addDistilleryRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, ItemStack aSolidOutput, int aDuration, int aEUt, boolean aHidden);
public boolean addDistilleryRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean aHidden);
@@ -508,7 +540,7 @@ public interface IGT_RecipeAdder {
public boolean addDistilleryRecipe(int circuitConfig, FluidStack aInput, FluidStack aOutput, ItemStack aSolidOutput, int aDuration, int aEUt, boolean aHidden);
public boolean addDistilleryRecipe(int aCircuit, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean aHidden);
-
+
/**
* Adds a Recipe for the Fluid Solidifier
*/
@@ -518,7 +550,7 @@ public interface IGT_RecipeAdder {
* 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 Smelting
*/
@@ -534,6 +566,7 @@ public interface IGT_RecipeAdder {
*/
public boolean addFluidCannerRecipe(ItemStack aInput, ItemStack aOutput, FluidStack aFluidInput, FluidStack aFluidOutput);
+ public boolean addFluidCannerRecipe(ItemStack aInput, ItemStack aOutput, FluidStack aFluidInput, FluidStack aFluidOutput, int aDuration,int aEUt);
/**
* Adds a Recipe for the Chemical Bath
*/
@@ -564,11 +597,14 @@ public interface IGT_RecipeAdder {
*/
public boolean addAutoclaveRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt, boolean aCleanroom);
+ public boolean addAutoclaveSpaceRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt, boolean aCleanroom);
+
/**
* 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);
+ public boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, ItemStack aInput5, ItemStack aInput6, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt);
/**
* Adds a Recipe for the Laser Engraver
*/
@@ -598,7 +634,7 @@ public interface IGT_RecipeAdder {
*/
public boolean addArcFurnaceRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt, boolean hidden);
-
+
/**
* Adds a Recipe for the GT Pulveriser. (up to 4 Outputs)
*/
@@ -613,7 +649,7 @@ public interface IGT_RecipeAdder {
* Adds a Distillation Tower Recipe
* Every Fluid also gets separate distillation recipes
*
- * @param aInput1 must be != null
+ * @param aInput must be != null
* @param aOutputs must be != null 1-5 Fluids
* @param aOutput2 can be null
*/
@@ -639,6 +675,7 @@ public interface IGT_RecipeAdder {
* @param aDuration
* @param aEUt
*/
+
@Deprecated
public boolean addCrackingRecipe(FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt);
@@ -652,6 +689,7 @@ public interface IGT_RecipeAdder {
* @param aDuration
* @param aEUt
*/
+
public boolean addCrackingRecipe(int circuitConfig, FluidStack aInput, FluidStack aInput2, FluidStack aOutput, int aDuration, int aEUt);
/**
@@ -664,16 +702,19 @@ public interface IGT_RecipeAdder {
*/
public boolean addSonictronSound(ItemStack aItemStack, String aSoundName);
+
/**
* Returns whether the recipes added are currently being marked as deprecated.
* Currently only affects Chemical Reactor Recipes.
*/
- public boolean isAddingDeprecatedRecipes();
- /**
- * Sets whether the recipes added from this point on should be marked as deprecated or not.
+ public boolean isAddingDeprecatedRecipes();
+
+ /**
+ * Sets whether the recipes added from this point on should be marked as deprecated or not.
* Currently only affects Chemical Reactor Recipes.
- */
- public void setIsAddingDeprecatedRecipes(boolean isAddingDeprecatedRecipes);
+ */
+
+ //public void setIsAddingDeprecatedRecipes(boolean isAddingDeprecatedRecipes);
}
diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java
index 356c407985..1ebeda2895 100644
--- a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java
+++ b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntity.java
@@ -52,181 +52,191 @@ public interface IMetaTileEntity extends ISidedInventory, IFluidTank, IFluidHand
* 14 = BaseMetaPipeEntity, Axe lvl 2 to dismantle
* 15 = BaseMetaPipeEntity, Axe lvl 3 to dismantle
*/
- public byte getTileEntityBaseType();
+ byte getTileEntityBaseType();
/**
* @param aTileEntity is just because the internal Variable "mBaseMetaTileEntity" is set after this Call.
* @return a newly created and ready MetaTileEntity
*/
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity);
+ IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity);
/**
* @return an ItemStack representing this MetaTileEntity.
*/
- public ItemStack getStackForm(long aAmount);
+ ItemStack getStackForm(long aAmount);
/**
* new getter for the BaseMetaTileEntity, which restricts usage to certain Functions.
*/
- public IGregTechTileEntity getBaseMetaTileEntity();
+ IGregTechTileEntity getBaseMetaTileEntity();
/**
* Sets the BaseMetaTileEntity of this
*/
- public void setBaseMetaTileEntity(IGregTechTileEntity aBaseMetaTileEntity);
+ void setBaseMetaTileEntity(IGregTechTileEntity aBaseMetaTileEntity);
/**
* when placing a Machine in World, to initialize default Modes. aNBT can be null!
*/
- public void initDefaultModes(NBTTagCompound aNBT);
+ void initDefaultModes(NBTTagCompound aNBT);
/**
* ^= writeToNBT
*/
- public void saveNBTData(NBTTagCompound aNBT);
+ void saveNBTData(NBTTagCompound aNBT);
/**
* ^= readFromNBT
*/
- public void loadNBTData(NBTTagCompound aNBT);
+ void loadNBTData(NBTTagCompound aNBT);
/**
* Adds the NBT-Information to the ItemStack, when being dismanteled properly
* Used to store Machine specific Upgrade Data.
*/
- public void setItemNBT(NBTTagCompound aNBT);
+ void setItemNBT(NBTTagCompound aNBT);
/**
* Called in the registered MetaTileEntity when the Server starts, to reset static variables
*/
- public void onServerStart();
+ void onServerStart();
/**
* Called in the registered MetaTileEntity when the Server ticks a World the first time, to load things from the World Save
*/
- public void onWorldLoad(File aSaveDirectory);
+ void onWorldLoad(File aSaveDirectory);
/**
* Called in the registered MetaTileEntity when the Server stops, to save the Game.
*/
- public void onWorldSave(File aSaveDirectory);
+ void onWorldSave(File aSaveDirectory);
/**
* Called to set Configuration values for this MetaTileEntity.
* Use aConfig.get(ConfigCategories.machineconfig, "MetaTileEntityName.Ability", DEFAULT_VALUE); to set the Values.
*/
- public void onConfigLoad(GT_Config aConfig);
+ void onConfigLoad(GT_Config aConfig);
/**
* If a Cover of that Type can be placed on this Side.
* Also Called when the Facing of the Block Changes and a Cover is on said Side.
*/
- public boolean allowCoverOnSide(byte aSide, GT_ItemStack aStack);
+ boolean allowCoverOnSide(byte aSide, GT_ItemStack aStack);
/**
* When a Player rightclicks the Facing with a Screwdriver.
*/
- public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ);
+ void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ);
/**
* When a Player rightclicks the Facing with a Wrench.
*/
- public boolean onWrenchRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ);
+ boolean onWrenchRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ);
+
+ /**
+ * When a Player rightclicks the Facing with a wire cutter.
+ */
+ boolean onWireCutterRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ);
+
+ /**
+ * When a Player rightclicks the Facing with a soldering iron.
+ */
+ boolean onSolderingToolRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ);
/**
* Called right before this Machine explodes
*/
- public void onExplosion();
+ void onExplosion();
/**
* The First processed Tick which was passed to this MetaTileEntity
*/
- public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity);
+ void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity);
/**
* The Tick before all the generic handling happens, what gives a slightly faster reaction speed.
* Don't use this if you really don't need to. @onPostTick is better suited for ticks.
* This happens still after the Cover handling.
*/
- public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick);
+ void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick);
/**
* The Tick after all the generic handling happened.
* Recommended to use this like updateEntity.
*/
- public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick);
+ void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick);
/**
* Called when this MetaTileEntity gets (intentionally) disconnected from the BaseMetaTileEntity.
* Doesn't get called when this thing is moved by Frames or similar hacks.
*/
- public void inValidate();
+ void inValidate();
/**
* Called when the BaseMetaTileEntity gets invalidated, what happens right before the @inValidate above gets called
*/
- public void onRemoval();
+ void onRemoval();
/**
* @param aFacing
* @return if aFacing would be a valid Facing for this Device. Used for wrenching.
*/
- public boolean isFacingValid(byte aFacing);
+ boolean isFacingValid(byte aFacing);
/**
* @return the Server Side Container
*/
- public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity);
+ Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity);
/**
* @return the Client Side GUI Container
*/
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity);
+ Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity);
/**
* From new ISidedInventory
*/
- public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack);
+ boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack);
/**
* From new ISidedInventory
*/
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack);
+ boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack);
/**
* @return if aIndex is a valid Slot. false for things like HoloSlots. Is used for determining if an Item is dropped upon Block destruction and for Inventory Access Management
*/
- public boolean isValidSlot(int aIndex);
+ boolean isValidSlot(int aIndex);
/**
* @return if aIndex can be set to Zero stackSize, when being removed.
*/
- public boolean setStackToZeroInsteadOfNull(int aIndex);
+ boolean setStackToZeroInsteadOfNull(int aIndex);
/**
* If this Side can connect to inputting pipes
*/
- public boolean isLiquidInput(byte aSide);
+ boolean isLiquidInput(byte aSide);
/**
* If this Side can connect to outputting pipes
*/
- public boolean isLiquidOutput(byte aSide);
+ boolean isLiquidOutput(byte aSide);
/**
* Just an Accessor for the Name variable.
*/
- public String getMetaName();
+ String getMetaName();
/**
* @return true if the Machine can be accessed
*/
- public boolean isAccessAllowed(EntityPlayer aPlayer);
+ boolean isAccessAllowed(EntityPlayer aPlayer);
/**
* When a Machine Update occurs
*/
- public void onMachineBlockUpdate();
+ void onMachineBlockUpdate();
/**
* a Player rightclicks the Machine
@@ -234,18 +244,18 @@ public interface IMetaTileEntity extends ISidedInventory, IFluidTank, IFluidHand
*
* @return
*/
- public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ);
+ boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ);
/**
* a Player leftclicks the Machine
* Sneaky leftclicks are getting passed to this unlike with the rightclicks.
*/
- public void onLeftclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer);
+ void onLeftclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer);
/**
* Called Clientside with the Data got from @getUpdateData
*/
- public void onValueUpdate(byte aValue);
+ void onValueUpdate(byte aValue);
/**
* return a small bit of Data, like a secondary Facing for example with this Function, for the Client.
@@ -254,50 +264,50 @@ public interface IMetaTileEntity extends ISidedInventory, IFluidTank, IFluidHand
* <p/>
* If you just want to have an Active/Redstone State then set the Active State inside the BaseMetaTileEntity instead.
*/
- public byte getUpdateData();
+ byte getUpdateData();
/**
* For the rare case you need this Function
*/
- public void receiveClientEvent(byte aEventID, byte aValue);
+ void receiveClientEvent(byte aEventID, byte aValue);
/**
* Called to actually play the Sound.
* Do not insert Client/Server checks. That is already done for you.
* Do not use @playSoundEffect, Minecraft doesn't like that at all. Use @playSound instead.
*/
- public void doSound(byte aIndex, double aX, double aY, double aZ);
+ void doSound(byte aIndex, double aX, double aY, double aZ);
- public void startSoundLoop(byte aIndex, double aX, double aY, double aZ);
+ void startSoundLoop(byte aIndex, double aX, double aY, double aZ);
- public void stopSoundLoop(byte aValue, double aX, double aY, double aZ);
+ void stopSoundLoop(byte aValue, double aX, double aY, double aZ);
/**
* Sends the Event for the Sound Triggers, only usable Server Side!
*/
- public void sendSound(byte aIndex);
+ void sendSound(byte aIndex);
/**
* Sends the Event for the Sound Triggers, only usable Server Side!
*/
- public void sendLoopStart(byte aIndex);
+ void sendLoopStart(byte aIndex);
/**
* Sends the Event for the Sound Triggers, only usable Server Side!
*/
- public void sendLoopEnd(byte aIndex);
+ void sendLoopEnd(byte aIndex);
/**
* Called when the Machine explodes, override Explosion Code here.
*
* @param aExplosionPower
*/
- public void doExplosion(long aExplosionPower);
+ void doExplosion(long aExplosionPower);
/**
* If this is just a simple Machine, which can be wrenched at 100%
*/
- public boolean isSimpleMachine();
+ boolean isSimpleMachine();
/**
* If there should be a Lag Warning if something laggy happens during this Tick.
@@ -305,22 +315,22 @@ public interface IMetaTileEntity extends ISidedInventory, IFluidTank, IFluidHand
* The Advanced Pump uses this to not cause the Lag Message, while it scans for all close Fluids.
* The Item Pipes and Retrievers neither send this Message, when scanning for Pipes.
*/
- public boolean doTickProfilingMessageDuringThisTick();
+ boolean doTickProfilingMessageDuringThisTick();
/**
* returns the DebugLog
*/
- public ArrayList<String> getSpecialDebugInfo(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, int aLogLevel, ArrayList<String> aList);
+ ArrayList<String> getSpecialDebugInfo(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, int aLogLevel, ArrayList<String> aList);
/**
* get a small Description
*/
- public String[] getDescription();
+ String[] getDescription();
/**
* In case the Output Voltage varies.
*/
- public String getSpecialVoltageToolTip();
+ String getSpecialVoltageToolTip();
/**
* Icon of the Texture. If this returns null then it falls back to getTextureIndex.
@@ -331,7 +341,7 @@ public interface IMetaTileEntity extends ISidedInventory, IFluidTank, IFluidHand
* @param aActive if the Machine is currently active (use this instead of calling mBaseMetaTileEntity.mActive!!!). Note: In case of Pipes this means if this Side is connected to something or not.
* @param aRedstone if the Machine is currently outputting a RedstoneSignal (use this instead of calling mBaseMetaTileEntity.mRedstone!!!)
*/
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone);
+ ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone);
/**
* The Textures used for the Item rendering. Return null if you want the regular 3D Block Rendering.
@@ -345,55 +355,55 @@ public interface IMetaTileEntity extends ISidedInventory, IFluidTank, IFluidHand
* @param aBlockIconRegister The Block Icon Register
*/
@SideOnly(Side.CLIENT)
- public void registerIcons(IIconRegister aBlockIconRegister);
+ void registerIcons(IIconRegister aBlockIconRegister);
/**
* @return true if you override the Rendering.
*/
@SideOnly(Side.CLIENT)
- public boolean renderInInventory(Block aBlock, int aMeta, RenderBlocks aRenderer);
+ boolean renderInInventory(Block aBlock, int aMeta, RenderBlocks aRenderer);
/**
* @return true if you override the Rendering.
*/
@SideOnly(Side.CLIENT)
- public boolean renderInWorld(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, RenderBlocks aRenderer);
+ boolean renderInWorld(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, RenderBlocks aRenderer);
/**
* Gets the Output for the comparator on the given Side
*/
- public byte getComparatorValue(byte aSide);
+ byte getComparatorValue(byte aSide);
- public float getExplosionResistance(byte aSide);
+ float getExplosionResistance(byte aSide);
- public String[] getInfoData();
+ String[] getInfoData();
- public boolean isGivingInformation();
+ boolean isGivingInformation();
- public ItemStack[] getRealInventory();
+ ItemStack[] getRealInventory();
- public boolean connectsToItemPipe(byte aSide);
+ boolean connectsToItemPipe(byte aSide);
- public void onColorChangeServer(byte aColor);
+ void onColorChangeServer(byte aColor);
- public void onColorChangeClient(byte aColor);
+ void onColorChangeClient(byte aColor);
- public int getLightOpacity();
+ int getLightOpacity();
- public boolean allowGeneralRedstoneOutput();
+ boolean allowGeneralRedstoneOutput();
- public void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List<AxisAlignedBB> outputAABB, Entity collider);
+ void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List<AxisAlignedBB> outputAABB, Entity collider);
- public AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ);
+ AxisAlignedBB getCollisionBoundingBoxFromPool(World aWorld, int aX, int aY, int aZ);
- public void onEntityCollidedWithBlock(World aWorld, int aX, int aY, int aZ, Entity collider);
+ void onEntityCollidedWithBlock(World aWorld, int aX, int aY, int aZ, Entity collider);
/**
* The onCreated Function of the Item Class redirects here
*/
- public void onCreated(ItemStack aStack, World aWorld, EntityPlayer aPlayer);
+ void onCreated(ItemStack aStack, World aWorld, EntityPlayer aPlayer);
- public boolean hasAlternativeModeText();
+ boolean hasAlternativeModeText();
- public String getAlternativeModeText();
+ String getAlternativeModeText();
} \ No newline at end of file
diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java
index 04d9f0fb84..7187ccb04b 100644
--- a/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java
+++ b/src/main/java/gregtech/api/interfaces/metatileentity/IMetaTileEntityItemPipe.java
@@ -1,100 +1,100 @@
-package gregtech.api.interfaces.metatileentity;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.BaseMetaPipeEntity;
-import gregtech.api.util.GT_Utility;
-
-import java.util.Map;
-
-public interface IMetaTileEntityItemPipe extends IMetaTileEntity {
- /**
- * @return if this Pipe can still be used.
- */
- public boolean pipeCapacityCheck();
-
- /**
- * @return if this Pipe can still be used.
- */
- public boolean incrementTransferCounter(int aIncrement);
-
- /**
- * Sends an ItemStack from aSender to the adjacent Blocks.
- *
- * @param aSender the BaseMetaTileEntity sending the Stack.
- * @return if it was able to send something
- */
- public boolean sendItemStack(Object aSender);
-
- /**
- * Executes the Sending Code for inserting Stacks into the TileEntities.
- *
- * @param aSender the BaseMetaTileEntity sending the Stack.
- * @param aSide the Side of the PIPE facing the TileEntity.
- * @return if this Side was allowed to Output into the Block.
- */
- public boolean insertItemStackIntoTileEntity(Object aSender, byte aSide);
-
- /**
- * Can be used to make flow control Pipes, like Redpowers Restriction Tubes.
- * Every normal Pipe returns a Value of 32768, so you can easily insert lower Numbers to set Routing priorities.
- * Negative Numbers to "suck" Items into a certain direction are also possible.
- */
- public int getStepSize();
-
- /**
- * Utility for the Item Network
- */
- public static class Util {
- /**
- * @return a List of connected Item Pipes
- */
- public static Map<IMetaTileEntityItemPipe, Long> scanPipes(IMetaTileEntityItemPipe aMetaTileEntity, Map<IMetaTileEntityItemPipe, Long> aMap, long aStep, boolean aSuckItems, boolean aIgnoreCapacity) {
- aStep += aMetaTileEntity.getStepSize();
- if (aIgnoreCapacity || aMetaTileEntity.pipeCapacityCheck())
- if (aMap.get(aMetaTileEntity) == null || aMap.get(aMetaTileEntity) > aStep) {
- IGregTechTileEntity aBaseMetaTileEntity = aMetaTileEntity.getBaseMetaTileEntity();
- aMap.put(aMetaTileEntity, aStep);
- for (byte i = 0, j = 0; i < 6; i++) {
- if (aMetaTileEntity instanceof IConnectable && !((IConnectable) aMetaTileEntity).isConnectedAtSide(i)) continue;
- j = GT_Utility.getOppositeSide(i);
- if (aSuckItems) {
- if (aBaseMetaTileEntity.getCoverBehaviorAtSide(i).letsItemsIn(i, aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), -2, aBaseMetaTileEntity)) {
- IGregTechTileEntity tItemPipe = aBaseMetaTileEntity.getIGregTechTileEntityAtSide(i);
- if (aBaseMetaTileEntity.getColorization() >= 0) {
- byte tColor = tItemPipe.getColorization();
- if (tColor >= 0 && tColor != aBaseMetaTileEntity.getColorization()) {
- continue;
- }
- }
- if (tItemPipe instanceof BaseMetaPipeEntity) {
- IMetaTileEntity tMetaTileEntity = tItemPipe.getMetaTileEntity();
- if (tMetaTileEntity instanceof IMetaTileEntityItemPipe && tItemPipe.getCoverBehaviorAtSide(j).letsItemsOut(j, tItemPipe.getCoverIDAtSide(j), tItemPipe.getCoverDataAtSide(j), -2, tItemPipe)) {
- scanPipes((IMetaTileEntityItemPipe) tMetaTileEntity, aMap, aStep, aSuckItems, aIgnoreCapacity);
- }
- }
- }
- } else {
- if (aBaseMetaTileEntity.getCoverBehaviorAtSide(i).letsItemsOut(i, aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), -2, aBaseMetaTileEntity)) {
- IGregTechTileEntity tItemPipe = aBaseMetaTileEntity.getIGregTechTileEntityAtSide(i);
- if (tItemPipe != null) {
- if (aBaseMetaTileEntity.getColorization() >= 0) {
- byte tColor = tItemPipe.getColorization();
- if (tColor >= 0 && tColor != aBaseMetaTileEntity.getColorization()) {
- continue;
- }
- }
- if (tItemPipe instanceof BaseMetaPipeEntity) {
- IMetaTileEntity tMetaTileEntity = tItemPipe.getMetaTileEntity();
- if (tMetaTileEntity instanceof IMetaTileEntityItemPipe && tItemPipe.getCoverBehaviorAtSide(j).letsItemsIn(j, tItemPipe.getCoverIDAtSide(j), tItemPipe.getCoverDataAtSide(j), -2, tItemPipe)) {
- scanPipes((IMetaTileEntityItemPipe) tMetaTileEntity, aMap, aStep, aSuckItems, aIgnoreCapacity);
- }
- }
- }
- }
- }
- }
- }
- return aMap;
- }
- }
-}
+package gregtech.api.interfaces.metatileentity;
+
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.BaseMetaPipeEntity;
+import gregtech.api.util.GT_Utility;
+
+import java.util.Map;
+
+public interface IMetaTileEntityItemPipe extends IMetaTileEntity {
+ /**
+ * @return if this Pipe can still be used.
+ */
+ public boolean pipeCapacityCheck();
+
+ /**
+ * @return if this Pipe can still be used.
+ */
+ public boolean incrementTransferCounter(int aIncrement);
+
+ /**
+ * Sends an ItemStack from aSender to the adjacent Blocks.
+ *
+ * @param aSender the BaseMetaTileEntity sending the Stack.
+ * @return if it was able to send something
+ */
+ public boolean sendItemStack(Object aSender);
+
+ /**
+ * Executes the Sending Code for inserting Stacks into the TileEntities.
+ *
+ * @param aSender the BaseMetaTileEntity sending the Stack.
+ * @param aSide the Side of the PIPE facing the TileEntity.
+ * @return if this Side was allowed to Output into the Block.
+ */
+ public boolean insertItemStackIntoTileEntity(Object aSender, byte aSide);
+
+ /**
+ * Can be used to make flow control Pipes, like Redpowers Restriction Tubes.
+ * Every normal Pipe returns a Value of 32768, so you can easily insert lower Numbers to set Routing priorities.
+ * Negative Numbers to "suck" Items into a certain direction are also possible.
+ */
+ public int getStepSize();
+
+ /**
+ * Utility for the Item Network
+ */
+ public static class Util {
+ /**
+ * @return a List of connected Item Pipes
+ */
+ public static Map<IMetaTileEntityItemPipe, Long> scanPipes(IMetaTileEntityItemPipe aMetaTileEntity, Map<IMetaTileEntityItemPipe, Long> aMap, long aStep, boolean aSuckItems, boolean aIgnoreCapacity) {
+ aStep += aMetaTileEntity.getStepSize();
+ if (aIgnoreCapacity || aMetaTileEntity.pipeCapacityCheck())
+ if (aMap.get(aMetaTileEntity) == null || aMap.get(aMetaTileEntity) > aStep) {
+ IGregTechTileEntity aBaseMetaTileEntity = aMetaTileEntity.getBaseMetaTileEntity();
+ aMap.put(aMetaTileEntity, aStep);
+ for (byte i = 0, j = 0; i < 6; i++) {
+ if (aMetaTileEntity instanceof IConnectable && !((IConnectable) aMetaTileEntity).isConnectedAtSide(i)) continue;
+ j = GT_Utility.getOppositeSide(i);
+ if (aSuckItems) {
+ if (aBaseMetaTileEntity.getCoverBehaviorAtSide(i).letsItemsIn(i, aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), -2, aBaseMetaTileEntity)) {
+ IGregTechTileEntity tItemPipe = aBaseMetaTileEntity.getIGregTechTileEntityAtSide(i);
+ if (aBaseMetaTileEntity.getColorization() >= 0) {
+ byte tColor = tItemPipe.getColorization();
+ if (tColor >= 0 && tColor != aBaseMetaTileEntity.getColorization()) {
+ continue;
+ }
+ }
+ if (tItemPipe instanceof BaseMetaPipeEntity) {
+ IMetaTileEntity tMetaTileEntity = tItemPipe.getMetaTileEntity();
+ if (tMetaTileEntity instanceof IMetaTileEntityItemPipe && tItemPipe.getCoverBehaviorAtSide(j).letsItemsOut(j, tItemPipe.getCoverIDAtSide(j), tItemPipe.getCoverDataAtSide(j), -2, tItemPipe)) {
+ scanPipes((IMetaTileEntityItemPipe) tMetaTileEntity, aMap, aStep, aSuckItems, aIgnoreCapacity);
+ }
+ }
+ }
+ } else {
+ if (aBaseMetaTileEntity.getCoverBehaviorAtSide(i).letsItemsOut(i, aBaseMetaTileEntity.getCoverIDAtSide(i), aBaseMetaTileEntity.getCoverDataAtSide(i), -2, aBaseMetaTileEntity)) {
+ IGregTechTileEntity tItemPipe = aBaseMetaTileEntity.getIGregTechTileEntityAtSide(i);
+ if (tItemPipe != null) {
+ if (aBaseMetaTileEntity.getColorization() >= 0) {
+ byte tColor = tItemPipe.getColorization();
+ if (tColor >= 0 && tColor != aBaseMetaTileEntity.getColorization()) {
+ continue;
+ }
+ }
+ if (tItemPipe instanceof BaseMetaPipeEntity) {
+ IMetaTileEntity tMetaTileEntity = tItemPipe.getMetaTileEntity();
+ if (tMetaTileEntity instanceof IMetaTileEntityItemPipe && tItemPipe.getCoverBehaviorAtSide(j).letsItemsIn(j, tItemPipe.getCoverIDAtSide(j), tItemPipe.getCoverDataAtSide(j), -2, tItemPipe)) {
+ scanPipes((IMetaTileEntityItemPipe) tMetaTileEntity, aMap, aStep, aSuckItems, aIgnoreCapacity);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return aMap;
+ }
+ }
+}
diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java
index 98360411bd..becda3c32d 100644
--- a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java
+++ b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java
@@ -45,7 +45,7 @@ public interface IEnergyConnected extends IColoredTileEntity, IHasWorldObjectAnd
* Are we ready for energy state?
*/
public boolean energyStateReady();
-
+
/**
* Utility for the Network
*/
@@ -78,15 +78,34 @@ public interface IEnergyConnected extends IColoredTileEntity, IHasWorldObjectAnd
}
} else if (GregTech_API.mOutputRF && tTileEntity instanceof IEnergyReceiver) {
ForgeDirection tDirection = ForgeDirection.getOrientation(i).getOpposite();
- int rfOut = (int) (aVoltage * GregTech_API.mEUtoRF / 100);
+ int rfOut = GT_Utility.safeInt(aVoltage * GregTech_API.mEUtoRF / 100);
if (((IEnergyReceiver) tTileEntity).receiveEnergy(tDirection, rfOut, true) == rfOut) {
((IEnergyReceiver) tTileEntity).receiveEnergy(tDirection, rfOut, false);
rUsedAmperes++;
}
- if (GregTech_API.mRFExplosions && GregTech_API.sMachineExplosions && ((IEnergyReceiver) tTileEntity).getMaxEnergyStored(tDirection) < rfOut * 600) {
- if (rfOut > 32 * GregTech_API.mEUtoRF / 100) {
+ if (GregTech_API.mRFExplosions && GregTech_API.sMachineExplosions && ((IEnergyReceiver) tTileEntity).getMaxEnergyStored(tDirection) < rfOut * 600L) {
+ if (rfOut > 32L * GregTech_API.mEUtoRF / 100L) {
int aExplosionPower = rfOut;
- float tStrength = aExplosionPower < V[0] ? 1.0F : aExplosionPower < V[1] ? 2.0F : aExplosionPower < V[2] ? 3.0F : aExplosionPower < V[3] ? 4.0F : aExplosionPower < V[4] ? 5.0F : aExplosionPower < V[4] * 2 ? 6.0F : aExplosionPower < V[5] ? 7.0F : aExplosionPower < V[6] ? 8.0F : aExplosionPower < V[7] ? 9.0F : 10.0F;
+ float tStrength =
+ aExplosionPower < V[0] ? 1.0F :
+ aExplosionPower < V[1] ? 2.0F :
+ aExplosionPower < V[2] ? 3.0F :
+ aExplosionPower < V[3] ? 4.0F :
+ aExplosionPower < V[4] ? 5.0F :
+ aExplosionPower < V[4] * 2 ? 6.0F :
+ aExplosionPower < V[5] ? 7.0F :
+ aExplosionPower < V[6] ? 8.0F :
+ aExplosionPower < V[7] ? 9.0F :
+ aExplosionPower < V[8] ? 10.0F :
+ aExplosionPower < V[8] * 2 ? 11.0F :
+ aExplosionPower < V[9] ? 12.0F :
+ aExplosionPower < V[10] ? 13.0F :
+ aExplosionPower < V[11] ? 14.0F :
+ aExplosionPower < V[12] ? 15.0F :
+ aExplosionPower < V[12] * 2 ? 16.0F :
+ aExplosionPower < V[13] ? 17.0F :
+ aExplosionPower < V[14] ? 18.0F :
+ aExplosionPower < V[15] ? 19.0F : 20.0F;
int tX = tTileEntity.xCoord, tY = tTileEntity.yCoord, tZ = tTileEntity.zCoord;
World tWorld = tTileEntity.getWorldObj();
GT_Utility.sendSoundToPlayers(tWorld, GregTech_API.sSoundList.get(209), 1.0F, -1, tX, tY, tZ);
@@ -102,4 +121,4 @@ public interface IEnergyConnected extends IColoredTileEntity, IHasWorldObjectAnd
return rUsedAmperes;
}
}
-} \ No newline at end of file
+}