aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java20
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java52
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Dehydrator.java163
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake.java7
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ControlCore.java8
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DynamoBuffer.java14
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java32
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy_RTG.java9
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java3
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java6
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java3
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Plasma.java3
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusInput.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusOutput.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_TurbineProvider.java10
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java2
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Output.java2
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GT_MetaTileEntity_Hatch_CustomFluidBase.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaTransformerHiAmp.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java251
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_SteamMultiBase.java18
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java25
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_Catalysts.java8
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_MillingBalls.java8
25 files changed, 508 insertions, 156 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
index fd5ceed89b..8c814489f2 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
@@ -396,9 +396,15 @@ public enum GregtechItemList implements GregtechItemContainer {
// Flotation Cell
Controller_Flotation_Cell,
+ Casing_Flotation_Cell,
+
+ // Sparge Tower
+ Controller_Sparge_Tower,
+ Casing_Sparge_Tower_Exterior,
+ Casing_Sparge_Tower_Interior,
// Elemental Duplicator
- /*Controller_ElementalDuplicator,*/
+ Controller_ElementalDuplicator,
Casing_ElementalDuplicator,
// Big Steam Macerator
@@ -452,7 +458,7 @@ public enum GregtechItemList implements GregtechItemContainer {
Hatch_Output_Bus_Steam,
//Elemental Duplicator Data Orb Bus
- /*Hatch_Input_Elemental_Duplicator,*/
+ Hatch_Input_Elemental_Duplicator,
//RTG Hatch
Hatch_RTG_LV,
@@ -585,9 +591,13 @@ public enum GregtechItemList implements GregtechItemContainer {
Machine_ZPM_Component_Maker,
Machine_UV_Component_Maker,
- // Fluid Reactor
- FluidReactor_LV, FluidReactor_HV,
- FluidReactor_IV, FluidReactor_ZPM,
+ // Reactor Processing Unit
+ ReactorProcessingUnit_IV,
+ ReactorProcessingUnit_ZPM,
+
+ // Cold Trap
+ ColdTrap_IV,
+ ColdTrap_ZPM,
//Breakers
BreakerBox_ULV, BreakerBox_LV, BreakerBox_MV,
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java
index 229bc234e9..6bf048320f 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java
@@ -1,6 +1,8 @@
package gtPlusPlus.xmod.gregtech.api.interfaces.internal;
+import gregtech.api.GregTech_API;
import gregtech.api.enums.Materials;
+import gregtech.api.util.GT_Recipe;
import gtPlusPlus.core.material.Material;
import net.minecraft.item.ItemStack;
@@ -22,6 +24,13 @@ public interface IGregtech_RecipeAdder {
//public boolean addCokeOvenRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue);
public boolean addCokeOvenRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt);
+
+ public boolean addCokeOvenRecipe(int aCircuit, ItemStack aInput2, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int aDuration, int aEUt);
+
+
+ public boolean addCokeOvenRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int aDuration, int aEUt);
+
+
public boolean addFuel(ItemStack aInput1, ItemStack aOutput1, int aEU, int aType);
@@ -62,7 +71,7 @@ public interface IGregtech_RecipeAdder {
* @return true if the Recipe got added, otherwise false.
*/
- public boolean addDehydratorRecipe(ItemStack aInput, FluidStack aFluid, ItemStack[] aOutputItems, int aDuration, int aEUt);
+ //public boolean addDehydratorRecipe(ItemStack aInput, FluidStack aFluid, ItemStack[] aOutputItems, int aDuration, int aEUt);
/*public boolean addDehydratorRecipe(FluidStack aFluid, FluidStack aOutputFluid, ItemStack[] aOutputItems, int aDuration, int aEUt);*/
/*public boolean addDehydratorRecipe(ItemStack aItemA, ItemStack aItemB, ItemStack[] aOutputItems, int aDuration, int aEUt);
public boolean addDehydratorRecipe(ItemStack aItemA, ItemStack aItemB, FluidStack aFluid, ItemStack[] aOutputItems, FluidStack aOutputFluid, int aDuration, int aEUt);*/
@@ -124,16 +133,16 @@ public interface IGregtech_RecipeAdder {
public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, int aChance, int aDuration, int aEUt, int aSpecialValue);
/**
- * Adds a Recipe for the Alloy Blast Smelter. (up to 9 Inputs)
+ * Adds a Recipe for the LFTRr. (up to 9 Inputs)
*
* @param aInput = ItemStack[] (not null, and respects StackSize)
* @param aFluidInput = Input of a fluid (can be null, and respects StackSize)
- * @param aFluidOutput = Output of the Molten Metal (not null, and respects StackSize)
+ * @param aFluidOutput = Output of the Molten Salts (not null, and respects StackSize)
* @param aOutputStack = Item Output (Can be null)
* @param aChances = Output Chance (can be == 0)
* @param aDuration = Duration (must be >= 0)
* @param aEUt = EU per tick needed for heating up (must be >= 0)
- * @param aSpecialValue = Stores the Required Temp for the Recipe
+ * @param aSpecialValue = Power produced in EU/t per dynamo
* @return true if the Recipe got added, otherwise false.
*/
public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, ItemStack[] aOutputStack, int[] aChance, int aDuration, int aEUt, int aSpecialValue);
@@ -166,6 +175,14 @@ public interface IGregtech_RecipeAdder {
FluidStack aInput7, FluidStack aInput8, FluidStack aInput9,
FluidStack aOutput1, FluidStack aOutput2,
int aDuration, int aEUt);
+
+ public boolean addFissionFuel(
+ boolean aOptimise,
+ FluidStack aInput1, FluidStack aInput2, FluidStack aInput3,
+ FluidStack aInput4, FluidStack aInput5, FluidStack aInput6,
+ FluidStack aInput7, FluidStack aInput8, FluidStack aInput9,
+ FluidStack aOutput1, FluidStack aOutput2,
+ int aDuration, int aEUt);
public boolean addCyclotronRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs,
FluidStack aFluidOutput, int[] aChances, int aDuration, int aEUt, int aSpecialValue);
@@ -200,9 +217,27 @@ public interface IGregtech_RecipeAdder {
public boolean addAssemblerRecipeWithOreDict(Object aInput1, int aAmount1, Object aInput2, int aAmount2, FluidStack aInputFluid, ItemStack aOutput, int a1, int a2);
public boolean addSixSlotAssemblingRecipe(ItemStack[] aInputs, FluidStack aInputFluid, ItemStack aOutput1, int aDuration, int aEUt);
-
+ /**
+ * Adds an Assemblyline Recipe
+ *
+ * @param aInputs must be != null, 4-16 inputs
+ * @param aFluidInputs 0-4 fluids
+ * @param aOutput1 must be != null
+ * @param aDuration must be > 0
+ * @param aEUt should be > 0
+ */
public boolean addAssemblylineRecipe(ItemStack aResearchItem, int aResearchTime, ItemStack[] aInputs, FluidStack[] aFluidInputs, ItemStack aOutput, int aDuration, int aEUt);
+ /**
+ * Adds a Assemblyline Recipe
+ *
+ * @param aInputs elements should be: ItemStack for single item;
+ * ItemStack[] for multiple equivalent items;
+ * {OreDict, amount} for oredict.
+ */
+ boolean addAssemblylineRecipe(ItemStack aResearchItem, int aResearchTime, Object[] aInputs, FluidStack[] aFluidInputs, ItemStack aOutput1, int aDuration, int aEUt);
+
+
public boolean addChemicalRecipe(ItemStack input1, ItemStack input2, FluidStack inputFluid, FluidStack outputFluid, ItemStack output, int time, int eu);
public boolean addChemicalRecipe(ItemStack input1, ItemStack input2, FluidStack inputFluid, FluidStack outputFluid, ItemStack output, Object object, int time, int eu);
public boolean addChemicalRecipe(ItemStack input1, ItemStack input2, FluidStack inputFluid, FluidStack outputFluid, ItemStack output, ItemStack object, int time);
@@ -297,5 +332,12 @@ public interface IGregtech_RecipeAdder {
public boolean addFuelForRTG(ItemStack aFuelPellet, int aFuelDays, int aVoltage);
+ public boolean addColdTrapRecipe(int aCircuit, ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, FluidStack aFluidOutput, int aTime, int aEU);
+
+ public boolean addReactorProcessingUnitRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, FluidStack aFluidOutput, int aTime, int aEU);
+
+ public boolean addFluidHeaterRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt);
+
+ public boolean addVacuumFreezerRecipe(ItemStack aInput, ItemStack aOutput, int aDuration, int aEU);
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Dehydrator.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Dehydrator.java
new file mode 100644
index 0000000000..aebf188fc0
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Dehydrator.java
@@ -0,0 +1,163 @@
+package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations;
+
+import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE_OUT;
+
+import gregtech.api.enums.Textures;
+import gregtech.api.enums.Textures.BlockIcons.CustomIcon;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_GT_Recipe;
+import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
+import gregtech.api.util.GTPP_Recipe;
+import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
+import gtPlusPlus.core.lib.CORE;
+
+@SuppressWarnings("deprecation")
+public class GT_MetaTileEntity_Dehydrator extends GT_MetaTileEntity_BasicMachine_GT_Recipe {
+
+ private static final CustomIcon[] sDehydratorOverlays = new CustomIcon[10];
+ static {
+ sDehydratorOverlays[0] = new CustomIcon("basicmachines/microwave/OVERLAY_FRONT");
+ sDehydratorOverlays[2] = new CustomIcon("basicmachines/plasma_arc_furnace/OVERLAY_BOTTOM");
+ sDehydratorOverlays[3] = new CustomIcon("basicmachines/fluid_heater/OVERLAY_SIDE");
+ sDehydratorOverlays[4] = new CustomIcon("basicmachines/chemical_bath/OVERLAY_FRONT");
+ sDehydratorOverlays[5] = new CustomIcon("basicmachines/microwave/OVERLAY_FRONT_ACTIVE");
+ sDehydratorOverlays[7] = new CustomIcon("basicmachines/plasma_arc_furnace/OVERLAY_BOTTOM_ACTIVE");
+ sDehydratorOverlays[8] = new CustomIcon("basicmachines/fluid_heater/OVERLAY_SIDE_ACTIVE");
+ sDehydratorOverlays[9] = new CustomIcon("basicmachines/chemical_bath/OVERLAY_FRONT_ACTIVE");
+ //3 8
+ }
+
+ private GT_Recipe_Map xRecipes;
+ private int xTankCapacity;
+
+ public GT_MetaTileEntity_Dehydrator(int aID, String aName, String aNameRegional, int aTier, String aDescription, int aTankCapacity) {
+ super(aID, aName, aNameRegional, aTier, aDescription, GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes, 2, 9, aTankCapacity, 2, 5, "Dehydrator.png", "UNBOXINATOR", false, false, 0, "", null);
+ xRecipes = GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes;
+ xTankCapacity = aTankCapacity;
+ }
+
+ public GT_MetaTileEntity_Dehydrator(String aName, int aTier, String[] aDescription, GT_Recipe.GT_Recipe_Map aRecipes, int aTankCapacity, int aAmperage, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
+ super(aName, aTier, aDescription, aRecipes, 2, 9, aTankCapacity, aAmperage, 2, 5, aTextures, aGUIName, aNEIName, "", false, false, 0);
+
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_Dehydrator(this.mName, this.mTier, this.mDescriptionArray, this.xRecipes, this.xTankCapacity, this.mAmperage, this.mTextures, this.mGUIName, this.mNEIName);
+ }
+
+ @Override
+ public String[] getDescription() {
+ String[] S = super.getDescription();
+ final String[] desc = new String[S.length + 1];
+ System.arraycopy(S, 0, desc, 0, S.length);
+ desc[S.length] = CORE.GT_Tooltip;
+ return desc;
+ }
+
+ @Override
+ public ITexture[][][] getTextureSet(final ITexture[] aTextures) {
+ final ITexture[][][] rTextures = new ITexture[15][17][];
+ for (byte i = -1; i < 16; i++) {
+ rTextures[0][i + 1] = getSideFacingActive(i);
+ rTextures[1][i + 1] = getSideFacingInactive(i);
+ rTextures[2][i + 1] = getFrontFacingActive(i);
+ rTextures[3][i + 1] = getFrontFacingInactive(i);
+ rTextures[4][i + 1] = getTopFacingActive(i);
+ rTextures[5][i + 1] = getTopFacingInactive(i);
+ rTextures[6][i + 1] = getBottomFacingActive(i);
+ rTextures[7][i + 1] = getBottomFacingInactive(i);
+ rTextures[8][i + 1] = getBottomFacingPipeActive(i);
+ rTextures[9][i + 1] = getBottomFacingPipeInactive(i);
+ rTextures[10][i + 1] = getTopFacingPipeActive(i);
+ rTextures[11][i + 1] = getTopFacingPipeInactive(i);
+ rTextures[12][i + 1] = getSideFacingPipeActive(i);
+ rTextures[13][i + 1] = getSideFacingPipeInactive(i);
+ }
+ return rTextures;
+ }
+
+
+
+ @Override
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ return super.getTexture(aBaseMetaTileEntity, aSide, aFacing, aColorIndex, aActive, aRedstone);
+ //return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1];
+ }
+
+ @Override
+ public ITexture[] getFrontFacingInactive(final byte aColor) {
+ return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[0])};
+ }
+
+ @Override
+ public ITexture[] getBottomFacingInactive(final byte aColor) {
+ return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[2])};
+ }
+
+ @Override
+ public ITexture[] getTopFacingInactive(final byte aColor) {
+ return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[3])};
+ }
+
+ @Override
+ public ITexture[] getSideFacingInactive(final byte aColor) {
+ return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[4])};
+ }
+
+ @Override
+ public ITexture[] getFrontFacingActive(final byte aColor) {
+ return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[5])};
+ }
+
+ @Override
+ public ITexture[] getBottomFacingActive(final byte aColor) {
+ return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[7])};
+ }
+
+ @Override
+ public ITexture[] getTopFacingActive(final byte aColor) {
+ return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[8])};
+ }
+
+ @Override
+ public ITexture[] getSideFacingActive(final byte aColor) {
+ return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[9])};
+ }
+
+ @Override
+ public ITexture[] getBottomFacingPipeActive(byte aColor) {
+ return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)};
+ }
+
+ @Override
+ public ITexture[] getBottomFacingPipeInactive(byte aColor) {
+ return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)};
+ }
+
+ @Override
+ public ITexture[] getTopFacingPipeActive(byte aColor) {
+ return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)};
+ }
+
+ @Override
+ public ITexture[] getTopFacingPipeInactive(byte aColor) {
+ return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)};
+ }
+
+ @Override
+ public ITexture[] getSideFacingPipeActive(byte aColor) {
+ return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)};
+ }
+
+ @Override
+ public ITexture[] getSideFacingPipeInactive(byte aColor) {
+ return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)};
+ }
+
+}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake.java
index a7d395b0a1..e6fd5dc797 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake.java
@@ -70,15 +70,16 @@ public class GT_MetaTileEntity_Hatch_AirIntake extends GT_MetaTileEntity_Hatch_I
}
if (S != null) {
- final String[] desc = new String[S.length + 3];
+ 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"};
+ 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};
}
@@ -126,7 +127,7 @@ public class GT_MetaTileEntity_Hatch_AirIntake extends GT_MetaTileEntity_Hatch_I
public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) {
super.onPostTick(aBaseMetaTileEntity, aTick);
- if (addAirToHatch(aTick)) {
+ if (this.getBaseMetaTileEntity().isActive() && addAirToHatch(aTick)) {
if (aTick % 8 == 0) {
if (aBaseMetaTileEntity.isClientSide()) {
this.pollutionParticles(this.getBaseMetaTileEntity().getWorld(), "cloud");
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ControlCore.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ControlCore.java
index 7a532807c8..5347b2e4f7 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ControlCore.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ControlCore.java
@@ -10,6 +10,7 @@ import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.api.objects.minecraft.BlockPos;
import gtPlusPlus.core.item.general.ItemControlCore;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.common.StaticFields59;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import net.minecraft.entity.player.EntityPlayer;
@@ -34,6 +35,13 @@ public class GT_MetaTileEntity_Hatch_ControlCore extends GT_MetaTileEntity_Hatch
public GT_MetaTileEntity_Hatch_ControlCore(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
super(aName, aTier, aTier < 1 ? 1 : aTier == 1 ? 4 : aTier == 2 ? 9 : 16, aDescription[0], aTextures);
}
+
+ @Override
+ public String[] getDescription() {
+ return new String[]{
+ this.mDescription,
+ CORE.GT_Tooltip};
+ }
@Override
public ITexture[] getTexturesActive(ITexture aBaseTexture) {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DynamoBuffer.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DynamoBuffer.java
index 5fef0f1088..39f477b173 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DynamoBuffer.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DynamoBuffer.java
@@ -53,11 +53,21 @@ public class GT_MetaTileEntity_Hatch_DynamoBuffer extends GT_MetaTileEntity_Hatc
public String[] getDescription() {
String[] g;
if (CORE.GTNH || (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && Utils.getGregtechVersionAsInt() >= 50932)) {
- g = new String[]{"Dynamo with internal storage and additional Amp capacity", "Capacity: "+maxEUStore()+"EU", "Voltage: "+this.maxEUOutput(), "Amperage In: 4", "Amperage Out: 4"};
+ g = new String[]{
+ "Dynamo with internal storage and additional Amp capacity",
+ "Does not accept more than "+(this.maxEUOutput() * this.maxAmperesIn())+"EU/t as input",
+ CORE.GT_Tooltip};
}
else {
- g = new String[]{"Dynamo with internal storage and additional Amp capacity", "Stores "+maxEUStore()+"EU", "Amperage In: 4", "Amperage Out: 4", "Does not accept more than "+this.maxEUOutput()+"EU/t as input", "Large Turbines only supply 1A to this, other Multiblocks can inject more amps"};
+ g = new String[]{
+ "Dynamo with internal storage and additional Amp capacity",
+ "Stores "+maxEUStore()+"EU",
+ "Amperage In: 4",
+ "Amperage Out: 4",
+ "Does not accept more than "+(this.maxEUOutput() * this.maxAmperesIn())+"EU/t as input",
+ "Large Turbines only supply 1A to this, other Multiblocks can inject more amps",
+ CORE.GT_Tooltip};
}
return g;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java
index a98c57eb30..a892346463 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java
@@ -1,5 +1,7 @@
package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations;
+import java.util.ArrayList;
+
import gregtech.api.gui.GT_Container_4by4;
import gregtech.api.gui.GT_GUIContainer_4by4;
import gregtech.api.interfaces.ITexture;
@@ -9,6 +11,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_LanguageManager;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
@@ -17,13 +20,12 @@ import net.minecraft.nbt.NBTTagCompound;
public class GT_MetaTileEntity_Hatch_ElementalDataOrbHolder extends GT_MetaTileEntity_Hatch {
public GT_Recipe_Map mRecipeMap = null;
- public boolean disableSort;
public GT_MetaTileEntity_Hatch_ElementalDataOrbHolder(int aID, String aName, String aNameRegional, int aTier) {
super(aID, aName, aNameRegional, aTier, 16, new String[]{
"Holds Data Orbs for the Elemental Duplicator",
- });
- disableSort = true;
+ CORE.GT_Tooltip
+ });
}
public GT_MetaTileEntity_Hatch_ElementalDataOrbHolder(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
@@ -83,7 +85,7 @@ public class GT_MetaTileEntity_Hatch_ElementalDataOrbHolder extends GT_MetaTileE
@Override
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_4by4(aPlayerInventory, aBaseMetaTileEntity, "Steam Input Bus");
+ return new GT_GUIContainer_4by4(aPlayerInventory, aBaseMetaTileEntity, "Data Orb Repository");
}
@Override
@@ -100,28 +102,26 @@ public class GT_MetaTileEntity_Hatch_ElementalDataOrbHolder extends GT_MetaTileE
}
protected void fillStacksIntoFirstSlots() {
- if (disableSort) {
- for (int i = 0; i < mInventory.length; i++)
- if (mInventory[i] != null && mInventory[i].stackSize <= 0)
- mInventory[i] = null;
- }
+ for (int i = 0; i < mInventory.length; i++) {
+ if (mInventory[i] != null && mInventory[i].stackSize <= 0) {
+ mInventory[i] = null;
+ }
+ }
}
@Override
public void saveNBTData(NBTTagCompound aNBT) {
super.saveNBTData(aNBT);
- aNBT.setBoolean("disableSort", disableSort);
}
@Override
public void loadNBTData(NBTTagCompound aNBT) {
super.loadNBTData(aNBT);
- disableSort = aNBT.getBoolean("disableSort");
}
@Override
public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
-
+
}
public String trans(String aKey, String aEnglish) {
@@ -137,5 +137,13 @@ public class GT_MetaTileEntity_Hatch_ElementalDataOrbHolder extends GT_MetaTileE
public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
return aSide == getBaseMetaTileEntity().getFrontFacing() && (mRecipeMap == null || mRecipeMap.containsInput(aStack));
}
+
+ public ArrayList<ItemStack> getInventory(){
+ ArrayList<ItemStack> aContents = new ArrayList<ItemStack>();
+ for (int i=0;i<this.getSizeInventory();i++) {
+ aContents.add(this.getStackInSlot(i));
+ }
+ return aContents;
+ }
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy_RTG.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy_RTG.java
index 7b52b9449f..93e6274508 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy_RTG.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy_RTG.java
@@ -12,6 +12,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy;
import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.minecraft.InventoryUtils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
@@ -37,8 +38,12 @@ public class GT_MetaTileEntity_Hatch_Energy_RTG extends GT_MetaTileEntity_Hatch_
}
@Override
- public String[] getDescription() {
- return super.getDescription();
+ public String[] getDescription() {
+ String[] S = super.getDescription();
+ final String[] desc = new String[S.length + 1];
+ System.arraycopy(S, 0, desc, 0, S.length);
+ desc[S.length] = CORE.GT_Tooltip;
+ return desc;
}
@Override
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java
index 01134817ae..57f8b722c3 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java
@@ -51,7 +51,8 @@ GT_MetaTileEntity_Hatch {
}
return new String[]{
this.mDescription,
- "Capacity: " + mSlots + " slots"};
+ "Capacity: " + mSlots + " slots",
+ CORE.GT_Tooltip};
}
@Override
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java
index 5303a42bf6..ba4e394114 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java
@@ -62,15 +62,15 @@ public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch
public String[] getDescription() {
if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) {
String[] mDescArray = StaticFields59.getDescriptionArray(this);
- String[] desc = new String[mDescArray.length + 6];
+ String[] desc = new String[mDescArray.length + 7];
System.arraycopy(mDescArray, 0, desc, 0, mDescArray.length);
desc[mDescArray.length] = "DO NOT OBSTRUCT THE OUTPUT!";
desc[mDescArray.length + 1] = "Requires 3 Air on the exhaust face";
desc[mDescArray.length + 2] = "Requires Air Filters";
desc[mDescArray.length + 3] = "Mufflers require T2 Filters from IV-"+GT_Values.VN[9];
desc[mDescArray.length + 4] = "Reduces Pollution to " + this.calculatePollutionReductionForTooltip(100) + "%";
- desc[mDescArray.length + 5] = "Recovers " + (105 - this.calculatePollutionReductionForTooltip(100))
- + "% of CO2/CO/SO2";
+ desc[mDescArray.length + 5] = "Recovers " + (105 - this.calculatePollutionReductionForTooltip(100)) + "% of CO2/CO/SO2";
+ desc[mDescArray.length + 6] = CORE.GT_Tooltip;
return desc;
}
else {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java
index 0d4d8b6cdd..d0f1d8e03f 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java
@@ -12,6 +12,7 @@ import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Utility;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
import gtPlusPlus.xmod.gregtech.common.StaticFields59;
import net.minecraft.item.ItemStack;
@@ -115,7 +116,8 @@ public class GT_MetaTileEntity_Hatch_Naquadah extends GT_MetaTileEntity_Hatch_In
"Capacity: " + getCapacity()+"L",
"Accepted Fluid: " + aNaq,
"Accepted Fluid: " + aEnrNaq,
- "Accepted Fluid: " + aNaquad
+ "Accepted Fluid: " + aNaquad,
+ CORE.GT_Tooltip
};
return s2;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java
index 8cb7c943c0..ba97cc38eb 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java
@@ -49,7 +49,8 @@ GT_MetaTileEntity_Hatch {
}
return new String[]{
this.mDescription,
- "Capacity: " + mSlots + " slots"};
+ "Capacity: " + mSlots + " slots",
+ CORE.GT_Tooltip};
}
@Override
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Plasma.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Plasma.java
index b395bbbabe..1251c42ae3 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Plasma.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Plasma.java
@@ -11,6 +11,7 @@ import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.api.objects.data.AutoMap;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
import gtPlusPlus.xmod.gregtech.common.StaticFields59;
import net.minecraft.item.ItemStack;
@@ -159,7 +160,7 @@ public class GT_MetaTileEntity_Hatch_Plasma extends GT_MetaTileEntity_Hatch_Outp
String[] s2 = new String[]{
- a1, a2, a3
+ a1, a2, a3, CORE.GT_Tooltip
};
return s2;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusInput.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusInput.java
index fb67b48e7f..f1dd131a67 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusInput.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusInput.java
@@ -10,6 +10,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_LanguageManager;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
+import gtPlusPlus.core.lib.CORE;
import gregtech.api.util.GT_Utility;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
@@ -25,7 +26,8 @@ public class GT_MetaTileEntity_Hatch_Steam_BusInput extends GT_MetaTileEntity_Ha
"Item Input for Steam Multiblocks",
"Shift + right click with screwdriver to toggle automatic item shuffling",
"Capacity: 4 stacks",
- "Does not work with non-steam multiblocks"});
+ "Does not work with non-steam multiblocks",
+ CORE.GT_Tooltip});
}
public GT_MetaTileEntity_Hatch_Steam_BusInput(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusOutput.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusOutput.java
index fb626cb817..2fb3fea084 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusOutput.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusOutput.java
@@ -8,6 +8,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
import gregtech.api.objects.GT_RenderedTexture;
+import gtPlusPlus.core.lib.CORE;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
@@ -16,7 +17,8 @@ public class GT_MetaTileEntity_Hatch_Steam_BusOutput extends GT_MetaTileEntity_H
public GT_MetaTileEntity_Hatch_Steam_BusOutput(int aID, String aName, String aNameRegional, int aTier) {
super(aID, aName, aNameRegional, aTier, 4, new String[]{"Item Output for Steam Multiblocks",
"Capacity: 4 stacks",
- "Does not work with non-steam multiblocks"});
+ "Does not work with non-steam multiblocks",
+ CORE.GT_Tooltip});
}
public GT_MetaTileEntity_Hatch_Steam_BusOutput(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_TurbineProvider.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_TurbineProvider.java
index 752321506d..0b84f676f4 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_TurbineProvider.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_TurbineProvider.java
@@ -8,6 +8,7 @@ import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus;
import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_LargeTurbine;
import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.core.util.sys.KeyboardUtils;
@@ -49,7 +50,14 @@ public class GT_MetaTileEntity_Hatch_TurbineProvider extends GT_MetaTileEntity_H
@Override
public String[] getDescription() {
return new String[]{
- "An automation port for Large Turbines", "Will attempt once per 1200 ticks to fill the turbine slot of it's parent turbine", "You may adjust this with a screwdriver", "Hold shift to adjust in finer amounts", "Hold control to adjust direction", "Left Click with Screwdriver to reset", "This module assumes the entire turbine is in the same Chunk"};
+ "An automation port for Large Turbines",
+ "Will attempt once per 1200 ticks to fill the turbine slot of it's parent turbine",
+ "You may adjust this with a screwdriver",
+ "Hold shift to adjust in finer amounts",
+ "Hold control to adjust direction",
+ "Left Click with Screwdriver to reset",
+ "This module assumes the entire turbine is in the same Chunk",
+ CORE.GT_Tooltip};
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java
index d503452022..b27cb95ca4 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java
@@ -8,6 +8,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Utility;
import gregtech.api.util.extensions.ArrayExt;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
import net.minecraft.entity.player.EntityPlayer;
@@ -125,6 +126,7 @@ public class GT_MetaTileEntity_SuperBus_Input extends GT_MetaTileEntity_Hatch_In
"Item Input for Multiblocks",
"This bus has no GUI, but can have items extracted",
""+getSlots(this.mTier)+" Slots",
+ CORE.GT_Tooltip
};
return aDesc;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Output.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Output.java
index 66bfbea8b1..37aa57298a 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Output.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Output.java
@@ -6,6 +6,7 @@ import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBus;
import gregtech.api.util.GT_Utility;
import gregtech.api.util.extensions.ArrayExt;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
import net.minecraft.entity.player.EntityPlayer;
@@ -93,6 +94,7 @@ public class GT_MetaTileEntity_SuperBus_Output extends GT_MetaTileEntity_Hatch_O
"Item Output for Multiblocks",
"This bus has no GUI",
""+getSlots(this.mTier)+" Slots",
+ CORE.GT_Tooltip
};
return aDesc;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GT_MetaTileEntity_Hatch_CustomFluidBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GT_MetaTileEntity_Hatch_CustomFluidBase.java
index e0ff04763d..124f8695f5 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GT_MetaTileEntity_Hatch_CustomFluidBase.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GT_MetaTileEntity_Hatch_CustomFluidBase.java
@@ -2,6 +2,7 @@ package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.minecraft.FluidUtils;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
@@ -114,7 +115,8 @@ public class GT_MetaTileEntity_Hatch_CustomFluidBase extends GT_MetaTileEntity_H
String[] s2 = new String[]{
"Fluid Input for "+(isSteam ? "Steam " : "")+"Multiblocks",
"Capacity: " + getCapacity()+"L",
- aFluidName
+ aFluidName,
+ CORE.GT_Tooltip
};
return s2;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaTransformerHiAmp.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaTransformerHiAmp.java
index ccf31673e7..768a57f8b2 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaTransformerHiAmp.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaTransformerHiAmp.java
@@ -85,7 +85,9 @@ public class GregtechMetaTransformerHiAmp extends GT_MetaTileEntity_Transformer
@Override
public String[] getDescription() {
- return new String[] { this.mDescription, "Accepts 4A and outputs 16A"};
+ return new String[] { this.mDescription,
+ "Accepts 4A and outputs 16A",
+ CORE.GT_Tooltip};
}
@Override
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
index 0b8182c64a..d413ce44e4 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
@@ -30,6 +30,7 @@ import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.recipe.common.CI;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
+import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
import gtPlusPlus.preloader.CORE_Preloader;
import gtPlusPlus.preloader.asm.AsmConfig;
@@ -51,6 +52,8 @@ import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import net.minecraftforge.fluids.FluidStack;
+import net.minecraftforge.oredict.OreDictionary;
+
import org.apache.commons.lang3.ArrayUtils;
import java.lang.reflect.InvocationTargetException;
@@ -63,6 +66,10 @@ import java.util.function.Function;
import static gtPlusPlus.core.util.data.ArrayUtils.removeNulls;
+// Glee8e - 11/12/21 - 2:15pm
+// Yeah, now I see what's wrong. Someone inherited from GregtechMeta_MultiBlockBase instead of GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialDehydrator> as it should have been
+// so any method in GregtechMetaTileEntity_IndustrialDehydrator would see generic field declared in GregtechMeta_MultiBlockBase without generic parameter
+
public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_EnhancedMultiBlockBase<T>> extends GT_MetaTileEntity_EnhancedMultiBlockBase<T> {
public static final boolean DEBUG_DISABLE_CORES_TEMPORARILY = true;
@@ -91,14 +98,15 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En
protected long mTotalRunTime = 0;
protected boolean mVoidExcess = false;
- //Control Core Hatch
public ArrayList<GT_MetaTileEntity_Hatch_ControlCore> mControlCoreBus = new ArrayList<GT_MetaTileEntity_Hatch_ControlCore>();
public ArrayList<GT_MetaTileEntity_Hatch_AirIntake> mAirIntakes = new ArrayList<GT_MetaTileEntity_Hatch_AirIntake>();
public ArrayList<GT_MetaTileEntity_Hatch_InputBattery> mChargeHatches = new ArrayList<GT_MetaTileEntity_Hatch_InputBattery>();
public ArrayList<GT_MetaTileEntity_Hatch_OutputBattery> mDischargeHatches = new ArrayList<GT_MetaTileEntity_Hatch_OutputBattery>();
+ public ArrayList<GT_MetaTileEntity_Hatch> mAllEnergyHatches = new ArrayList<GT_MetaTileEntity_Hatch>();
+ public ArrayList<GT_MetaTileEntity_Hatch> mAllDynamoHatches = new ArrayList<GT_MetaTileEntity_Hatch>();
// Custom Behaviour Map
- private static final HashMap<String, SpecialMultiBehaviour> mCustomBehviours = new HashMap<String, SpecialMultiBehaviour>();;
+ private static final HashMap<String, SpecialMultiBehaviour> mCustomBehviours = new HashMap<String, SpecialMultiBehaviour>();
public GregtechMeta_MultiBlockBase(final int aID, final String aName,
@@ -1464,6 +1472,8 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En
this.mAirIntakes.clear();
this.mTecTechEnergyHatches.clear();
this.mTecTechDynamoHatches.clear();
+ this.mAllEnergyHatches.clear();
+ this.mAllDynamoHatches.clear();
}
}
@@ -1654,8 +1664,11 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En
return mMaintenanceHatches.size() <= 1 && !mMufflerHatches.isEmpty();
}
- public <E> boolean addToMachineListInternal(ArrayList<E> aList, final IMetaTileEntity aTileEntity,
- final int aBaseCasingIndex) {
+ public <E> boolean addToMachineListInternal(ArrayList<E> aList, final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) {
+ return addToMachineListInternal(aList, getMetaTileEntity(aTileEntity), aBaseCasingIndex);
+ }
+
+ public <E> boolean addToMachineListInternal(ArrayList<E> aList, final IMetaTileEntity aTileEntity, final int aBaseCasingIndex) {
if (aTileEntity == null) {
return false;
}
@@ -1665,7 +1678,15 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En
* Class <?> aHatchType = ReflectionUtils.getTypeOfGenericObject(aList); if
* (!aHatchType.isInstance(aTileEntity)) { return false; }
*/
+
+ // Try setRecipeMap
+ if (aTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
+ ((GT_MetaTileEntity_Hatch_Input) aTileEntity).mRecipeMap = getRecipeMap();
+ }
+ if (aTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) {
+ ((GT_MetaTileEntity_Hatch_InputBus) aTileEntity).mRecipeMap = getRecipeMap();
+ }
if (aList.isEmpty()) {
if (aTileEntity instanceof GT_MetaTileEntity_Hatch) {
@@ -1742,33 +1763,35 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En
//mControlCoreBus
public boolean addControlCoreToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) {
- final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) {
- log("Tried to add null module entity.");
- return false;
- }
if (!mControlCoreBus.isEmpty()) {
log("Tried to add a secondary control core module.");
return false;
}
-
- GT_MetaTileEntity_Hatch_ControlCore Module = (GT_MetaTileEntity_Hatch_ControlCore) aMetaTileEntity;
-
+ GT_MetaTileEntity_Hatch_ControlCore Module = (GT_MetaTileEntity_Hatch_ControlCore) getMetaTileEntity(aTileEntity);
if (Module != null) {
if (Module.setOwner(aTileEntity)) {
log("Adding control core module.");
- return addToMachineListInternal(mControlCoreBus, aMetaTileEntity, aBaseCasingIndex);
+ return addToMachineListInternal(mControlCoreBus, Module, aBaseCasingIndex);
}
}
return false;
}
- @Override
- public boolean addToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) {
+ private IMetaTileEntity getMetaTileEntity(final IGregTechTileEntity aTileEntity) {
if (aTileEntity == null) {
- return false;
+ return null;
}
final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
+ return aMetaTileEntity;
+ }
+
+
+ @Override
+ public boolean addToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) {
+ return addToMachineList(getMetaTileEntity(aTileEntity), aBaseCasingIndex);
+ }
+
+ public boolean addToMachineList(final IMetaTileEntity aMetaTileEntity, final int aBaseCasingIndex) {
if (aMetaTileEntity == null) {
return false;
}
@@ -1776,10 +1799,14 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En
//Use this to determine the correct value, then update the hatch texture after.
boolean aDidAdd = false;
- //Handle Custom Hustoms
+ //Handle Custom Hatches
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_ControlCore) {
log("Found GT_MetaTileEntity_Hatch_ControlCore");
- aDidAdd = addControlCoreToMachineList(aTileEntity, aBaseCasingIndex);
+ if (!mControlCoreBus.isEmpty()) {
+ log("Tried to add a secondary control core module.");
+ return false;
+ }
+ aDidAdd = addToMachineListInternal(this.mControlCoreBus, aMetaTileEntity, aBaseCasingIndex);
}
else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBattery) {
log("Found GT_MetaTileEntity_Hatch_InputBattery");
@@ -1789,17 +1816,22 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En
log("Found GT_MetaTileEntity_Hatch_OutputBattery");
aDidAdd = addToMachineListInternal(mDischargeHatches, aMetaTileEntity, aBaseCasingIndex);
}
+ else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_AirIntake) {
+ aDidAdd = addToMachineListInternal(mAirIntakes, aMetaTileEntity, aBaseCasingIndex);
+ }
//Handle TT Multi-A Energy Hatches
else if (LoadedMods.TecTech && isThisHatchMultiEnergy(aMetaTileEntity)) {
log("Found isThisHatchMultiEnergy");
aDidAdd = addToMachineListInternal(mTecTechEnergyHatches, aMetaTileEntity, aBaseCasingIndex);
+ updateMasterEnergyHatchList(aMetaTileEntity);
}
//Handle TT Multi-A Dynamos
else if (LoadedMods.TecTech && isThisHatchMultiDynamo(aMetaTileEntity)) {
log("Found isThisHatchMultiDynamo");
aDidAdd = addToMachineListInternal(mTecTechDynamoHatches, aMetaTileEntity, aBaseCasingIndex);
+ updateMasterDynamoHatchList(aMetaTileEntity);
}
//Handle Fluid Hatches using seperate logic
@@ -1813,10 +1845,14 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En
aDidAdd = addToMachineListInternal(mInputBusses, aMetaTileEntity, aBaseCasingIndex);
else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus)
aDidAdd = addToMachineListInternal(mOutputBusses, aMetaTileEntity, aBaseCasingIndex);
- else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy)
+ else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy) {
aDidAdd = addToMachineListInternal(mEnergyHatches, aMetaTileEntity, aBaseCasingIndex);
- else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo)
+ updateMasterEnergyHatchList(aMetaTileEntity);
+ }
+ else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo) {
aDidAdd = addToMachineListInternal(mDynamoHatches, aMetaTileEntity, aBaseCasingIndex);
+ updateMasterDynamoHatchList(aMetaTileEntity);
+ }
else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance)
aDidAdd = addToMachineListInternal(mMaintenanceHatches, aMetaTileEntity, aBaseCasingIndex);
else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler)
@@ -1830,57 +1866,54 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En
@Override
public boolean addMaintenanceToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
- return addToMachineList(aTileEntity, aBaseCasingIndex);
+ IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity);
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance) {
+ return addToMachineList(aMetaTileEntity, aBaseCasingIndex);
+ }
+ return false;
}
@Override
public boolean addMufflerToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
- return addToMachineList(aTileEntity, aBaseCasingIndex);
+ IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity);
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
+ return addToMachineList(aMetaTileEntity, aBaseCasingIndex);
+ }
+ return false;
}
@Override
public boolean addInputToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
- return addToMachineList(aTileEntity, aBaseCasingIndex);
+ IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity);
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input || aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) {
+ return addToMachineList(aMetaTileEntity, aBaseCasingIndex);
+ }
+ return false;
}
@Override
public boolean addOutputToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
- return addToMachineList(aTileEntity, aBaseCasingIndex);
+ IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity);
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output || aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
+ return addToMachineList(aMetaTileEntity, aBaseCasingIndex);
+ }
+ return false;
}
- public boolean addAirIntakeToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) {
- if (aTileEntity == null) {
- return false;
- }
- final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) {
- return false;
- }
+ public boolean addAirIntakeToMachineList(final IGregTechTileEntity aMetaTileEntity, final int aBaseCasingIndex) {
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_AirIntake) {
- this.mAirIntakes.add((GT_MetaTileEntity_Hatch_AirIntake)aMetaTileEntity);
+ return addToMachineList(aMetaTileEntity, aBaseCasingIndex);
}
- return addToMachineList(aTileEntity, aBaseCasingIndex);
+ return false;
}
public boolean addFluidInputToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) {
- if (aTileEntity == null) {
- return false;
- }
- final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) {
- return false;
- }
- return addFluidInputToMachineList(aMetaTileEntity, aBaseCasingIndex);
+ return addFluidInputToMachineList(getMetaTileEntity(aTileEntity), aBaseCasingIndex);
}
- public boolean addFluidInputToMachineList(final IMetaTileEntity aTileEntity, final int aBaseCasingIndex) {
- if (aTileEntity == null) {
- return false;
- }
- final IMetaTileEntity aMetaTileEntity = aTileEntity;
+ public boolean addFluidInputToMachineList(final IMetaTileEntity aMetaTileEntity, final int aBaseCasingIndex) {
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
- ((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity).mRecipeMap = this.getRecipeMap();
- return addToMachineListInternal(mInputHatches, aMetaTileEntity, aBaseCasingIndex);
+ return addToMachineList(aMetaTileEntity, aBaseCasingIndex);
}
return false;
}
@@ -1909,10 +1942,7 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En
}
public boolean resetRecipeMapForHatch(IGregTechTileEntity aTileEntity, GT_Recipe_Map aMap) {
try {
- if (aTileEntity == null) {
- return false;
- }
- final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
+ final IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity);
if (aMetaTileEntity == null) {
return false;
}
@@ -1982,11 +2012,7 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En
*/
public boolean updateTexture(final IGregTechTileEntity aTileEntity, int aCasingID){
- final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) {
- return false;
- }
- return updateTexture(aMetaTileEntity, aCasingID);
+ return updateTexture(getMetaTileEntity(aTileEntity), aCasingID);
}
/**
@@ -2071,22 +2097,21 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En
*/
public boolean addMultiAmpDynamoToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex){
- //GT_MetaTileEntity_Hatch_DynamoMulti
- if (aTileEntity == null) {
- return false;
- }
- final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
+ final IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity);
if (aMetaTileEntity == null) {
return false;
}
if (isThisHatchMultiDynamo(aTileEntity)) {
- updateTexture(aTileEntity, aBaseCasingIndex);
- return this.mTecTechDynamoHatches.add((GT_MetaTileEntity_Hatch) aMetaTileEntity);
+ return addToMachineListInternal(mTecTechDynamoHatches, aMetaTileEntity, aBaseCasingIndex);
}
return false;
}
- public boolean isThisHatchMultiDynamo(Object aMetaTileEntity){
+ public boolean isThisHatchMultiDynamo(IGregTechTileEntity aTileEntity){
+ return isThisHatchMultiDynamo(getMetaTileEntity(aTileEntity));
+ }
+
+ public boolean isThisHatchMultiDynamo(IMetaTileEntity aMetaTileEntity){
Class<?> mDynamoClass;
mDynamoClass = ReflectionUtils.getClass("com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_DynamoMulti");
if (mDynamoClass != null){
@@ -2099,13 +2124,22 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En
@Override
public boolean addDynamoToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
- if (LoadedMods.TecTech){
- if (isThisHatchMultiDynamo(aTileEntity)) {
- return addMultiAmpDynamoToMachineList(aTileEntity, aBaseCasingIndex);
- }
-
+ IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity);
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo || isThisHatchMultiDynamo(aMetaTileEntity)) {
+ return addToMachineList(aMetaTileEntity, aBaseCasingIndex);
}
- return addToMachineList(aTileEntity, aBaseCasingIndex);
+ return false;
+ }
+
+ private boolean updateMasterDynamoHatchList(IMetaTileEntity aMetaTileEntity) {
+ if (aMetaTileEntity == null) {
+ return false;
+ }
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch) {
+ GT_MetaTileEntity_Hatch aHatch = (GT_MetaTileEntity_Hatch) aMetaTileEntity;
+ return mAllDynamoHatches.add(aHatch);
+ }
+ return false;
}
@@ -2117,22 +2151,21 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En
*/
public boolean addMultiAmpEnergyToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex){
- //GT_MetaTileEntity_Hatch_DynamoMulti
- if (aTileEntity == null) {
- return false;
- }
- final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
+ final IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity);
if (aMetaTileEntity == null) {
return false;
}
- if (isThisHatchMultiEnergy(aTileEntity)) {
- updateTexture(aTileEntity, aBaseCasingIndex);
- return this.mTecTechEnergyHatches.add((GT_MetaTileEntity_Hatch) aMetaTileEntity);
+ if (isThisHatchMultiEnergy(aMetaTileEntity)) {
+ return addToMachineListInternal(mTecTechEnergyHatches, aMetaTileEntity, aBaseCasingIndex);
}
return false;
+ }
+
+ public boolean isThisHatchMultiEnergy(IGregTechTileEntity aTileEntity){
+ return isThisHatchMultiEnergy(getMetaTileEntity(aTileEntity));
}
- public boolean isThisHatchMultiEnergy(Object aMetaTileEntity){
+ public boolean isThisHatchMultiEnergy(IMetaTileEntity aMetaTileEntity){
Class<?> mDynamoClass;
mDynamoClass = ReflectionUtils.getClass("com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti");
if (mDynamoClass != null){
@@ -2145,13 +2178,22 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En
@Override
public boolean addEnergyInputToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
- if (LoadedMods.TecTech){
- if (isThisHatchMultiEnergy(aTileEntity)) {
- return addMultiAmpEnergyToMachineList(aTileEntity, aBaseCasingIndex);
- }
-
+ IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity);
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy || isThisHatchMultiEnergy(aMetaTileEntity)) {
+ return addToMachineList(aMetaTileEntity, aBaseCasingIndex);
}
- return super.addEnergyInputToMachineList(aTileEntity, aBaseCasingIndex);
+ return false;
+ }
+
+ private boolean updateMasterEnergyHatchList(IMetaTileEntity aMetaTileEntity) {
+ if (aMetaTileEntity == null) {
+ return false;
+ }
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch) {
+ GT_MetaTileEntity_Hatch aHatch = (GT_MetaTileEntity_Hatch) aMetaTileEntity;
+ return mAllEnergyHatches.add(aHatch);
+ }
+ return false;
}
@@ -2388,20 +2430,43 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En
@Override
public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX,
float aY, float aZ) {
- //Do Super
- boolean aSuper = super.onRightclick(aBaseMetaTileEntity, aPlayer, aSide, aX, aY, aZ);
// Do Things
if (this.getBaseMetaTileEntity().isServerSide()) {
+ //Logger.INFO("Right Clicked Controller.");
ItemStack tCurrentItem = aPlayer.inventory.getCurrentItem();
- if (tCurrentItem != null) {
- if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSoftHammerList)) {
-
- }
+ if (tCurrentItem != null) {
+ //Logger.INFO("Holding Item.");
+ if (tCurrentItem.getItem() instanceof GT_MetaGenerated_Tool) {
+ //Logger.INFO("Is GT_MetaGenerated_Tool.");
+ int[] aOreID = OreDictionary.getOreIDs(tCurrentItem);
+ for (int id : aOreID) {
+ // Plunger
+ if (OreDictionary.getOreName(id).equals("craftingToolPlunger")) {
+ //Logger.INFO("Is Plunger.");
+ return onPlungerRightClick(aPlayer, aSide, aX, aY, aZ);
+ }
+ }
+ }
}
}
+ //Do Super
+ boolean aSuper = super.onRightclick(aBaseMetaTileEntity, aPlayer, aSide, aX, aY, aZ);
return aSuper;
}
+ public boolean onPlungerRightClick(EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) {
+ int aHatchIndex = 0;
+ PlayerUtils.messagePlayer(aPlayer, "Trying to clear "+mOutputHatches.size()+" output hatches.");
+ for (GT_MetaTileEntity_Hatch_Output hatch : this.mOutputHatches) {
+ if (hatch.mFluid != null) {
+ PlayerUtils.messagePlayer(aPlayer, "Clearing "+hatch.mFluid.amount+"L of "+hatch.mFluid.getLocalizedName()+" from hatch "+aHatchIndex+".");
+ hatch.mFluid = null;
+ }
+ aHatchIndex++;
+ }
+ return aHatchIndex > 0;
+ }
+
@Override
public boolean onSolderingToolRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
boolean tSuper = super.onSolderingToolRightClick(aSide, aWrenchingSide, aPlayer, aX, aY, aZ);
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_SteamMultiBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_SteamMultiBase.java
index 36e68f6438..21b0efff99 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_SteamMultiBase.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_SteamMultiBase.java
@@ -290,18 +290,18 @@ public abstract class GregtechMeta_SteamMultiBase extends GregtechMeta_MultiBloc
}
//Use this to determine the correct value, then update the hatch texture after.
- boolean aDidAdd = false;
+ boolean aDidAdd = false;
- //Handle Custom Hustoms
-
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_CustomFluidBase)
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_CustomFluidBase) {
aDidAdd = addToMachineListInternal(mSteamInputFluids, aMetaTileEntity, aBaseCasingIndex);
-
- else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Steam_BusInput)
- aDidAdd = addToMachineListInternal(mSteamInputs, aMetaTileEntity, aBaseCasingIndex);
-
- else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Steam_BusOutput)
+ }
+ else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Steam_BusInput) {
+ ((GT_MetaTileEntity_Hatch_InputBus) aTileEntity).mRecipeMap = getRecipeMap();
+ aDidAdd = addToMachineListInternal(mSteamInputs, aMetaTileEntity, aBaseCasingIndex);
+ }
+ else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Steam_BusOutput) {
aDidAdd = addToMachineListInternal(mSteamOutputs, aMetaTileEntity, aBaseCasingIndex);
+ }
return aDidAdd;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java
index 885069693d..f9105dceb1 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java
@@ -12,7 +12,6 @@ import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils;
import net.minecraft.entity.player.EntityPlayer;
@@ -63,16 +62,16 @@ public abstract class GregtechRocketFuelGeneratorBase extends GT_MetaTileEntity_
@Override
public String[] getDescription() {
- int pollMin = mTier == 4 ? 250 : (mTier == 5 ? 500 : 750);
- int pollMax = mTier == 4 ? 2000 : (mTier == 5 ? 4000 : 6000);
- String aPollution = "Causes between "+pollMin+" and "+pollMax+ " Pollution per second";
- return new String[]{
- this.mDescription,
- "Fuel Efficiency: " + this.getEfficiency() + "%",
- aPollution};
+ String aPollution = "Causes between "+pollMin+" and "+pollMax+ " Pollution per second";
+ return new String[]{
+ this.mDescription,
+ "Fuel Efficiency: " + this.getEfficiency() + "%",
+ aPollution,
+ CORE.GT_Tooltip};
}
+
@Override
public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) {
if (aBaseMetaTileEntity.isClientSide()) {
@@ -199,8 +198,8 @@ public abstract class GregtechRocketFuelGeneratorBase extends GT_MetaTileEntity_
@Override
public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) {
-
-
+
+
//super.onPostTick(aBaseMetaTileEntity, aTick);
/*if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork() && aTick % 10L == 0L) {
@@ -251,9 +250,9 @@ public abstract class GregtechRocketFuelGeneratorBase extends GT_MetaTileEntity_
.getUniversalEnergyStored() >= this.maxEUOutput() + this.getMinimumStoredEU());
}*/
-
-
-
+
+
+
if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork() && ((aTick % 10) == 0)) {
if (this.mFluid == null) {
if (aBaseMetaTileEntity.getUniversalEnergyStored() < (this.maxEUOutput() + this.getMinimumStoredEU())) {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_Catalysts.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_Catalysts.java
index ea74e650dd..5e0918059d 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_Catalysts.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_Catalysts.java
@@ -3,6 +3,7 @@ package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.nbthandlers;
import gregtech.api.interfaces.ITexture;
import gregtech.api.objects.GT_RenderedTexture;
import gtPlusPlus.api.objects.data.AutoMap;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import net.minecraft.item.ItemStack;
@@ -30,6 +31,13 @@ public class GT_MetaTileEntity_Hatch_Catalysts extends GT_MetaTileEntity_Hatch_N
public ITexture[] getTexturesInactive(ITexture aBaseTexture) {
return new ITexture[]{aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Bus_Catalyst)};
}
+
+ @Override
+ public String[] getDescription() {
+ return new String[]{
+ this.mDescription,
+ CORE.GT_Tooltip};
+ }
@Override
public boolean isFacingValid(byte aFacing) {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_MillingBalls.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_MillingBalls.java
index 6c28ab2e27..7514855a2c 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_MillingBalls.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_MillingBalls.java
@@ -3,6 +3,7 @@ package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.nbthandlers;
import gregtech.api.interfaces.ITexture;
import gregtech.api.objects.GT_RenderedTexture;
import gtPlusPlus.api.objects.data.AutoMap;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import net.minecraft.item.ItemStack;
@@ -30,6 +31,13 @@ public class GT_MetaTileEntity_Hatch_MillingBalls extends GT_MetaTileEntity_Hatc
public ITexture[] getTexturesInactive(ITexture aBaseTexture) {
return new ITexture[]{aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Bus_Milling_Balls)};
}
+
+ @Override
+ public String[] getDescription() {
+ return new String[]{
+ this.mDescription,
+ CORE.GT_Tooltip};
+ }
@Override
public boolean isFacingValid(byte aFacing) {