aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod')
-rw-r--r--src/main/java/gtPlusPlus/xmod/advsolar/HANDLER_AdvSolar.java16
-rw-r--r--src/main/java/gtPlusPlus/xmod/bop/HANDLER_BiomesOPlenty.java26
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java17
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java4
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake.java251
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake_Extreme.java32
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_FluidGenerator.java252
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Reservoir.java123
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java4
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java9
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java2
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow.java10
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_AutoChisel.java155
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialChisel.java474
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IsaMill.java2
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_DistillationTower.java12
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FrothFlotationCell.java2
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialRockBreaker.java559
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java24
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java32
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechCustomHatches.java5
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialChisel.java25
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialRockBreaker.java13
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialSifter.java1
24 files changed, 1769 insertions, 281 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/advsolar/HANDLER_AdvSolar.java b/src/main/java/gtPlusPlus/xmod/advsolar/HANDLER_AdvSolar.java
new file mode 100644
index 0000000000..38f0d5a89b
--- /dev/null
+++ b/src/main/java/gtPlusPlus/xmod/advsolar/HANDLER_AdvSolar.java
@@ -0,0 +1,16 @@
+package gtPlusPlus.xmod.advsolar;
+
+import advsolar.common.AdvancedSolarPanel;
+import gtPlusPlus.core.lib.LoadedMods;
+import gtPlusPlus.core.util.minecraft.ItemUtils;
+import gtPlusPlus.core.util.minecraft.RecipeUtils;
+
+public class HANDLER_AdvSolar {
+
+ public static void postInit() {
+ if (LoadedMods.AdvancedSolarPanel) {
+ RecipeUtils.removeRecipeByOutput(ItemUtils.getSimpleStack(AdvancedSolarPanel.blockMolecularTransformer));
+ }
+ }
+
+}
diff --git a/src/main/java/gtPlusPlus/xmod/bop/HANDLER_BiomesOPlenty.java b/src/main/java/gtPlusPlus/xmod/bop/HANDLER_BiomesOPlenty.java
index 95067300c8..52f498988c 100644
--- a/src/main/java/gtPlusPlus/xmod/bop/HANDLER_BiomesOPlenty.java
+++ b/src/main/java/gtPlusPlus/xmod/bop/HANDLER_BiomesOPlenty.java
@@ -91,7 +91,7 @@ public class HANDLER_BiomesOPlenty {
Field aBopColouredSapling = ReflectionUtils.getField(ReflectionUtils.getClass("biomesoplenty.api.content.BOPCBlocks"), "colorizedSaplings");
if (aBopMiscItem != null) {
- Item aMiscItem = (Item) ReflectionUtils.getFieldValue(aBopMiscItem);
+ Item aMiscItem = ReflectionUtils.getFieldValue(aBopMiscItem);
if (aMiscItem != null) {
mPineCone = aMiscItem;
}
@@ -99,25 +99,25 @@ public class HANDLER_BiomesOPlenty {
if (aBopBlock1 != null) {
- Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopBlock1);
+ Block aBlock = ReflectionUtils.getFieldValue(aBopBlock1);
if (aBlock != null) {
logs1 = aBlock;
}
}
if (aBopBlock2 != null) {
- Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopBlock2);
+ Block aBlock = ReflectionUtils.getFieldValue(aBopBlock2);
if (aBlock != null) {
logs2 = aBlock;
}
}
if (aBopBlock3 != null) {
- Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopBlock3);
+ Block aBlock = ReflectionUtils.getFieldValue(aBopBlock3);
if (aBlock != null) {
logs3 = aBlock;
}
}
if (aBopBlock4 != null) {
- Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopBlock4);
+ Block aBlock = ReflectionUtils.getFieldValue(aBopBlock4);
if (aBlock != null) {
logs4 = aBlock;
}
@@ -125,25 +125,25 @@ public class HANDLER_BiomesOPlenty {
if (aBopLeaves1 != null) {
- Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopLeaves1);
+ Block aBlock = ReflectionUtils.getFieldValue(aBopLeaves1);
if (aBlock != null) {
leaves1 = aBlock;
}
}
if (aBopLeaves2 != null) {
- Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopLeaves2);
+ Block aBlock = ReflectionUtils.getFieldValue(aBopLeaves2);
if (aBlock != null) {
leaves2 = aBlock;
}
}
if (aBopLeaves3 != null) {
- Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopLeaves3);
+ Block aBlock = ReflectionUtils.getFieldValue(aBopLeaves3);
if (aBlock != null) {
leaves3 = aBlock;
}
}
if (aBopLeaves4 != null) {
- Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopLeaves4);
+ Block aBlock = ReflectionUtils.getFieldValue(aBopLeaves4);
if (aBlock != null) {
leaves4 = aBlock;
}
@@ -151,13 +151,13 @@ public class HANDLER_BiomesOPlenty {
if (aBopColouredLeaves1 != null) {
- Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopColouredLeaves1);
+ Block aBlock = ReflectionUtils.getFieldValue(aBopColouredLeaves1);
if (aBlock != null) {
colorizedLeaves1 = aBlock;
}
}
if (aBopColouredLeaves2 != null) {
- Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopColouredLeaves2);
+ Block aBlock = ReflectionUtils.getFieldValue(aBopColouredLeaves2);
if (aBlock != null) {
colorizedLeaves2 = aBlock;
}
@@ -165,13 +165,13 @@ public class HANDLER_BiomesOPlenty {
if (aBopSapling != null) {
- Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopSapling);
+ Block aBlock = ReflectionUtils.getFieldValue(aBopSapling);
if (aBlock != null) {
saplings = aBlock;
}
}
if (aBopColouredSapling != null) {
- Block aBlock = (Block) ReflectionUtils.getFieldValue(aBopColouredSapling);
+ Block aBlock = ReflectionUtils.getFieldValue(aBopColouredSapling);
if (aBlock != null) {
colorizedSaplings = aBlock;
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
index e731cf0730..7e81f1c514 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
@@ -421,6 +421,13 @@ public enum GregtechItemList implements GregtechItemContainer {
// Big Steam Macerator
Controller_SteamMaceratorMulti,
+
+ // Industrial Rock Breaker
+ Controller_IndustrialRockBreaker,
+
+ // Industrial Chisel
+ Controller_IndustrialAutoChisel,
+ Casing_IndustrialAutoChisel,
// Custom Machine Casings
Casing_Machine_Custom_1,
@@ -443,6 +450,10 @@ public enum GregtechItemList implements GregtechItemContainer {
//Air Intake hatch
Hatch_Air_Intake,
+ Hatch_Air_Intake_Extreme,
+
+ //Reservoir Hatch
+ Hatch_Reservoir,
//XL Turbine Rotor Hatch
Hatch_Turbine_Rotor,
@@ -764,6 +775,12 @@ public enum GregtechItemList implements GregtechItemContainer {
//GT RTG
RTG,
+
+ // Chisel Machines
+ GT_Chisel_LV,
+ GT_Chisel_MV,
+ GT_Chisel_HV,
+
//Plasma Tank
/*Plasma_Tank,*/
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java
index f1e79360d1..0ed4a690bb 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java
@@ -303,8 +303,8 @@ public interface IGregtech_RecipeAdder {
public boolean addVacuumFurnaceRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, ItemStack[] aOutputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aLevel);
- public boolean addUvLaserRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput, int time, long eu);
- public boolean addIrLaserRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput, int time, long eu);
+ public boolean addUvLaserRecipe(ItemStack aInput1, ItemStack aOutput, int time, long eu);
+ public boolean addIrLaserRecipe(ItemStack aInput1, ItemStack aOutput, int time, long eu);
public boolean addChemicalPlantRecipe(ItemStack[] aInputs, FluidStack[] aInputFluids, ItemStack[] aOutputs, FluidStack[] aFluidOutputs, int time, long eu, int aTier);
public boolean addChemicalPlantRecipe(ItemStack[] aInputs, FluidStack[] aInputFluids, ItemStack[] aOutputs, FluidStack[] aFluidOutputs, int[] aChances, int time, long eu, int aTier);
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake.java
index 5fb3b11d08..02b7a03f3b 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake.java
@@ -1,165 +1,65 @@
package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations;
-import java.lang.reflect.Field;
-
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.IIconContainer;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
-import gregtech.api.objects.GT_RenderedTexture;
-import gtPlusPlus.api.objects.random.XSTR;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.minecraft.FluidUtils;
-import gtPlusPlus.core.util.reflect.ReflectionUtils;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidStack;
-public class GT_MetaTileEntity_Hatch_AirIntake extends GT_MetaTileEntity_Hatch_Input {
-
- private static XSTR floatGen;
- public int mProgresstime = 0, mMaxProgresstime = 0;
+public class GT_MetaTileEntity_Hatch_AirIntake extends GT_MetaTileEntity_Hatch_FluidGenerator {
- public GT_MetaTileEntity_Hatch_AirIntake(final int aID, final String aName, final String aNameRegional,
- final int aTier) {
+ public GT_MetaTileEntity_Hatch_AirIntake(final int aID, final String aName, final String aNameRegional, final int aTier) {
super(aID, aName, aNameRegional, aTier);
}
- public GT_MetaTileEntity_Hatch_AirIntake(final String aName, final int aTier, final String aDescription,
- final ITexture[][][] aTextures) {
+ public GT_MetaTileEntity_Hatch_AirIntake(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) {
super(aName, aTier, aDescription, aTextures);
}
- /*public GT_MetaTileEntity_Hatch_AirIntake(final String aName, final int aTier, final String[] aDescription,
- final ITexture[][][] aTextures) {
- super(aName, aTier, aDescription, aTextures);
- }*/
-
- private static String[] S;
- private static Field F;
-
- public synchronized String[] getDescription() {
- try {
- if (F == null || S == null) {
- Field t = ReflectionUtils.getField(this.getClass(), "mDescriptionArray");
- if (t != null) {
- F = t;
- }
- else {
- F = ReflectionUtils.getField(this.getClass(), "mDescription");
- }
- if (S == null && F != null) {
- Object o = F.get(this);
- if (o instanceof String[]) {
- S = (String[]) o;
- }
- else if (o instanceof String) {
- S = new String[] {(String) o};
- }
- }
-
- }
- }
- catch (Throwable t) {
-
- }
- if (S != null) {
- final String[] desc = new String[S.length + 4];
- System.arraycopy(S, 0, desc, 0, S.length);
- desc[S.length] = "DO NOT OBSTRUCT THE INPUT!";
- desc[S.length + 1] = "Draws in Air from the surrounding environment";
- desc[S.length + 2] = "Creates 1000L of Air every 4 ticks";
- desc[S.length + 3] = CORE.GT_Tooltip;
- return desc;
- }
- else {
- return new String[] {"DO NOT OBSTRUCT THE INPUT!", "Draws in Air from the surrounding environment", "Creates 1000L of Air every 4 ticks", CORE.GT_Tooltip};
- }
-
- }
-
- public ITexture[] getTexturesActive(final ITexture aBaseTexture) {
- return new ITexture[]{aBaseTexture,
- new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.OVERLAY_MUFFLER)};
- }
-
- public ITexture[] getTexturesInactive(final ITexture aBaseTexture) {
- return new ITexture[]{aBaseTexture,
- new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.OVERLAY_MUFFLER)};
- }
-
- public boolean isSimpleMachine() {
- return true;
- }
-
- public boolean isFacingValid(final byte aFacing) {
- return true;
+ public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_Hatch_AirIntake(this.mName, this.mTier, this.mDescription, this.mTextures);
}
- public boolean isAccessAllowed(final EntityPlayer aPlayer) {
- return true;
+ @Override
+ public String[] getCustomTooltip() {
+ String[] aTooltip = new String[3];
+ aTooltip[0] = "DO NOT OBSTRUCT THE INPUT!";
+ aTooltip[1] = "Draws in Air from the surrounding environment";
+ aTooltip[2] = "Creates "+getAmountOfFluidToGenerate()+"L of Air every "+getMaxTickTime()+" ticks";
+ return aTooltip;
}
- public boolean isValidSlot(final int aIndex) {
- return false;
+ @Override
+ public Fluid getFluidToGenerate() {
+ return FluidUtils.getAir(1).getFluid();
}
- public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_Hatch_AirIntake(this.mName, this.mTier, this.mDescription, this.mTextures);
+ @Override
+ public int getAmountOfFluidToGenerate() {
+ return 1000;
}
- public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
- final ItemStack aStack) {
- return false;
+ @Override
+ public int getMaxTickTime() {
+ return 4;
}
- public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
- final ItemStack aStack) {
- return false;
+ @Override
+ public int getCapacity() {
+ return 128000;
}
- public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) {
- super.onPostTick(aBaseMetaTileEntity, aTick);
-
- if (!aBaseMetaTileEntity.isAllowedToWork()) {
- aBaseMetaTileEntity.setActive(false);
- mProgresstime = 0;
- mMaxProgresstime = 0;
- }
- else {
- aBaseMetaTileEntity.setActive(true);
- mMaxProgresstime = 4;
- if (++mProgresstime >= mMaxProgresstime) {
- addAirToHatch(aTick);
- mProgresstime = 0;
- }
- }
+ @Override
+ public boolean doesHatchMeetConditionsToGenerate() {
+ return this.getBaseMetaTileEntity().getAirAtSide(this.getBaseMetaTileEntity().getFrontFacing());
}
-
- @Override
- public int getProgresstime() {
- return mProgresstime;
- }
-
- @Override
- public int maxProgresstime() {
- return mMaxProgresstime;
- }
- @Override
- public int increaseProgress(int aProgress) {
- mProgresstime += aProgress;
- return mMaxProgresstime - mProgresstime;
- }
-
- public void pollutionParticles(final World aWorld, final String name) {
+ @Override
+ public void generateParticles(World aWorld, String name) {
if (this.getBaseMetaTileEntity().isServerSide()) {
return;
}
@@ -207,97 +107,4 @@ public class GT_MetaTileEntity_Hatch_AirIntake extends GT_MetaTileEntity_Hatch_I
(double) -ySpd, (double) zSpd);
}
- static {
- GT_MetaTileEntity_Hatch_AirIntake.floatGen = new XSTR();
- }
-
- public int getTankPressure() {
- return 100;
- }
-
- public int getCapacity() {
- return 128000;
- }
-
- @Override
- public boolean canTankBeEmptied() {
- return true;
- }
-
- private static Fluid AIR;
-
- public boolean isAirInHatch() {
- if (this.mFluid != null) {
- if (AIR == null) {
- AIR = FluidUtils.getAir(1).getFluid();
- }
- if (AIR == this.mFluid.getFluid()) {
- return true;
- }
- }
- return false;
- }
-
- public boolean addAirToHatch(long aTick) {
- if (!this.getBaseMetaTileEntity().getAirAtSide(this.getBaseMetaTileEntity().getFrontFacing())) {
- return false;
- }
- boolean didFill = this.fill(FluidUtils.getAir(1000), true) > 0;
- if (didFill) {
- this.pollutionParticles(this.getBaseMetaTileEntity().getWorld(), "cloud");
- }
- return didFill;
- }
-
- @Override
- public boolean canTankBeFilled() {
- if (this.mFluid == null || (this.mFluid != null && (this.mFluid.amount <= this.getCapacity()))) {
- return true;
- }
- return false;
- }
-
- @Override
- public boolean doesEmptyContainers() {
- return false;
- }
-
- @Override
- public boolean doesFillContainers() {
- return true;
- }
-
- @Override
- public int fill(FluidStack aFluid, boolean doFill) {
- return super.fill(aFluid, doFill);
- }
-
- @Override
- public boolean canFill(ForgeDirection aSide, Fluid aFluid) {
- return false;
- }
-
- @Override
- public int fill(ForgeDirection arg0, FluidStack arg1, boolean arg2) {
- return 0;
- }
-
- @Override
- public int fill_default(ForgeDirection aSide, FluidStack aFluid, boolean doFill) {
- return 0;
- }
-
- @Override
- public void saveNBTData(NBTTagCompound aNBT) {
- aNBT.setInteger("mProgresstime", mProgresstime);
- aNBT.setInteger("mMaxProgresstime", mMaxProgresstime);
- super.saveNBTData(aNBT);
- }
-
- @Override
- public void loadNBTData(NBTTagCompound aNBT) {
- mProgresstime = aNBT.getInteger("mProgresstime");
- mMaxProgresstime = aNBT.getInteger("mMaxProgresstime");
- super.loadNBTData(aNBT);
- }
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake_Extreme.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake_Extreme.java
new file mode 100644
index 0000000000..45611d9e05
--- /dev/null
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake_Extreme.java
@@ -0,0 +1,32 @@
+package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations;
+
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.MetaTileEntity;
+
+public class GT_MetaTileEntity_Hatch_AirIntake_Extreme extends GT_MetaTileEntity_Hatch_AirIntake {
+
+ public GT_MetaTileEntity_Hatch_AirIntake_Extreme(final int aID, final String aName, final String aNameRegional, final int aTier) {
+ super(aID, aName, aNameRegional, aTier);
+ }
+
+ public GT_MetaTileEntity_Hatch_AirIntake_Extreme(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) {
+ super(aName, aTier, aDescription, aTextures);
+ }
+
+
+ public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_Hatch_AirIntake_Extreme(this.mName, this.mTier, this.mDescription, this.mTextures);
+ }
+
+ @Override
+ public int getAmountOfFluidToGenerate() {
+ return 8000;
+ }
+
+ @Override
+ public int getCapacity() {
+ return 256000;
+ }
+
+}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_FluidGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_FluidGenerator.java
new file mode 100644
index 0000000000..d4b8b3a064
--- /dev/null
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_FluidGenerator.java
@@ -0,0 +1,252 @@
+package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations;
+
+import java.lang.reflect.Field;
+
+import gregtech.api.enums.Textures;
+import gregtech.api.interfaces.IIconContainer;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.MetaTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
+import gregtech.api.objects.GT_RenderedTexture;
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.api.objects.random.XSTR;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.util.minecraft.FluidUtils;
+import gtPlusPlus.core.util.reflect.ReflectionUtils;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.World;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidStack;
+
+public abstract class GT_MetaTileEntity_Hatch_FluidGenerator extends GT_MetaTileEntity_Hatch_Input {
+
+ protected static XSTR floatGen = new XSTR();
+ public int mProgresstime = 0, mMaxProgresstime = 0;
+
+ public GT_MetaTileEntity_Hatch_FluidGenerator(final int aID, final String aName, final String aNameRegional, final int aTier) {
+ super(aID, aName, aNameRegional, aTier);
+ }
+
+ public GT_MetaTileEntity_Hatch_FluidGenerator(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) {
+ super(aName, aTier, aDescription, aTextures);
+ }
+
+ private static String[] S;
+ private static Field F;
+
+ public abstract String[] getCustomTooltip();
+
+ public abstract Fluid getFluidToGenerate();
+
+ public abstract int getAmountOfFluidToGenerate();
+
+ public abstract int getMaxTickTime();
+
+ public synchronized String[] getDescription() {
+ try {
+ if (F == null || S == null) {
+ Field t = ReflectionUtils.getField(this.getClass(), "mDescriptionArray");
+ if (t != null) {
+ F = t;
+ }
+ else {
+ F = ReflectionUtils.getField(this.getClass(), "mDescription");
+ }
+ if (S == null && F != null) {
+ Object o = F.get(this);
+ if (o instanceof String[]) {
+ S = (String[]) o;
+ }
+ else if (o instanceof String) {
+ S = new String[] {(String) o};
+ }
+ }
+
+ }
+ }
+ catch (Throwable t) {
+ Logger.INFO("1");
+ t.printStackTrace();
+ }
+ try {
+ if (S != null) {
+ String[] aCustomTips = getCustomTooltip();
+ final String[] desc = new String[S.length + aCustomTips.length + 1];
+ System.arraycopy(S, 0, desc, 0, S.length);
+ for (int i=0;i<aCustomTips.length;i++) {
+ desc[S.length + i] = aCustomTips[i];
+ }
+ desc[S.length + aCustomTips.length] = CORE.GT_Tooltip;
+ return desc;
+ }
+ }
+ catch (Throwable t) {
+ Logger.INFO("2");
+ t.printStackTrace();
+ }
+
+ return new String[] {"Broken Tooltip - Report on Github"};
+
+ }
+
+ public ITexture[] getTexturesActive(final ITexture aBaseTexture) {
+ return new ITexture[]{aBaseTexture,
+ new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.OVERLAY_MUFFLER)};
+ }
+
+ public ITexture[] getTexturesInactive(final ITexture aBaseTexture) {
+ return new ITexture[]{aBaseTexture,
+ new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.OVERLAY_MUFFLER)};
+ }
+
+ public boolean isSimpleMachine() {
+ return true;
+ }
+
+ public boolean isFacingValid(final byte aFacing) {
+ return true;
+ }
+
+ public boolean isAccessAllowed(final EntityPlayer aPlayer) {
+ return true;
+ }
+
+ public boolean isValidSlot(final int aIndex) {
+ return false;
+ }
+
+ public abstract MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity);
+
+ public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
+ return false;
+ }
+
+ public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
+ return false;
+ }
+
+ public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) {
+ super.onPostTick(aBaseMetaTileEntity, aTick);
+
+ if (!aBaseMetaTileEntity.isAllowedToWork()) {
+ aBaseMetaTileEntity.setActive(false);
+ mProgresstime = 0;
+ mMaxProgresstime = 0;
+ }
+ else {
+ aBaseMetaTileEntity.setActive(true);
+ mMaxProgresstime = getMaxTickTime();
+ if (++mProgresstime >= mMaxProgresstime) {
+ addFluidToHatch(aTick);
+ mProgresstime = 0;
+ }
+ }
+ }
+
+ @Override
+ public int getProgresstime() {
+ return mProgresstime;
+ }
+
+ @Override
+ public int maxProgresstime() {
+ return mMaxProgresstime;
+ }
+
+ @Override
+ public int increaseProgress(int aProgress) {
+ mProgresstime += aProgress;
+ return mMaxProgresstime - mProgresstime;
+ }
+
+ public abstract void generateParticles(final World aWorld, final String name);
+
+ public int getTankPressure() {
+ return 100;
+ }
+
+ public abstract int getCapacity();
+
+ @Override
+ public boolean canTankBeEmptied() {
+ return true;
+ }
+
+ public abstract boolean doesHatchMeetConditionsToGenerate();
+
+ public boolean addFluidToHatch(long aTick) {
+ if (!doesHatchMeetConditionsToGenerate()) {
+ return false;
+ }
+ boolean didFill = false;
+ if (canTankBeFilled()) {
+ didFill = this.fill(FluidUtils.getFluidStack(getFluidToGenerate(), getAmountOfFluidToGenerate()), true) > 0;
+ if (didFill) {
+ this.generateParticles(this.getBaseMetaTileEntity().getWorld(), "cloud");
+ }
+ }
+ return didFill;
+ }
+
+ @Override
+ public boolean canTankBeFilled() {
+ //Logger.INFO("Total Space: "+this.getCapacity());
+ //Logger.INFO("Current capacity: "+this.getFluidAmount());
+ //Logger.INFO("To add: "+this.getAmountOfFluidToGenerate());
+ //Logger.INFO("Space Free: "+(this.getCapacity()-this.getFluidAmount()));
+ if (this.mFluid == null || (this.mFluid != null && (this.getCapacity() - this.getFluidAmount() >= this.getAmountOfFluidToGenerate()))) {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean doesEmptyContainers() {
+ return false;
+ }
+
+ @Override
+ public boolean doesFillContainers() {
+ return true;
+ }
+
+ @Override
+ public int fill(FluidStack aFluid, boolean doFill) {
+ return super.fill(aFluid, doFill);
+ }
+
+ @Override
+ public boolean canFill(ForgeDirection aSide, Fluid aFluid) {
+ return false;
+ }
+
+ @Override
+ public int fill(ForgeDirection arg0, FluidStack arg1, boolean arg2) {
+ return 0;
+ }
+
+ @Override
+ public int fill_default(ForgeDirection aSide, FluidStack aFluid, boolean doFill) {
+ return 0;
+ }
+
+ @Override
+ public void saveNBTData(NBTTagCompound aNBT) {
+ aNBT.setInteger("mProgresstime", mProgresstime);
+ aNBT.setInteger("mMaxProgresstime", mMaxProgresstime);
+ super.saveNBTData(aNBT);
+ }
+
+ @Override
+ public void loadNBTData(NBTTagCompound aNBT) {
+ mProgresstime = aNBT.getInteger("mProgresstime");
+ mMaxProgresstime = aNBT.getInteger("mMaxProgresstime");
+ super.loadNBTData(aNBT);
+ }
+}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Reservoir.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Reservoir.java
new file mode 100644
index 0000000000..75c5dbb9ee
--- /dev/null
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Reservoir.java
@@ -0,0 +1,123 @@
+package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations;
+
+import cpw.mods.fml.common.registry.GameRegistry;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.MetaTileEntity;
+import gregtech.api.objects.GT_RenderedTexture;
+import gtPlusPlus.core.lib.LoadedMods;
+import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
+import net.minecraft.block.Block;
+import net.minecraft.init.Blocks;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.World;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.IFluidHandler;
+
+public class GT_MetaTileEntity_Hatch_Reservoir extends GT_MetaTileEntity_Hatch_FluidGenerator {
+
+ private static Block sBlock_EIO;