aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJordan Byrne <draknyte1@hotmail.com>2018-02-04 20:25:22 +1000
committerJordan Byrne <draknyte1@hotmail.com>2018-02-04 20:25:22 +1000
commitdf07c3247fe4c44c7c3539eecbc2af69bc305b49 (patch)
treeabf68870cc92bb61514e5e2e8de942ae413e2c60 /src
parentd10ed0cdab2df584b867177de85f897f83bad187 (diff)
downloadGT5-Unofficial-df07c3247fe4c44c7c3539eecbc2af69bc305b49.tar.gz
GT5-Unofficial-df07c3247fe4c44c7c3539eecbc2af69bc305b49.tar.bz2
GT5-Unofficial-df07c3247fe4c44c7c3539eecbc2af69bc305b49.zip
+ Added more casings for multiblocks.
+ Added the Fish Pond. $ Added support for more textures in TAE.java. - Disabled GT ASM.
Diffstat (limited to 'src')
-rw-r--r--src/Java/gregtech/api/enums/TAE.java46
-rw-r--r--src/Java/gtPlusPlus/core/block/ModBlocks.java2
-rw-r--r--src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java2
-rw-r--r--src/Java/gtPlusPlus/preloader/asm/transformers/Preloader_Transformer_Handler.java30
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java5
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java61
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java72
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialFishingPond.java307
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java2
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialFishPond.java24
10 files changed, 528 insertions, 23 deletions
diff --git a/src/Java/gregtech/api/enums/TAE.java b/src/Java/gregtech/api/enums/TAE.java
index c6fc8c7790..fbc9e9e583 100644
--- a/src/Java/gregtech/api/enums/TAE.java
+++ b/src/Java/gregtech/api/enums/TAE.java
@@ -1,16 +1,22 @@
package gregtech.api.enums;
+import java.lang.reflect.Field;
+
+import gregtech.api.enums.Textures.BlockIcons;
import gregtech.api.interfaces.ITexture;
import gregtech.api.objects.GT_CopiedBlockTexture;
import gregtech.api.objects.GT_RenderedTexture;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.core.util.reflect.ReflectionUtils;
public class TAE {
//TAE stands for Texture Array Expansion.
-
+
public static int gtTexturesArrayStartOrigin;
- public static int gtPPLastUsedIndex = 96;
+ public static int gtPPLastUsedIndex = 64;
+ public static int secondaryIndex = 0;
public static boolean hasArrayBeenExpanded = false;
public static boolean hookGtTextures() {
@@ -42,12 +48,36 @@ public class TAE {
}*/
public static boolean registerTextures(GT_CopiedBlockTexture gt_CopiedBlockTexture) {
- Textures.BlockIcons.CASING_BLOCKS[gtPPLastUsedIndex] = gt_CopiedBlockTexture;
- gtPPLastUsedIndex++;
- //Just so I know registration is done.
- return true;
+ try {
+
+ //Handle page 2.
+ if (gtPPLastUsedIndex >= 128) {
+ if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && Utils.getGregtechSubVersion() > 30) {
+ Field x = ReflectionUtils.getField(Textures.BlockIcons.class, "casingTexturePages");
+ if (x != null) {
+ ITexture[][] h = (ITexture[][]) x.get(null);
+ if (h != null) {
+ h[64][secondaryIndex++] = gt_CopiedBlockTexture;
+ x.set(null, h);
+ return true;
+ }
+ }
+ }
+ }
+
+ //set to page 1.
+ else {
+ Textures.BlockIcons.CASING_BLOCKS[gtPPLastUsedIndex] = gt_CopiedBlockTexture;
+ gtPPLastUsedIndex++;
+ return true;
+ }
+ }
+ catch (Throwable t) {
+ t.printStackTrace();
+ }
+ return false;
}
-
+
public static ITexture getTexture(int index){
if (!hasArrayBeenExpanded){
return null;
@@ -56,7 +86,7 @@ public class TAE {
return Textures.BlockIcons.CASING_BLOCKS[(96+index)];
}
}
-
+
public static int GTPP_INDEX(int ID){
return (96+ID);
}
diff --git a/src/Java/gtPlusPlus/core/block/ModBlocks.java b/src/Java/gtPlusPlus/core/block/ModBlocks.java
index 24e589ad97..04ada83922 100644
--- a/src/Java/gtPlusPlus/core/block/ModBlocks.java
+++ b/src/Java/gtPlusPlus/core/block/ModBlocks.java
@@ -23,6 +23,7 @@ import gtPlusPlus.core.block.machine.Machine_WorkbenchAdvanced;
import gtPlusPlus.core.fluids.FluidRegistryHandler;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks3;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraftforge.fluids.Fluid;
@@ -39,6 +40,7 @@ public final class ModBlocks {
public static Block blockGriefSaver;
public static Block blockCasingsMisc;
public static Block blockCasings2Misc;
+ public static Block blockCasings3Misc;
public static Block blockMetaTileEntity;
public static Block blockHeliumGenerator;
public static Block blockNHG;
diff --git a/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java b/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java
index db5a6e2a74..953d32f138 100644
--- a/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java
+++ b/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java
@@ -44,7 +44,6 @@ public class COMPAT_HANDLER {
//Free IDs
/*
- 829
---
859
to
@@ -99,6 +98,7 @@ public class COMPAT_HANDLER {
GregtechComponentAssembler.run();
GregtechTeslaTower.run();
GregtechSuperTanks.run();
+ GregtechIndustrialFishPond.run();
//New Horizons Content
NewHorizonsAccelerator.run();
diff --git a/src/Java/gtPlusPlus/preloader/asm/transformers/Preloader_Transformer_Handler.java b/src/Java/gtPlusPlus/preloader/asm/transformers/Preloader_Transformer_Handler.java
index 6e30f0f94c..9163b54709 100644
--- a/src/Java/gtPlusPlus/preloader/asm/transformers/Preloader_Transformer_Handler.java
+++ b/src/Java/gtPlusPlus/preloader/asm/transformers/Preloader_Transformer_Handler.java
@@ -11,6 +11,8 @@ import net.minecraft.launchwrapper.IClassTransformer;
public class Preloader_Transformer_Handler implements IClassTransformer {
+ private final boolean mEnabled = false;
+
public byte[] transform(String name, String transformedName, byte[] basicClass) {
if(transformedName.equals("net.minecraftforge.oredict.OreDictionary")) {
FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Transforming %s", transformedName);
@@ -18,19 +20,21 @@ public class Preloader_Transformer_Handler implements IClassTransformer {
new ClassReader(basicClass).accept(new OreDictionaryVisitor(classWriter), 0);
return classWriter.toByteArray();
}
- if(transformedName.equals("gregtech.api.metatileentity.BaseMetaTileEntity")) {
- FMLRelaunchLog.log("[GT++ ASM] NBTFixer", Level.INFO, "Transforming %s", transformedName);
- ClassWriter classWriter = new ClassWriter(ClassWriter.COMPUTE_FRAMES);
- ClassReader x = new ClassReader(basicClass);
- x.accept(new GT_MetaTile_Visitor(classWriter, false), ClassReader.EXPAND_FRAMES);
- return classWriter.toByteArray();
- }
- if(transformedName.equals("gregtech.common.blocks.GT_Block_Machines")) {
- FMLRelaunchLog.log("[GT++ ASM] NBTFixer", Level.INFO, "Transforming %s", transformedName);
- ClassWriter classWriter = new ClassWriter(ClassWriter.COMPUTE_FRAMES);
- ClassReader x = new ClassReader(basicClass);
- x.accept(new GT_MetaTile_Visitor(classWriter, true), ClassReader.EXPAND_FRAMES);
- return classWriter.toByteArray();
+ if (mEnabled) {
+ if(transformedName.equals("gregtech.api.metatileentity.BaseMetaTileEntity")) {
+ FMLRelaunchLog.log("[GT++ ASM] NBTFixer", Level.INFO, "Transforming %s", transformedName);
+ ClassWriter classWriter = new ClassWriter(ClassWriter.COMPUTE_FRAMES);
+ ClassReader x = new ClassReader(basicClass);
+ x.accept(new GT_MetaTile_Visitor(classWriter, false), ClassReader.EXPAND_FRAMES);
+ return classWriter.toByteArray();
+ }
+ if(transformedName.equals("gregtech.common.blocks.GT_Block_Machines")) {
+ FMLRelaunchLog.log("[GT++ ASM] NBTFixer", Level.INFO, "Transforming %s", transformedName);
+ ClassWriter classWriter = new ClassWriter(ClassWriter.COMPUTE_FRAMES);
+ ClassReader x = new ClassReader(basicClass);
+ x.accept(new GT_MetaTile_Visitor(classWriter, true), ClassReader.EXPAND_FRAMES);
+ return classWriter.toByteArray();
+ }
}
return basicClass;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
index ff46212aa4..da2b24e38f 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
@@ -281,7 +281,10 @@ public enum GregtechItemList implements GregtechItemContainer {
Battery_Gem_1, Battery_Gem_2, Battery_Gem_3,
//Super Tier Chests
- Super_Chest_LV, Super_Chest_MV, Super_Chest_HV, Super_Chest_EV, Super_Chest_IV,
+ Super_Chest_LV, Super_Chest_MV, Super_Chest_HV, Super_Chest_EV, Super_Chest_IV,
+
+ //Fish Pond
+ Casing_FishPond, Industrial_FishingPond,
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java
new file mode 100644
index 0000000000..7a9be5788c
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java
@@ -0,0 +1,61 @@
+package gtPlusPlus.xmod.gregtech.common.blocks;
+
+import gregtech.api.enums.TAE;
+import gregtech.api.objects.GT_CopiedBlockTexture;
+import gregtech.api.util.GT_LanguageManager;
+import gregtech.common.blocks.GT_Material_Casings;
+import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
+import gtPlusPlus.xmod.gregtech.common.blocks.textures.CasingTextureHandler2;
+import gtPlusPlus.xmod.gregtech.common.blocks.textures.CasingTextureHandler3;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.IIcon;
+
+public class GregtechMetaCasingBlocks3
+extends GregtechMetaCasingBlocksAbstract {
+
+ CasingTextureHandler3 TextureHandler = new CasingTextureHandler3();
+
+ public GregtechMetaCasingBlocks3() {
+ super(GregtechMetaCasingItems.class, "gtplusplus.blockcasings.3", GT_Material_Casings.INSTANCE);
+ for (byte i = 0; i < 16; i = (byte) (i + 1)) {
+ TAE.registerTextures(new GT_CopiedBlockTexture(this, 6, i));
+ }
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Aquatic Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Hastelloy-N Sealant Block");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Hastelloy-X Structural Block");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Incoloy-DS Fluid Containment Block");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Wash Plant Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Industrial Sieve Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Large Sieve Grate");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Vanadium Redox Power Cell");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Sub-Station External Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Cyclotron Coil");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Cyclotron Outer Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Thermal Containment Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", "Autocrafter Frame");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "Cutting Factory Frame");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", "Tesla Containment Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Casing "); //Tree Farmer Textures
+ GregtechItemList.Casing_FishPond.set(new ItemStack(this, 1, 0));
+ //GregtechItemList.Casing_Refinery_External.set(new ItemStack(this, 1, 1));
+ //GregtechItemList.Casing_Refinery_Structural.set(new ItemStack(this, 1, 2));
+ //GregtechItemList.Casing_Refinery_Internal.set(new ItemStack(this, 1, 3));
+ //GregtechItemList.Casing_WashPlant.set(new ItemStack(this, 1, 4));
+ //GregtechItemList.Casing_Sifter.set(new ItemStack(this, 1, 5));
+ //GregtechItemList.Casing_SifterGrate.set(new ItemStack(this, 1, 6));
+ //GregtechItemList.Casing_Vanadium_Redox.set(new ItemStack(this, 1, 7));
+ //GregtechItemList.Casing_Power_SubStation.set(new ItemStack(this, 1, 8));
+ //GregtechItemList.Casing_Cyclotron_Coil.set(new ItemStack(this, 1, 9));
+ //GregtechItemList.Casing_Cyclotron_External.set(new ItemStack(this, 1, 10));
+ //GregtechItemList.Casing_ThermalContainment.set(new ItemStack(this, 1, 11));
+ //GregtechItemList.Casing_Autocrafter.set(new ItemStack(this, 1, 12));
+ //GregtechItemList.Casing_CuttingFactoryFrame.set(new ItemStack(this, 1, 13));
+ //GregtechItemList.Casing_TeslaTower.set(new ItemStack(this, 1, 14));
+ //GregtechItemList.Casing_PLACEHOLDER_TreeFarmer.set(new ItemStack(this, 1, 15)); //Tree Farmer Textures
+ }
+
+ @Override
+ public IIcon getIcon(final int aSide, final int aMeta) {
+ return CasingTextureHandler2.getIcon(aSide, aMeta);
+ }
+}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java
new file mode 100644
index 0000000000..4e9d2c7e51
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java
@@ -0,0 +1,72 @@
+package gtPlusPlus.xmod.gregtech.common.blocks.textures;
+
+import gregtech.api.enums.Textures;
+import net.minecraft.util.IIcon;
+
+public class CasingTextureHandler3 {
+
+ public static IIcon getIcon(final int aSide, final int aMeta) { //Texture ID's. case 0 == ID[57]
+ if ((aMeta >= 0) && (aMeta < 16)) {
+ switch (aMeta) {
+ //Centrifuge
+ case 0:
+ return TexturesGtBlock.TEXTURE_METAL_PANEL_B.getIcon();
+ //Coke Oven Frame
+ case 1:
+ return TexturesGtBlock.Casing_Material_HastelloyX.getIcon();
+ //Coke Oven Casing Tier 1
+ case 2:
+ return TexturesGtBlock.Casing_Material_HastelloyN.getIcon();
+ //Coke Oven Casing Tier 2
+ case 3:
+ return TexturesGtBlock.Casing_Material_Fluid_IncoloyDS.getIcon();
+ //Material Press Casings
+ case 4:
+ return TexturesGtBlock.Casing_Material_Grisium.getIcon();
+ //Sifter Structural
+ case 5:
+ return TexturesGtBlock.Casing_Machine_Metal_Panel_A.getIcon();
+ //Sifter Sieve
+ case 6:
+ return TexturesGtBlock.Casing_Machine_Metal_Grate_A.getIcon();
+
+ //Vanadium Radox Battery
+ case 7:
+ return TexturesGtBlock.Overlay_Machine_Cyber_B.getIcon();
+ //Power Sub-Station Casing
+ case 8:
+ return TexturesGtBlock.Casing_Machine_Metal_Sheet_A.getIcon();
+ //Cyclotron Coil
+ case 9:
+ return TexturesGtBlock.Overlay_Machine_Cyber_A.getIcon();
+ //Cyclotron External Casing
+ case 10:
+ return Textures.BlockIcons.MACHINE_CASING_RADIATIONPROOF.getIcon();
+ //Multitank Exterior Casing
+ case 11:
+ return TexturesGtBlock.Casing_Material_Tantalloy61.getIcon();
+ //Reactor Casing I
+ case 12:
+ return TexturesGtBlock.Casing_Machine_Simple_Top.getIcon();
+ //Reactor Casing II
+ case 13:
+ if (aSide <2) {
+ return TexturesGtBlock.TEXTURE_TECH_A.getIcon();
+ }
+ else {
+ return TexturesGtBlock.TEXTURE_TECH_B.getIcon();
+ }
+ case 14:
+ return TexturesGtBlock.Casing_Material_RedSteel.getIcon();
+ case 15:
+ return TexturesGtBlock.Casing_Machine_Farm_Manager.getIcon(); //Tree Farmer Textures
+
+ default:
+ return TexturesGtBlock.Overlay_UU_Matter.getIcon();
+
+ }
+ }
+ return TexturesGtBlock._PlaceHolder.getIcon();
+ }
+
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialFishingPond.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialFishingPond.java
new file mode 100644
index 0000000000..7d11e1f525
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialFishingPond.java
@@ -0,0 +1,307 @@
+package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi;
+
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.TAE;
+import gregtech.api.enums.Textures;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.util.GT_Recipe;
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.block.ModBlocks;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.core.util.fluid.FluidUtils;
+import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine;
+import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
+import ic2.core.init.BlocksItems;
+import ic2.core.init.InternalName;
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.FluidStack;
+
+public class GregtechMetaTileEntity_IndustrialFishingPond
+extends GregtechMeta_MultiBlockBase {
+
+
+ public GregtechMetaTileEntity_IndustrialFishingPond(final int aID, final String aName, final String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ public GregtechMetaTileEntity_IndustrialFishingPond(final String aName) {
+ super(aName);
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntity_IndustrialFishingPond(this.mName);
+ }
+
+ @Override
+ public String[] getDescription() {
+ return new String[]{
+ "Controller Block for the Industrial Ore Washing Plant",
+ "80% faster than using single block machines of the same voltage",
+ "Processes one item per voltage tier",
+ "Size: 7x3x5 [WxHxL] (open)",
+ "X X",
+ "X X",
+ "XXXXX",
+ "Controller (front centered)",
+ "1x Input Bus (Any casing)",
+ "1x Output Bus (Any casing)",
+ "1x Maintenance Hatch (Any casing)",
+ "1x Energy Hatch (Any casing)",
+ CORE.GT_Tooltip
+
+ };
+ }
+
+ @Override
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ if (aSide == aFacing) {
+ return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[getCasingTextureIndex()], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER)};
+ }
+ return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[getCasingTextureIndex()]};
+ }
+
+ @Override
+ public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "WireFactory.png");
+ }
+
+ @Override
+ public GT_Recipe.GT_Recipe_Map getRecipeMap() {
+ return GT_Recipe.GT_Recipe_Map.sOreWasherRecipes;
+ }
+
+ @Override
+ public boolean isFacingValid(final byte aFacing) {
+ return aFacing > 1;
+ }
+
+ @Override
+ public boolean checkRecipe(final ItemStack aStack) {
+ if (checkForWater()) {
+ return checkRecipeGeneric((1*Utils.calculateVoltageTier(this.getMaxInputVoltage())), 100, 80);
+ }
+ return false;
+ }
+
+ @Override
+ public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
+
+ //Get Facing direction
+ int mDirectionX = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
+
+ int mCurrentDirectionX;
+ int mCurrentDirectionZ;
+ int mOffsetX_Lower = 0;
+ int mOffsetX_Upper = 0;
+ int mOffsetZ_Lower = 0;
+ int mOffsetZ_Upper = 0;
+
+
+ Logger.WARNING("mDirectionX "+(mDirectionX));
+ if (mDirectionX == 0){
+ mCurrentDirectionX = 2;
+ mCurrentDirectionZ = 3;
+ mOffsetX_Lower = -2;
+ mOffsetX_Upper = 2;
+ mOffsetZ_Lower = -3;
+ mOffsetZ_Upper = 3;
+ Logger.WARNING("Controler is facing Z direction.");
+ }
+ else {
+ mCurrentDirectionX = 3;
+ mCurrentDirectionZ = 2;
+ mOffsetX_Lower = -3;
+ mOffsetX_Upper = 3;
+ mOffsetZ_Lower = -2;
+ mOffsetZ_Upper = 2;
+ Logger.WARNING("Controler is facing X direction.");
+ }
+
+ //if (aBaseMetaTileEntity.fac)
+
+ final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * mCurrentDirectionX;
+ final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * mCurrentDirectionZ;
+
+ Logger.WARNING("xDir"+(xDir));
+ Logger.WARNING("zDir"+(zDir));
+ /*if (!(aBaseMetaTileEntity.getAirOffset(xDir, 0, zDir))) {
+ return false;
+ }*/
+ int tAmount = 0;
+ for (int i = mOffsetX_Lower; i <=mOffsetX_Upper; ++i) {
+ for (int j = mOffsetZ_Lower; j <= mOffsetZ_Upper; ++j) {
+ for (int h = -1; h < 2; ++h) {
+ if ((h != 0) || ((((xDir + i != 0) || (zDir + j != 0))) && (((i != 0) || (j != 0))))) {
+ IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h,
+ zDir + j);
+ if (!addToMachineList(tTileEntity)) {
+ Logger.WARNING("X: "+i+" | Z: "+j);
+ Block tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j);
+ byte tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j);
+ if ((tBlock != getCasingBlock()) && (tMeta != getCasingMeta())) {
+ if ((i != mOffsetX_Lower && j != mOffsetZ_Lower
+ && i != mOffsetX_Upper && j != mOffsetZ_Upper) && (h == 0 || h == 1)){
+ if (tBlock == Blocks.air){
+ Logger.WARNING("Found Air");
+ }
+ else if (tBlock == Blocks.water){
+ Logger.WARNING("Found Water");
+ }
+ }
+ else {
+ Logger.WARNING("[x] Did not form - Found: "+tBlock.getLocalizedName() + " | "+tBlock.getDamageValue(aBaseMetaTileEntity.getWorld(), aBaseMetaTileEntity.getXCoord()+ i, aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord() + j));
+ Logger.WARNING("[x] Did not form - Found: "+(aBaseMetaTileEntity.getXCoord()+xDir + i) +" | "+ aBaseMetaTileEntity.getYCoord()+" | "+ (aBaseMetaTileEntity.getZCoord()+zDir + j));
+ return false;
+ }
+
+ }
+ ++tAmount;
+ }
+ }
+ }
+ }
+ }
+ if ((tAmount >= 8)){
+ Logger.WARNING("Made structure.");
+ }
+ else {
+ Logger.WARNING("Did not make structure.");
+ }
+ return (tAmount >= 8);
+ }
+
+ @Override
+ public int getMaxEfficiency(final ItemStack aStack) {
+ return 10000;
+ }
+
+ @Override
+ public int getPollutionPerTick(final ItemStack aStack) {
+ return 0;
+ }
+
+ @Override
+ public int getAmountOfOutputs() {
+ return 1;
+ }
+
+ @Override
+ public boolean explodesOnComponentBreak(final ItemStack aStack) {
+ return false;
+ }
+
+ public Block getCasingBlock() {
+ return ModBlocks.blockCasings3Misc;
+ }
+
+
+ public byte getCasingMeta() {
+ return 0;
+ }
+
+
+ public byte getCasingTextureIndex() {
+ return (byte) TAE.GTPP_INDEX(32);
+ }
+
+ private boolean addToMachineList(final IGregTechTileEntity tTileEntity) {
+ return ((this.addMaintenanceToMachineList(tTileEntity, this.getCasingTextureIndex()))
+ || (this.addInputToMachineList(tTileEntity, this.getCasingTextureIndex()))
+ || (this.addOutputToMachineList(tTileEntity, this.getCasingTextureIndex()))
+ || (this.addMufflerToMachineList(tTileEntity, this.getCasingTextureIndex()))
+ || (this.addEnergyInputToMachineList(tTileEntity, this.getCasingTextureIndex()))
+ || (this.addDynamoToMachineList(tTileEntity, this.getCasingTextureIndex())));
+ }
+
+ public boolean checkForWater() {
+
+ //Get Facing direction
+ IGregTechTileEntity aBaseMetaTileEntity = this.getBaseMetaTileEntity();
+ int mDirectionX = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
+ int mCurrentDirectionX;
+ int mCurrentDirectionZ;
+ int mOffsetX_Lower = 0;
+ int mOffsetX_Upper = 0;
+ int mOffsetZ_Lower = 0;
+ int mOffsetZ_Upper = 0;
+
+ if (mDirectionX == 0){
+ mCurrentDirectionX = 2;
+ mCurrentDirectionZ = 3;
+ mOffsetX_Lower = -2;
+ mOffsetX_Upper = 2;
+ mOffsetZ_Lower = -3;
+ mOffsetZ_Upper = 3;
+ }
+ else {
+ mCurrentDirectionX = 3;
+ mCurrentDirectionZ = 2;
+ mOffsetX_Lower = -3;
+ mOffsetX_Upper = 3;
+ mOffsetZ_Lower = -2;
+ mOffsetZ_Upper = 2;
+ }
+
+ //if (aBaseMetaTileEntity.fac)
+
+ final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * mCurrentDirectionX;
+ final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * mCurrentDirectionZ;
+
+ int tAmount = 0;
+ for (int i = mOffsetX_Lower + 1; i <= mOffsetX_Upper - 1; ++i) {
+ for (int j = mOffsetZ_Lower + 1; j <= mOffsetZ_Upper - 1; ++j) {
+ for (int h = 0; h < 2; ++h) {
+ Block tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j);
+ byte tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j);
+ if (tBlock == Blocks.air || tBlock == Blocks.flowing_water || tBlock == Blocks.water) {
+ if (this.getStoredFluids() != null) {
+ for (FluidStack stored : this.getStoredFluids()) {
+ if (stored.isFluidEqual(FluidUtils.getFluidStack("water", 1))) {
+ if (stored.amount >= 1000) {
+ //Utils.LOG_WARNING("Going to try swap an air block for water from inut bus.");
+ stored.amount -= 1000;
+ Block fluidUsed = null;
+ if (tBlock == Blocks.air || tBlock == Blocks.flowing_water) {
+ fluidUsed = Blocks.water;
+ }
+ if (tBlock == Blocks.water) {
+ fluidUsed = BlocksItems.getFluidBlock(InternalName.fluidDistilledWater);
+ }
+ aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getXCoord() + xDir + i, aBaseMetaTileEntity.getYCoord() + h, aBaseMetaTileEntity.getZCoord() + zDir + j, fluidUsed);
+
+
+ }
+ }
+ }
+ }
+ }
+ if (tBlock == Blocks.water) {
+ ++tAmount;
+ //Utils.LOG_WARNING("Found Water");
+ } else if (tBlock == BlocksItems.getFluidBlock(InternalName.fluidDistilledWater)) {
+ ++tAmount;
+ ++tAmount;
+ //Utils.LOG_WARNING("Found Distilled Water");
+ }
+ }
+ }
+ }
+ if ((tAmount >= 45)){
+ Logger.WARNING("Filled structure.");
+ }
+ else {
+ Logger.WARNING("Did not fill structure.");
+ }
+ return (tAmount >= 45);
+ }
+
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java
index 90faa9b83a..7f59621324 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java
@@ -6,6 +6,7 @@ import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks;
import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks2;
+import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks3;
public class Gregtech_Blocks {
@@ -19,6 +20,7 @@ public class Gregtech_Blocks {
//Casing Blocks
ModBlocks.blockCasingsMisc = new GregtechMetaCasingBlocks();
ModBlocks.blockCasings2Misc = new GregtechMetaCasingBlocks2();
+ ModBlocks.blockCasings3Misc = new GregtechMetaCasingBlocks3();
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialFishPond.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialFishPond.java
new file mode 100644
index 0000000000..0d3d00833f
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialFishPond.java
@@ -0,0 +1,24 @@
+package gtPlusPlus.xmod.gregtech.registration.gregtech;
+
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
+import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.GregtechMetaTileEntity_IndustrialWashPlant;
+
+public class GregtechIndustrialFishPond {
+
+ public static void run() {
+ if (gtPlusPlus.core.lib.LoadedMods.Gregtech) {
+ Logger.INFO("Gregtech5u Content | Registering Industrial Fishing Pond Multiblock.");
+ //if (CORE.ConfigSwitches.enableMultiblock_IndustrialWashPlant) {
+ run1();
+ //}
+ }
+
+ }
+
+ private static void run1() {
+ GregtechItemList.Industrial_FishingPond.set(new GregtechMetaTileEntity_IndustrialWashPlant(829,
+ "industrial.fishpond.controller.tier.single", "Zhuhai - Fishing Port").getStackForm(1L));
+
+ }
+} \ No newline at end of file