diff options
Diffstat (limited to 'src/main/java/gregtech/api/interfaces')
3 files changed, 121 insertions, 5 deletions
diff --git a/src/main/java/gregtech/api/interfaces/IMaterialHandler.java b/src/main/java/gregtech/api/interfaces/IMaterialHandler.java new file mode 100644 index 0000000000..9ca97981bf --- /dev/null +++ b/src/main/java/gregtech/api/interfaces/IMaterialHandler.java @@ -0,0 +1,11 @@ +package gregtech.api.interfaces; + +import gregtech.api.enums.Materials; + +public interface IMaterialHandler { + void onMaterialsInit(); + + void onComponentInit(); + + void onComponentIteration(Materials aMaterial); +} 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 a461eb7316..ac9389f081 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java +++ b/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java @@ -53,6 +53,15 @@ 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); /** + * + * @param aInput1 must be != null + * @param aOutput1 must be != null + * @param aDuration must be > 0 + * @return + */ + public boolean addCompressorRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt); + + /** * Adds a Electrolyzer Recipe * * @param aInput1 must be != null @@ -102,7 +111,47 @@ public interface IGT_RecipeAdder { */ public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration); - public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, 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 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); + + /** + * Adds Recipes for creating a radically polymerized polymer from a base Material (for example Ethylene -> Polyethylene) + * @param aBasicMaterial The basic Material + * @param aPolymer The polymer + */ + public void addDefaultPolymerizationRecipes(Fluid aBasicMaterial, Fluid aPolymer); + + /** + * Adds a Chemical Recipe + * + * @param aInput1 must be != null + * @param aInput2 must be != null + * @param aOutput1 must be != null + * @param aDuration must be > 0 + * @param aEUtick must be > 0 + */ + 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 + * + * @param aInput1 must be != null + * @param aInput2 must be != null + * @param aOutput1 must be != null + * @param aOutput2 must be != null + * @param aDuration must be > 0 + * @param aEUtick must be > 0 + */ + public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration, int aEUtick); /** @@ -168,7 +217,7 @@ public interface IGT_RecipeAdder { public boolean addCNCRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt); /** - * Adds a Circuit Assembler Recipe + * Adds a Assembler Recipe * * @param aInput1 must be != null * @param aOutput1 must be != null @@ -178,7 +227,7 @@ public interface IGT_RecipeAdder { public boolean addAssemblerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt); /** - * Adds a Circuit Assembler Recipe + * Adds a Assembler Recipe * * @param aInput1 must be != null * @param aOutput1 must be != null @@ -187,6 +236,24 @@ public interface IGT_RecipeAdder { */ 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 aInput1, ItemStack aInput2, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt, boolean aCleanroom); + + + /** + * Adds a Assembler Recipe + * + * @param aInputs must be 1-6 ItemStacks + * @param aFluidInput 0-1 fluids + * @param aOutput must be != null + * @param aDuration must be > 0 + * @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 * @@ -261,6 +328,17 @@ public interface IGT_RecipeAdder { public boolean addSlicerRecipe(ItemStack aInput, ItemStack aShape, ItemStack aOutput, int aDuration, int aEUt); /** + * + * @param aInput must be != null + * @param aFluidInput must be != null + * @param aOutput1 must be != null + * @param aDuration must be > 0 + * @param aEUt should be > 0 + * @return + */ + public boolean addOreWasherRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, FluidStack aFluidInput, int aDuration, int aEUt); + + /** * Adds an Implosion Compressor Recipe * * @param aInput1 must be != null @@ -319,12 +397,24 @@ 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 */ public boolean addBoxingRecipe(ItemStack aContainedItem, ItemStack aEmptyBox, ItemStack aFullBox, int aDuration, int aEUt); /** + * + * @param aInput must be != null + * @param aOutput1 must be != null + * @param aDuration must be > 0 + * @param aEUt should be > 0 + * @return + */ + public boolean addThermalCentrifugeRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, int aDuration, int aEUt); + + /** * Adds an Unboxing Recipe */ public boolean addUnboxingRecipe(ItemStack aFullBox, ItemStack aContainedItem, ItemStack aEmptyBox, int aDuration, int aEUt); @@ -379,6 +469,8 @@ public interface IGT_RecipeAdder { */ public boolean addDistilleryRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, 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 */ @@ -416,6 +508,11 @@ public interface IGT_RecipeAdder { public boolean addElectromagneticSeparatorRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, int[] aChances, int aDuration, int aEUt); /** + * Adds a Recipe for the Extractor + */ + public boolean addExtractorRecipe(ItemStack aInput, ItemStack aOutput, 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); @@ -426,6 +523,11 @@ public interface IGT_RecipeAdder { public boolean addAutoclaveRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aOutput, int aChance, 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, 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); @@ -434,6 +536,10 @@ public interface IGT_RecipeAdder { * 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 Laser Engraver + */ + public boolean addLaserEngraverRecipe(ItemStack aItemToEngrave, ItemStack aLens, ItemStack aEngravedItem, int aDuration, int aEUt, boolean aCleanroom); /** * Adds a Recipe for the Forming Press diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java index b35d797a9c..809357f624 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java @@ -8,7 +8,6 @@ import gregtech.common.GT_Pollution; import ic2.api.energy.tile.IEnergySink; import net.minecraft.init.Blocks; import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.ChunkPosition; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; @@ -108,7 +107,7 @@ public interface IEnergyConnected extends IColoredTileEntity, IHasWorldObjectAnd tWorld.setBlock(tX, tY, tZ, Blocks.air); if (GregTech_API.sMachineExplosions) if(GT_Mod.gregtechproxy.mPollution) - GT_Pollution.addPollution(new ChunkPosition(tX, tY, tZ), 100000); + GT_Pollution.addPollution(tWorld.getChunkFromBlockCoords(tX,tZ), 100000); tWorld.createExplosion(null, tX + 0.5, tY + 0.5, tZ + 0.5, tStrength, true); } } |