aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/common')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java31
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java54
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java42
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksAbstract.java211
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingItems.java8
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasings1.java8
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasingsAbstract.java23
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java12
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java20
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java44
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java84
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech58.java78
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech59.java718
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java114
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java86
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java97
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java354
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java18
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java33
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Prospecting_Ex.java182
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractGenerator.java225
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractTerminal.java220
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Solar.java237
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityDoubleFuelGeneratorBase.java210
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityGeothermalGenerator.java52
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityRocketFuelGenerator.java210
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java77
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySuperCondensor.java160
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityChunkLoader.java228
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java233
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityAnimalFarm.java157
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityTreeFarm.java404
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_AlloyBlastSmelter.java405
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCentrifuge.java118
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCokeOven.java406
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialElectrolyzer.java255
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialMacerator.java105
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialPlatePress.java218
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialSinter.java115
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialWireMill.java139
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IronBlastFurnace.java660
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MassFabricator.java131
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MultiTank.java328
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_PowerSubStationController.java82
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_Refinery.java193
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java200
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Base.java44
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java249
48 files changed, 4154 insertions, 4124 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java b/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java
index b5ffac8e07..e5c9cace94 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java
@@ -1,34 +1,33 @@
package gtPlusPlus.xmod.gregtech.common;
-import gregtech.api.GregTech_API;
-import gtPlusPlus.core.util.Utils;
-
import java.util.ArrayList;
import java.util.List;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraftforge.oredict.OreDictionary;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+import gregtech.api.GregTech_API;
+import gtPlusPlus.core.util.Utils;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraftforge.oredict.OreDictionary;
public class Meta_GT_Proxy {
-
- public static List<Runnable> GT_BlockIconload = new ArrayList<Runnable>();
- public static List<Runnable> GT_ItemIconload = new ArrayList<Runnable>();
-
+
+ public static List<Runnable> GT_BlockIconload = new ArrayList<>();
+ public static List<Runnable> GT_ItemIconload = new ArrayList<>();
+
@SideOnly(Side.CLIENT)
- public static IIconRegister sBlockIcons, sItemIcons;
+ public static IIconRegister sBlockIcons, sItemIcons;
- public Meta_GT_Proxy() {
+ public Meta_GT_Proxy() {
Utils.LOG_INFO("GT_PROXY - initialized.");
- for (String tOreName : OreDictionary.getOreNames()) {
-
+ for (final String tOreName : OreDictionary.getOreNames()) {
+
}
- }
+ }
public static boolean areWeUsingGregtech5uExperimental(){
- int version = GregTech_API.VERSION;
- if (version == 508 || version == 507){
+ final int version = GregTech_API.VERSION;
+ if ((version == 508) || (version == 507)){
return false;
}
else if (version == 509){
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java
index c7d6dcbbba..b0b0313316 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java
@@ -1,5 +1,7 @@
package gtPlusPlus.xmod.gregtech.common.blocks;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.Textures;
import gregtech.api.objects.GT_CopiedBlockTexture;
import gregtech.api.util.GT_LanguageManager;
@@ -9,37 +11,35 @@ import gtPlusPlus.xmod.gregtech.common.blocks.textures.CasingTextureHandler;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
public class GregtechMetaCasingBlocks
extends GregtechMetaCasingBlocksAbstract {
public final static int GTID = 57;
-
- CasingTextureHandler TextureHandler = new CasingTextureHandler();
+
+ CasingTextureHandler TextureHandler = new CasingTextureHandler();
public GregtechMetaCasingBlocks() {
super(GregtechMetaCasingItems.class, "miscutils.blockcasings", GT_Material_Casings.INSTANCE);
for (byte i = 0; i < 16; i = (byte) (i + 1)) {
Textures.BlockIcons.CASING_BLOCKS[GTID + i] = new GT_CopiedBlockTexture(this, 6, i);
}
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Centrifuge Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Structural Coke Oven Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Heat Resistant Coke Oven Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "Heat Proof Coke Oven Casing"); //60
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Material Press Machine Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "Electrolyzer Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Wire Factory Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "Maceration Stack Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "Matter Generation Coil"); //65
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "Matter Fabricator Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Iron Plated Bricks");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Multitank Exterior Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Hastelloy-N Reactor Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "Zeron-100 Reactor Shielding");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Blast Smelter Heat Containment Coil ");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "Blast Smelter Casing Block");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Centrifuge Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Structural Coke Oven Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Heat Resistant Coke Oven Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Heat Proof Coke Oven Casing"); //60
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Material Press Machine Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Electrolyzer Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Wire Factory Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Maceration Stack Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Matter Generation Coil"); //65
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Matter Fabricator Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Iron Plated Bricks");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Multitank Exterior Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", "Hastelloy-N Reactor Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "Zeron-100 Reactor Shielding");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", "Blast Smelter Heat Containment Coil ");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Blast Smelter Casing Block");
GregtechItemList.Casing_Centrifuge1.set(new ItemStack(this, 1, 0));
GregtechItemList.Casing_CokeOven.set(new ItemStack(this, 1, 1));
GregtechItemList.Casing_CokeOven_Coil1.set(new ItemStack(this, 1, 2));
@@ -55,21 +55,21 @@ extends GregtechMetaCasingBlocksAbstract {
GregtechItemList.Casing_Reactor_I.set(new ItemStack(this, 1, 12));
GregtechItemList.Casing_Reactor_II.set(new ItemStack(this, 1, 13));
GregtechItemList.Casing_Coil_BlastSmelter.set(new ItemStack(this, 1, 14));
- GregtechItemList.Casing_BlastSmelter.set(new ItemStack(this, 1, 15));
+ GregtechItemList.Casing_BlastSmelter.set(new ItemStack(this, 1, 15));
}
@Override
- public IIcon getIcon(int aSide, int aMeta) { //Texture ID's. case 0 == ID[57]
- return TextureHandler.getIcon(aSide, aMeta);
+ public IIcon getIcon(final int aSide, final int aMeta) { //Texture ID's. case 0 == ID[57]
+ return CasingTextureHandler.getIcon(aSide, aMeta);
}
-
+
@Override
@SideOnly(Side.CLIENT)
- public IIcon getIcon(IBlockAccess aWorld, int xCoord, int yCoord, int zCoord, int aSide) {
- GregtechMetaCasingBlocks i = this;
- return TextureHandler.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, i);
+ public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide) {
+ final GregtechMetaCasingBlocks i = this;
+ return CasingTextureHandler.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, i);
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java
index 2a0717af5d..c0134e576f 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java
@@ -13,30 +13,30 @@ public class GregtechMetaCasingBlocks2
extends GregtechMetaCasingBlocksAbstract {
public final static int GTID = 73;
-
- CasingTextureHandler2 TextureHandler = new CasingTextureHandler2();
+
+ CasingTextureHandler2 TextureHandler = new CasingTextureHandler2();
public GregtechMetaCasingBlocks2() {
super(GregtechMetaCasingItems.class, "gtplusplus.blockcasings.2", GT_Material_Casings.INSTANCE);
for (byte i = 0; i < 16; i = (byte) (i + 1)) {
Textures.BlockIcons.CASING_BLOCKS[GTID + i] = new GT_CopiedBlockTexture(this, 6, i);
}
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Structural Glass Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Hastelloy-N Sealant Block");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Hastelloy-X Structural Block");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "Incoloy-DS Fluid Containment Block"); //76
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Placeholder Casing"); //IS A PLACEHOLDER DO NOT CHANGE
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "Placeholder Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Incoloy Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "Placeholder Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "Incoloy Casing"); //65
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "Placeholder Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Placeholder Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Placeholder Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Placeholder Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "Placeholder Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Placeholder Casing ");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "Placeholder Casing ");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Structural Glass 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"); //76
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Placeholder Casing"); //IS A PLACEHOLDER DO NOT CHANGE
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Placeholder Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Incoloy Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Placeholder Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Incoloy Casing"); //65
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Placeholder Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Placeholder Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Placeholder Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", "Placeholder Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "Placeholder Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", "Placeholder Casing ");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Placeholder Casing ");
GregtechItemList.Casing_StructuralGlass.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));
@@ -52,11 +52,11 @@ extends GregtechMetaCasingBlocksAbstract {
GregtechItemList.Casing_PlaceHolder12.set(new ItemStack(this, 1, 12));
GregtechItemList.Casing_PlaceHolder13.set(new ItemStack(this, 1, 13));
GregtechItemList.Casing_PlaceHolder14.set(new ItemStack(this, 1, 14));
- GregtechItemList.Casing_PlaceHolder15.set(new ItemStack(this, 1, 15));
+ GregtechItemList.Casing_PlaceHolder15.set(new ItemStack(this, 1, 15));
}
@Override
- public IIcon getIcon(int aSide, int aMeta) { //Texture ID's. case 0 == ID[57]
- return TextureHandler.getIcon(aSide, aMeta);
+ public IIcon getIcon(final int aSide, final int aMeta) { //Texture ID's. case 0 == ID[57]
+ return CasingTextureHandler2.getIcon(aSide, aMeta);
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksAbstract.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksAbstract.java
index 5909c0386a..f13dde9325 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksAbstract.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocksAbstract.java
@@ -1,13 +1,14 @@
package gtPlusPlus.xmod.gregtech.common.blocks;
+import java.util.List;
+import java.util.Random;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.GregTech_API;
import gregtech.api.util.GT_LanguageManager;
import gregtech.common.blocks.GT_Block_Casings_Abstract;
import gtPlusPlus.core.creative.AddToCreativeTab;
-
-import java.util.List;
-import java.util.Random;
-
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -19,123 +20,121 @@ import net.minecraft.item.*;
import net.minecraft.util.StatCollector;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
public abstract class GregtechMetaCasingBlocksAbstract
- extends GT_Block_Casings_Abstract {
- public GregtechMetaCasingBlocksAbstract(Class<? extends ItemBlock> aItemClass, String aName, Material aMaterial) {
- super(aItemClass, aName, aMaterial);
- setStepSound(soundTypeMetal);
- setCreativeTab(AddToCreativeTab.tabMachines);
- GregTech_API.registerMachineBlock(this, -1);
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + 32767 + ".name", "Any Sub Block of this");
- }
-
- @Override
- public String getHarvestTool(int aMeta) {
- return "wrench";
- }
-
- @Override
- public int getHarvestLevel(int aMeta) {
- return 2;
- }
-
- @Override
- public float getBlockHardness(World aWorld, int aX, int aY, int aZ) {
- return Blocks.iron_block.getBlockHardness(aWorld, aX, aY, aZ);
- }
-
- @Override
- public float getExplosionResistance(Entity aTNT) {
- return Blocks.iron_block.getExplosionResistance(aTNT);
- }
-
- @Override
+extends GT_Block_Casings_Abstract {
+ public GregtechMetaCasingBlocksAbstract(final Class<? extends ItemBlock> aItemClass, final String aName, final Material aMaterial) {
+ super(aItemClass, aName, aMaterial);
+ this.setStepSound(soundTypeMetal);
+ this.setCreativeTab(AddToCreativeTab.tabMachines);
+ GregTech_API.registerMachineBlock(this, -1);
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + "." + 32767 + ".name", "Any Sub Block of this");
+ }
+
+ @Override
+ public String getHarvestTool(final int aMeta) {
+ return "wrench";
+ }
+
+ @Override
+ public int getHarvestLevel(final int aMeta) {
+ return 2;
+ }
+
+ @Override
+ public float getBlockHardness(final World aWorld, final int aX, final int aY, final int aZ) {
+ return Blocks.iron_block.getBlockHardness(aWorld, aX, aY, aZ);
+ }
+
+ @Override
+ public float getExplosionResistance(final Entity aTNT) {
+ return Blocks.iron_block.getExplosionResistance(aTNT);
+ }
+
+ @Override
protected boolean canSilkHarvest() {
- return false;
- }
+ return false;
+ }
- @Override
- public void onBlockAdded(World aWorld, int aX, int aY, int aZ) {
- if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) {
- GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ);
- }
- }
+ @Override
+ public void onBlockAdded(final World aWorld, final int aX, final int aY, final int aZ) {
+ if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) {
+ GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ);
+ }
+ }
- @Override
+ @Override
public String getUnlocalizedName() {
- return this.mUnlocalizedName;
- }
+ return this.mUnlocalizedName;
+ }
- @Override
+ @Override
public String getLocalizedName() {
- return StatCollector.translateToLocal(this.mUnlocalizedName + ".name");
- }
+ return StatCollector.translateToLocal(this.mUnlocalizedName + ".name");
+ }
- @Override
- public boolean canBeReplacedByLeaves(IBlockAccess aWorld, int aX, int aY, int aZ) {
- return false;
- }
+ @Override
+ public boolean canBeReplacedByLeaves(final IBlockAccess aWorld, final int aX, final int aY, final int aZ) {
+ return false;
+ }
- @Override
- public boolean isNormalCube(IBlockAccess aWorld, int aX, int aY, int aZ) {
- return true;
- }
+ @Override
+ public boolean isNormalCube(final IBlockAccess aWorld, final int aX, final int aY, final int aZ) {
+ return true;
+ }
- @Override
+ @Override
public boolean renderAsNormalBlock() {
- return true;
- }
+ return true;
+ }
- @Override
+ @Override
public boolean isOpaqueCube() {
- return true;
- }
-
- @Override
- public void breakBlock(World aWorld, int aX, int aY, int aZ, Block aBlock, int aMetaData) {
- if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) {
- GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ);
- }
- }
-
- @Override
- public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess world, int x, int y, int z) {
- return false;
- }
-
- @Override
- public int damageDropped(int par1) {
- return par1;
- }
-
- @Override
- public int getDamageValue(World par1World, int par2, int par3, int par4) {
- return par1World.getBlockMetadata(par2, par3, par4);
- }
-
- @Override
- public int quantityDropped(Random par1Random) {
- return 1;
- }
-
- @Override
- public Item getItemDropped(int par1, Random par2Random, int par3) {
- return Item.getItemFromBlock(this);
- }
-
- @Override
+ return true;
+ }
+
+ @Override
+ public void breakBlock(final World aWorld, final int aX, final int aY, final int aZ, final Block aBlock, final int aMetaData) {
+ if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) {
+ GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ);
+ }
+ }
+
+ @Override
+ public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) {
+ return false;
+ }
+
+ @Override
+ public int damageDropped(final int par1) {
+ return par1;
+ }
+
+ @Override
+ public int getDamageValue(final World par1World, final int par2, final int par3, final int par4) {
+ return par1World.getBlockMetadata(par2, par3, par4);
+ }
+
+ @Override
+ public int quantityDropped(final Random par1Random) {
+ return 1;
+ }
+
+ @Override
+ public Item getItemDropped(final int par1, final Random par2Random, final int par3) {
+ return Item.getItemFromBlock(this);
+ }
+
+ @Override
@SideOnly(Side.CLIENT)
- public void registerBlockIcons(IIconRegister aIconRegister) {
- }
+ public void registerBlockIcons(final IIconRegister aIconRegister) {
+ }
- @Override
+ @Override
@SideOnly(Side.CLIENT)
- public void getSubBlocks(Item aItem, CreativeTabs par2CreativeTabs, List aList) {
- for (int i = 0; i < 16; i++) {
- aList.add(new ItemStack(aItem, 1, i));
- }
- }
+ public void getSubBlocks(final Item aItem, final CreativeTabs par2CreativeTabs, final List aList) {
+ for (int i = 0; i < 16; i++) {
+ aList.add(new ItemStack(aItem, 1, i));
+ }
+ }
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingItems.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingItems.java
index 957a12bc14..de51cb164b 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingItems.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingItems.java
@@ -3,8 +3,8 @@ package gtPlusPlus.xmod.gregtech.common.blocks;
import net.minecraft.block.Block;
public class GregtechMetaCasingItems
- extends GregtechMetaItemCasingsAbstract {
- public GregtechMetaCasingItems(Block par1) {
- super(par1);
- }
+extends GregtechMetaItemCasingsAbstract {
+ public GregtechMetaCasingItems(final Block par1) {
+ super(par1);
+ }
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasings1.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasings1.java
index 02ef1b9ca6..7fb344a4ec 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasings1.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasings1.java
@@ -8,14 +8,14 @@ import net.minecraft.item.ItemStack;
public class GregtechMetaItemCasings1
extends GregtechMetaItemCasingsAbstract {
- public GregtechMetaItemCasings1(Block par1) {
+ public GregtechMetaItemCasings1(final Block par1) {
super(par1);
}
@Override
- public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) {
+ public void addInformation(final ItemStack aStack, final EntityPlayer aPlayer, final List aList, final boolean aF3_H) {
super.addInformation(aStack, aPlayer, aList, aF3_H);
- switch (getDamage(aStack)) {
+ switch (this.getDamage(aStack)) {
case 0:
aList.add(this.mCasing_Centrifuge);
break;
@@ -30,7 +30,7 @@ extends GregtechMetaItemCasingsAbstract {
break;
default:
aList.add(this.mCasing_CokeCoil2);
- break;
+ break;
}
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasingsAbstract.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasingsAbstract.java
index 6387d52c21..78906a6c36 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasingsAbstract.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaItemCasingsAbstract.java
@@ -1,9 +1,8 @@
package gtPlusPlus.xmod.gregtech.common.blocks;
-import gregtech.api.util.GT_LanguageManager;
-
import java.util.List;
+import gregtech.api.util.GT_LanguageManager;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
@@ -19,27 +18,27 @@ extends ItemBlock {
protected final String mNoMobsToolTip = GT_LanguageManager.addStringLocalization("gt.nomobspawnsonthisblock", "Mobs cannot Spawn on this Block");
protected final String mNoTileEntityToolTip = GT_LanguageManager.addStringLocalization("gt.notileentityinthisblock", "This is NOT a TileEntity!");
- public GregtechMetaItemCasingsAbstract(Block par1) {
+ public GregtechMetaItemCasingsAbstract(final Block par1) {
super(par1);
- setMaxDamage(0);
- setHasSubtypes(true);
+ this.setMaxDamage(0);
+ this.setHasSubtypes(true);
//setCreativeTab(AddToCreativeTab.tabMachines);
}
@Override
- public int getMetadata(int aMeta) {
+ public int getMetadata(final int aMeta) {
return aMeta;
}
@Override
- public String getUnlocalizedName(ItemStack aStack) {
- return this.field_150939_a.getUnlocalizedName() + "." + getDamage(aStack);
+ public String getUnlocalizedName(final ItemStack aStack) {
+ return this.field_150939_a.getUnlocalizedName() + "." + this.getDamage(aStack);
}
@Override
- public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) {
- super.addInformation(aStack, aPlayer, aList, aF3_H);
- switch (getDamage(aStack)) {
+ public void addInformation(final ItemStack aStack, final EntityPlayer aPlayer, final List aList, final boolean aF3_H) {
+ super.addInformation(aStack, aPlayer, aList, aF3_H);
+ switch (this.getDamage(aStack)) {
case 0:
//aList.add(this.mCasing_Centrifuge);
break;
@@ -53,7 +52,7 @@ extends ItemBlock {
//aList.add(this.mCasing_CokeCoil2);
break;
default:
- break;
+ break;
}
aList.add(this.mNoMobsToolTip);
aList.add(this.mNoTileEntityToolTip);
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java
index d50ce9a4c5..23db3bb755 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/fluid/GregtechFluidHandler.java
@@ -36,14 +36,14 @@ public class GregtechFluidHandler {
if (!LoadedMods.ThermalFoundation){
- Utils.LOG_INFO("Adding in our own GT versions of Thermal Foundation Fluids");
+ Utils.LOG_INFO("Adding in our own GT versions of Thermal Foundation Fluids");
FluidUtils.addFluid("cryotheum", "Gelid Cryotheum", GT_Materials.Cryotheum, 4, -1200, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.Cryotheum, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
FluidUtils.addFluid("pyrotheum", "Blazing Pyrotheum", GT_Materials.Pyrotheum, 4, 4000, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.Pyrotheum, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
}
if (LoadedMods.IndustrialCraft2){
- Utils.LOG_INFO("Adding in GT Fluids for various nuclear related content.");
-
+ Utils.LOG_INFO("Adding in GT Fluids for various nuclear related content.");
+
FluidUtils.addFluid("hydrofluoricAcid", "Hydrofluoric Acid", GT_Materials.HydrofluoricAcid, 1, 120, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.HydrofluoricAcid, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
generateIC2FluidCell("HydrofluoricAcid");
@@ -67,7 +67,7 @@ public class GregtechFluidHandler {
//Check for IHL Hydrogen Chloride
- if (!LoadedMods.IHL || ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogenChloride", 1) == null){
+ if (!LoadedMods.IHL || (ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogenChloride", 1) == null)){
if (FluidUtils.getFluidStack("hydrogenchloride", 1) == null){
if (LoadedMods.IHL){
Utils.LOG_INFO("IHL Loaded but hydrogen chloride could not be found for some reason. How about we add our own.");
@@ -79,7 +79,7 @@ public class GregtechFluidHandler {
generateIC2FluidCell("HydrogenChloride");
}
}
-
+
FluidUtils.addFluid("sulfuricLithium", "Sulfuric Lithium Mix", GT_Materials.SulfuricLithium, 4, 280, GT_OreDictUnificator.get(OrePrefixes.cell, GT_Materials.SulfuricLithium, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
generateIC2FluidCell("SulfuricLithium");
@@ -100,7 +100,7 @@ public class GregtechFluidHandler {
}
}
- private static void generateIC2FluidCell(String fluidNameWithCaps){
+ private static void generateIC2FluidCell(final String fluidNameWithCaps){
Utils.LOG_INFO("Adding a Cell for "+fluidNameWithCaps);
if (LoadedMods.IndustrialCraft2){
Utils.createInternalNameAndFluidCell(fluidNameWithCaps);
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java
index 5b4571b057..5c29b020bf 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler.java
@@ -11,17 +11,17 @@ public class CasingTextureHandler {
//private static final TexturesGregtech58 gregtech58 = new TexturesGregtech58();
private static final TexturesCentrifugeMultiblock gregtechX = new TexturesCentrifugeMultiblock();
- public static IIcon getIcon(int aSide, int aMeta) { //Texture ID's. case 0 == ID[57]
+ 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:
+ //Centrifuge
+ case 0:
return TexturesGtBlock.Casing_Material_MaragingSteel.getIcon();
//Coke Oven Frame
case 1:
return TexturesGtBlock.Casing_Material_Tantalloy61.getIcon();
//Coke Oven Casing Tier 1
- case 2:
+ case 2:
return Textures.BlockIcons.MACHINE_CASING_FIREBOX_BRONZE.getIcon();
//Coke Oven Casing Tier 2
case 3:
@@ -46,20 +46,20 @@ public class CasingTextureHandler {
return TexturesGtBlock.Casing_Machine_Dimensional_Adv.getIcon();
//Iron Blast Fuance Textures
case 10:
- return TexturesGtBlock.Casing_Machine_Simple_Top.getIcon();
+ return TexturesGtBlock.Casing_Machine_Simple_Top.getIcon();
//Multitank Exterior Casing
case 11:
- return TexturesGtBlock.Casing_Material_Grisium.getIcon();
+ return TexturesGtBlock.Casing_Material_Grisium.getIcon();
//Reactor Casing I
case 12:
- return TexturesGtBlock.Casing_Material_Stellite.getIcon();
+ return TexturesGtBlock.Casing_Material_Stellite.getIcon();
//Reactor Casing II
case 13:
- return TexturesGtBlock.Casing_Material_Zeron100.getIcon();
+ return TexturesGtBlock.Casing_Material_Zeron100.getIcon();
case 14:
return TexturesGtBlock.Casing_Staballoy_Firebox.getIcon();
case 15:
- return TexturesGtBlock.Casing_Material_ZirconiumCarbide.getIcon();
+ return TexturesGtBlock.Casing_Material_ZirconiumCarbide.getIcon();
default:
return Textures.BlockIcons.MACHINE_CASING_RADIOACTIVEHAZARD.getIcon();
@@ -70,7 +70,7 @@ public class CasingTextureHandler {
}
- public static IIcon handleCasingsGT(IBlockAccess aWorld, int xCoord, int yCoord, int zCoord, int aSide, GregtechMetaCasingBlocks thisBlock) {
+ public static IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide, final GregtechMetaCasingBlocks thisBlock) {
/*if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){
return gregtech59.handleCasingsGT59(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock);
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java
index 7bf0ea4644..839786790a 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java
@@ -4,61 +4,61 @@ import net.minecraft.util.IIcon;
public class CasingTextureHandler2 {
- public static IIcon getIcon(int aSide, int aMeta) { //Texture ID's. case 0 == ID[57]
+ 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:
+ //Centrifuge
+ case 0:
return TexturesGtBlock.Casing_Machine_Dimensional_Adv.getIcon();
//Coke Oven Frame
case 1:
return TexturesGtBlock.Casing_Material_HastelloyX.getIcon();
//Coke Oven Casing Tier 1
- case 2:
+ case 2:
return TexturesGtBlock.Casing_Material_HastelloyN.getIcon();
//Coke Oven Casing Tier 2
- case 3:
+ case 3:
return TexturesGtBlock.Casing_Material_Fluid_IncoloyDS.getIcon();
//Material Press Casings
- case 4:
+ case 4:
return TexturesGtBlock.Casing_Machine_Farm_Manager.getIcon();
//Electrolyzer Casings
- case 5:
+ case 5:
return TexturesGtBlock._PlaceHolder.getIcon();
//Broken Blue Fusion Casings
- case 6:
+ case 6:
return TexturesGtBlock._PlaceHolder.getIcon();
//Maceration Stack Casings
- case 7:
+ case 7:
return TexturesGtBlock._PlaceHolder.getIcon();
//Broken Pink Fusion Casings
- case 8:
+ case 8:
return TexturesGtBlock._PlaceHolder.getIcon();
//Matter Fabricator Casings
- case 9:
+ case 9:
return TexturesGtBlock._PlaceHolder.getIcon();
//Iron Blast Fuance Textures
- case 10:
- return TexturesGtBlock._PlaceHolder.getIcon();
+ case 10:
+ return TexturesGtBlock._PlaceHolder.getIcon();
//Multitank Exterior Casing
- case 11:
- return TexturesGtBlock._PlaceHolder.getIcon();
+ case 11:
+ return TexturesGtBlock._PlaceHolder.getIcon();
//Reactor Casing I
- case 12:
+ case 12:
return TexturesGtBlock._PlaceHolder.getIcon();
//Reactor Casing II
- case 13:
+ case 13:
+ return TexturesGtBlock._PlaceHolder.getIcon();
+ case 14:
return TexturesGtBlock._PlaceHolder.getIcon();
- case 14:
+ case 15:
return TexturesGtBlock._PlaceHolder.getIcon();
- case 15:
- return TexturesGtBlock._PlaceHolder.getIcon();
- default:
+ default:
return TexturesGtBlock.Overlay_UU_Matter.getIcon();
}
- }
+ }
return TexturesGtBlock._PlaceHolder.getIcon();
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java
index c23824913e..ab55f89c9e 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesCentrifugeMultiblock.java
@@ -11,7 +11,7 @@ import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
public class TexturesCentrifugeMultiblock {
-
+
private static CustomIcon GT8_1_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE1");
private static CustomIcon GT8_1 = new CustomIcon("iconsets/LARGECENTRIFUGE1");
private static CustomIcon GT8_2_Active = new CustomIcon("iconsets/LARGECENTRIFUGE_ACTIVE2");
@@ -72,126 +72,126 @@ public class TexturesCentrifugeMultiblock {
frontFaceActive_6,
frontFaceActive_7,
frontFaceActive_8
- };
-
- public IIcon handleCasingsGT(IBlockAccess aWorld, int xCoord, int yCoord, int zCoord, int aSide, GregtechMetaCasingBlocks thisBlock) {
- return handleCasingsGT58(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock);
+ };
+
+ public IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide, final GregtechMetaCasingBlocks thisBlock) {
+ return this.handleCasingsGT58(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock);
}
- public IIcon handleCasingsGT58(IBlockAccess aWorld, int xCoord, int yCoord, int zCoord, int aSide, GregtechMetaCasingBlocks thisBlock) {
- int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord);
+ public IIcon handleCasingsGT58(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide, final GregtechMetaCasingBlocks thisBlock) {
+ final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord);
if (((tMeta != 6) && (tMeta != 8) && (tMeta != 0))) {
return CasingTextureHandler.getIcon(aSide, tMeta);
}
- int tStartIndex = tMeta == 6 ? 1 : 13;
+ final int tStartIndex = tMeta == 6 ? 1 : 13;
if (tMeta == 0) {
if ((aSide == 2) || (aSide == 3)) {
TileEntity tTileEntity;
IMetaTileEntity tMetaTileEntity;
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return CENTRIFUGE_ACTIVE[0].getIcon();
+ return this.CENTRIFUGE_ACTIVE[0].getIcon();
}
- return CENTRIFUGE[0].getIcon();
+ return this.CENTRIFUGE[0].getIcon();
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return CENTRIFUGE_ACTIVE[3].getIcon();
+ return this.CENTRIFUGE_ACTIVE[3].getIcon();
}
- return CENTRIFUGE[3].getIcon();
+ return this.CENTRIFUGE[3].getIcon();
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return CENTRIFUGE_ACTIVE[6].getIcon();
+ return this.CENTRIFUGE_ACTIVE[6].getIcon();
}
- return CENTRIFUGE[6].getIcon();
+ return this.CENTRIFUGE[6].getIcon();
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return CENTRIFUGE_ACTIVE[1].getIcon();
+ return this.CENTRIFUGE_ACTIVE[1].getIcon();
}
- return CENTRIFUGE[1].getIcon();
+ return this.CENTRIFUGE[1].getIcon();
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return CENTRIFUGE_ACTIVE[7].getIcon();
+ return this.CENTRIFUGE_ACTIVE[7].getIcon();
}
- return CENTRIFUGE[7].getIcon();
+ return this.CENTRIFUGE[7].getIcon();
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return CENTRIFUGE_ACTIVE[8].getIcon();
+ return this.CENTRIFUGE_ACTIVE[8].getIcon();
}
- return CENTRIFUGE[8].getIcon();
+ return this.CENTRIFUGE[8].getIcon();
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return CENTRIFUGE_ACTIVE[5].getIcon();
+ return this.CENTRIFUGE_ACTIVE[5].getIcon();
}
- return CENTRIFUGE[5].getIcon();
+ return this.CENTRIFUGE[5].getIcon();
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return CENTRIFUGE_ACTIVE[2].getIcon();
+ return this.CENTRIFUGE_ACTIVE[2].getIcon();
}
- return CENTRIFUGE[2].getIcon();
+ return this.CENTRIFUGE[2].getIcon();
}
} else if ((aSide == 4) || (aSide == 5)) {
TileEntity tTileEntity;
Object tMetaTileEntity;
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return CENTRIFUGE_ACTIVE[0].getIcon();
+ return this.CENTRIFUGE_ACTIVE[0].getIcon();
}
- return CENTRIFUGE[0].getIcon();
+ return this.CENTRIFUGE[0].getIcon();
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return CENTRIFUGE_ACTIVE[3].getIcon();
+ return this.CENTRIFUGE_ACTIVE[3].getIcon();
}
- return CENTRIFUGE[3].getIcon();
+ return this.CENTRIFUGE[3].getIcon();
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return CENTRIFUGE_ACTIVE[6].getIcon();
+ return this.CENTRIFUGE_ACTIVE[6].getIcon();
}
- return CENTRIFUGE[6].getIcon();
+ return this.CENTRIFUGE[6].getIcon();
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return CENTRIFUGE_ACTIVE[1].getIcon();
+ return this.CENTRIFUGE_ACTIVE[1].getIcon();
}
- return CENTRIFUGE[1].getIcon();
+ return this.CENTRIFUGE[1].getIcon();
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return CENTRIFUGE_ACTIVE[7].getIcon();
+ return this.CENTRIFUGE_ACTIVE[7].getIcon();
}
- return CENTRIFUGE[7].getIcon();
+ return this.CENTRIFUGE[7].getIcon();
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return CENTRIFUGE_ACTIVE[8].getIcon();
+ return this.CENTRIFUGE_ACTIVE[8].getIcon();
}
- return CENTRIFUGE[8].getIcon();
+ return this.CENTRIFUGE[8].getIcon();
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return CENTRIFUGE_ACTIVE[5].getIcon();
+ return this.CENTRIFUGE_ACTIVE[5].getIcon();
}
- return CENTRIFUGE[5].getIcon();
+ return this.CENTRIFUGE[5].getIcon();
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return CENTRIFUGE_ACTIVE[2].getIcon();
+ return this.CENTRIFUGE_ACTIVE[2].getIcon();
}
- return CENTRIFUGE[2].getIcon();
+ return this.CENTRIFUGE[2].getIcon();
}
}
return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon();
}
- boolean[] tConnectedSides = {(aWorld.getBlock(xCoord, yCoord - 1, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord - 1, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord + 1, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord + 1, zCoord) == tMeta), (aWorld.getBlock(xCoord + 1, yCoord, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord + 1, yCoord, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord, zCoord + 1) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord + 1) == tMeta), (aWorld.getBlock(xCoord - 1, yCoord, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord - 1, yCoord, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord, zCoord - 1) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord - 1) == tMeta)};
+ final boolean[] tConnectedSides = {(aWorld.getBlock(xCoord, yCoord - 1, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord - 1, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord + 1, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord + 1, zCoord) == tMeta), (aWorld.getBlock(xCoord + 1, yCoord, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord + 1, yCoord, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord, zCoord + 1) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord + 1) == tMeta), (aWorld.getBlock(xCoord - 1, yCoord, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord - 1, yCoord, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord, zCoord - 1) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord - 1) == tMeta)};
switch (aSide) {
case 0:
if (tConnectedSides[0]) {
@@ -437,5 +437,5 @@ public class TexturesCentrifugeMultiblock {
}
return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
}
-
+
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech58.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech58.java
index 2fdfc0587c..03684d4775 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech58.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech58.java
@@ -71,127 +71,127 @@ public class TexturesGregtech58 {
frontFaceActive_6,
frontFaceActive_7,
frontFaceActive_8
- };
+ };
- public IIcon handleCasingsGT(IBlockAccess aWorld, int xCoord, int yCoord, int zCoord, int aSide, GregtechMetaCasingBlocks thisBlock) {
- return handleCasingsGT58(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock);
+ public IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide, final GregtechMetaCasingBlocks thisBlock) {
+ return this.handleCasingsGT58(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock);
}
- public IIcon handleCasingsGT58(IBlockAccess aWorld, int xCoord, int yCoord, int zCoord, int aSide, GregtechMetaCasingBlocks thisBlock) {
- int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord);
+ public IIcon handleCasingsGT58(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide, final GregtechMetaCasingBlocks thisBlock) {
+ final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord);
if (((tMeta != 6) && (tMeta != 8) && (tMeta != 0))) {
return CasingTextureHandler.getIcon(aSide, tMeta);
}
- int tStartIndex = tMeta == 6 ? 1 : 13;
+ final int tStartIndex = tMeta == 6 ? 1 : 13;
if (tMeta == 0) {
if ((aSide == 2) || (aSide == 3)) {
TileEntity tTileEntity;
IMetaTileEntity tMetaTileEntity;
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[0].getIcon();
+ return this.TURBINE_ACTIVE[0].getIcon();
}
- return TURBINE[0].getIcon();
+ return this.TURBINE[0].getIcon();
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[3].getIcon();
+ return this.TURBINE_ACTIVE[3].getIcon();
}
- return TURBINE[3].getIcon();
+ return this.TURBINE[3].getIcon();
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[6].getIcon();
+ return this.TURBINE_ACTIVE[6].getIcon();
}
- return TURBINE[6].getIcon();
+ return this.TURBINE[6].getIcon();
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[1].getIcon();
+ return this.TURBINE_ACTIVE[1].getIcon();
}
- return TURBINE[1].getIcon();
+ return this.TURBINE[1].getIcon();
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[7].getIcon();
+ return this.TURBINE_ACTIVE[7].getIcon();
}
- return TURBINE[7].getIcon();
+ return this.TURBINE[7].getIcon();
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[8].getIcon();
+ return this.TURBINE_ACTIVE[8].getIcon();
}
- return TURBINE[8].getIcon();
+ return this.TURBINE[8].getIcon();
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[5].getIcon();
+ return this.TURBINE_ACTIVE[5].getIcon();
}
- return TURBINE[5].getIcon();
+ return this.TURBINE[5].getIcon();
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[2].getIcon();
+ return this.TURBINE_ACTIVE[2].getIcon();
}
- return TURBINE[2].getIcon();
+ return this.TURBINE[2].getIcon();
}
} else if ((aSide == 4) || (aSide == 5)) {
TileEntity tTileEntity;
Object tMetaTileEntity;
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[0].getIcon();
+ return this.TURBINE_ACTIVE[0].getIcon();
}
- return TURBINE[0].getIcon();
+ return this.TURBINE[0].getIcon();
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[3].getIcon();
+ return this.TURBINE_ACTIVE[3].getIcon();
}
- return TURBINE[3].getIcon();
+ return this.TURBINE[3].getIcon();
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[6].getIcon();
+ return this.TURBINE_ACTIVE[6].getIcon();
}
- return TURBINE[6].getIcon();
+ return this.TURBINE[6].getIcon();
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[1].getIcon();
+ return this.TURBINE_ACTIVE[1].getIcon();
}
- return TURBINE[1].getIcon();
+ return this.TURBINE[1].getIcon();
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[7].getIcon();
+ return this.TURBINE_ACTIVE[7].getIcon();
}
- return TURBINE[7].getIcon();
+ return this.TURBINE[7].getIcon();
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[8].getIcon();
+ return this.TURBINE_ACTIVE[8].getIcon();
}
- return TURBINE[8].getIcon();
+ return this.TURBINE[8].getIcon();
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[5].getIcon();
+ return this.TURBINE_ACTIVE[5].getIcon();
}
- return TURBINE[5].getIcon();
+ return this.TURBINE[5].getIcon();
}
if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[2].getIcon();
+ return this.TURBINE_ACTIVE[2].getIcon();
}
- return TURBINE[2].getIcon();
+ return this.TURBINE[2].getIcon();
}
}
return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon();
}
- boolean[] tConnectedSides = {(aWorld.getBlock(xCoord, yCoord - 1, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord - 1, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord + 1, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord + 1, zCoord) == tMeta), (aWorld.getBlock(xCoord + 1, yCoord, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord + 1, yCoord, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord, zCoord + 1) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord + 1) == tMeta), (aWorld.getBlock(xCoord - 1, yCoord, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord - 1, yCoord, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord, zCoord - 1) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord - 1) == tMeta)};
+ final boolean[] tConnectedSides = {(aWorld.getBlock(xCoord, yCoord - 1, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord - 1, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord + 1, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord + 1, zCoord) == tMeta), (aWorld.getBlock(xCoord + 1, yCoord, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord + 1, yCoord, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord, zCoord + 1) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord + 1) == tMeta), (aWorld.getBlock(xCoord - 1, yCoord, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord - 1, yCoord, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord, zCoord - 1) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord - 1) == tMeta)};
switch (aSide) {
case 0:
if (tConnectedSides[0]) {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech59.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech59.java
index 84de389827..60ecef1ecd 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech59.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGregtech59.java
@@ -10,7 +10,7 @@ import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
public class TexturesGregtech59 {
-
+
private static Textures.BlockIcons.CustomIcon GT8_1_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE1");
private static Textures.BlockIcons.CustomIcon GT8_1 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST1");
private static Textures.BlockIcons.CustomIcon GT8_2_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE2");
@@ -29,7 +29,7 @@ public class TexturesGregtech59 {
private static Textures.BlockIcons.CustomIcon GT8_8 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST8");
private static Textures.BlockIcons.CustomIcon GT8_9_Active = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST_ACTIVE9");
private static Textures.BlockIcons.CustomIcon GT8_9 = new Textures.BlockIcons.CustomIcon("iconsets/LARGETURBINE_ST9");
-
+
private static Textures.BlockIcons.CustomIcon frontFace_0 = (GT8_1);
private static Textures.BlockIcons.CustomIcon frontFaceActive_0 = (GT8_1_Active);
private static Textures.BlockIcons.CustomIcon frontFace_1 = (GT8_2);
@@ -48,7 +48,7 @@ public class TexturesGregtech59 {
private static Textures.BlockIcons.CustomIcon frontFaceActive_7 = (GT8_8_Active);
private static Textures.BlockIcons.CustomIcon frontFace_8 = (GT8_9);
private static Textures.BlockIcons.CustomIcon frontFaceActive_8 = (GT8_9_Active);
-
+
Textures.BlockIcons.CustomIcon[] TURBINE = new Textures.BlockIcons.CustomIcon[]{
frontFace_0,
frontFace_1,
@@ -59,384 +59,384 @@ public class TexturesGregtech59 {
frontFace_6,
frontFace_7,
frontFace_8
- };
-
+ };
+
Textures.BlockIcons.CustomIcon[] TURBINE_ACTIVE = new Textures.BlockIcons.CustomIcon[]{
- frontFaceActive_0,
- frontFaceActive_1,
- frontFaceActive_2,
- frontFaceActive_3,
- frontFaceActive_4,
- frontFaceActive_5,
- frontFaceActive_6,
- frontFaceActive_7,
- frontFaceActive_8
- };
-
-
- public IIcon handleCasingsGT(IBlockAccess aWorld, int xCoord, int yCoord, int zCoord, int aSide, GregtechMetaCasingBlocks thisBlock) {
- return handleCasingsGT59(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock);
- }
+ frontFaceActive_0,
+ frontFaceActive_1,
+ frontFaceActive_2,
+ frontFaceActive_3,
+ frontFaceActive_4,
+ frontFaceActive_5,
+ frontFaceActive_6,
+ frontFaceActive_7,
+ frontFaceActive_8
+ };
-public IIcon handleCasingsGT59(IBlockAccess aWorld, int xCoord, int yCoord, int zCoord, int aSide, GregtechMetaCasingBlocks thisBlock) {
- int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord);
- if (((tMeta != 6) && (tMeta != 8) && (tMeta != 0))) {
- return CasingTextureHandler.getIcon(aSide, tMeta);
+ public IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide, final GregtechMetaCasingBlocks thisBlock) {
+ return this.handleCasingsGT59(aWorld, xCoord, yCoord, zCoord, aSide, thisBlock);
}
- int tStartIndex = tMeta == 6 ? 1 : 13;
- if (tMeta == 0) {
- if ((aSide == 2) || (aSide == 3)) {
- TileEntity tTileEntity;
- IMetaTileEntity tMetaTileEntity;
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[0].getIcon();
+
+
+ public IIcon handleCasingsGT59(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide, final GregtechMetaCasingBlocks thisBlock) {
+ final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord);
+ if (((tMeta != 6) && (tMeta != 8) && (tMeta != 0))) {
+ return CasingTextureHandler.getIcon(aSide, tMeta);
+ }
+ final int tStartIndex = tMeta == 6 ? 1 : 13;
+ if (tMeta == 0) {
+ if ((aSide == 2) || (aSide == 3)) {
+ TileEntity tTileEntity;
+ IMetaTileEntity tMetaTileEntity;
+ if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (((IGregTechTileEntity) tTileEntity).isActive()) {
+ return this.TURBINE_ACTIVE[0].getIcon();
+ }
+ return this.TURBINE[0].getIcon();
}
- return TURBINE[0].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[3].getIcon();
+ if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (((IGregTechTileEntity) tTileEntity).isActive()) {
+ return this.TURBINE_ACTIVE[3].getIcon();
+ }
+ return this.TURBINE[3].getIcon();
}
- return TURBINE[3].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[6].getIcon();
+ if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (((IGregTechTileEntity) tTileEntity).isActive()) {
+ return this.TURBINE_ACTIVE[6].getIcon();
+ }
+ return this.TURBINE[6].getIcon();
}
- return TURBINE[6].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[1].getIcon();
+ if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (((IGregTechTileEntity) tTileEntity).isActive()) {
+ return this.TURBINE_ACTIVE[1].getIcon();
+ }
+ return this.TURBINE[1].getIcon();
}
- return TURBINE[1].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[7].getIcon();
+ if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (((IGregTechTileEntity) tTileEntity).isActive()) {
+ return this.TURBINE_ACTIVE[7].getIcon();
+ }
+ return this.TURBINE[7].getIcon();
}
- return TURBINE[7].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[8].getIcon();
+ if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (((IGregTechTileEntity) tTileEntity).isActive()) {
+ return this.TURBINE_ACTIVE[8].getIcon();
+ }
+ return this.TURBINE[8].getIcon();
}
- return TURBINE[8].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[5].getIcon();
+ if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (((IGregTechTileEntity) tTileEntity).isActive()) {
+ return this.TURBINE_ACTIVE[5].getIcon();
+ }
+ return this.TURBINE[5].getIcon();
}
- return TURBINE[5].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[2].getIcon();
+ if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (((IGregTechTileEntity) tTileEntity).isActive()) {
+ return this.TURBINE_ACTIVE[2].getIcon();
+ }
+ return this.TURBINE[2].getIcon();
}
- return TURBINE[2].getIcon();
- }
- } else if ((aSide == 4) || (aSide == 5)) {
- TileEntity tTileEntity;
- Object tMetaTileEntity;
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[0].getIcon();
+ } else if ((aSide == 4) || (aSide == 5)) {
+ TileEntity tTileEntity;
+ Object tMetaTileEntity;
+ if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (((IGregTechTileEntity) tTileEntity).isActive()) {
+ return this.TURBINE_ACTIVE[0].getIcon();
+ }
+ return this.TURBINE[0].getIcon();
}
- return TURBINE[0].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[3].getIcon();
+ if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (((IGregTechTileEntity) tTileEntity).isActive()) {
+ return this.TURBINE_ACTIVE[3].getIcon();
+ }
+ return this.TURBINE[3].getIcon();
}
- return TURBINE[3].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[6].getIcon();
+ if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (((IGregTechTileEntity) tTileEntity).isActive()) {
+ return this.TURBINE_ACTIVE[6].getIcon();
+ }
+ return this.TURBINE[6].getIcon();
}
- return TURBINE[6].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[1].getIcon();
+ if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (((IGregTechTileEntity) tTileEntity).isActive()) {
+ return this.TURBINE_ACTIVE[1].getIcon();
+ }
+ return this.TURBINE[1].getIcon();
}
- return TURBINE[1].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[7].getIcon();
+ if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (((IGregTechTileEntity) tTileEntity).isActive()) {
+ return this.TURBINE_ACTIVE[7].getIcon();
+ }
+ return this.TURBINE[7].getIcon();
}
- return TURBINE[7].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[8].getIcon();
+ if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (((IGregTechTileEntity) tTileEntity).isActive()) {
+ return this.TURBINE_ACTIVE[8].getIcon();
+ }
+ return this.TURBINE[8].getIcon();
}
- return TURBINE[8].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[5].getIcon();
+ if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (((IGregTechTileEntity) tTileEntity).isActive()) {
+ return this.TURBINE_ACTIVE[5].getIcon();
+ }
+ return this.TURBINE[5].getIcon();
}
- return TURBINE[5].getIcon();
- }
- if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
- if (((IGregTechTileEntity) tTileEntity).isActive()) {
- return TURBINE_ACTIVE[2].getIcon();
+ if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GregtechMetaTileEntity_IndustrialCentrifuge))) {
+ if (((IGregTechTileEntity) tTileEntity).isActive()) {
+ return this.TURBINE_ACTIVE[2].getIcon();
+ }
+ return this.TURBINE[2].getIcon();
}
- return TURBINE[2].getIcon();
}
+ return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon();
}
- return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon();
- }
- boolean[] tConnectedSides = {(aWorld.getBlock(xCoord, yCoord - 1, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord - 1, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord + 1, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord + 1, zCoord) == tMeta), (aWorld.getBlock(xCoord + 1, yCoord, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord + 1, yCoord, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord, zCoord + 1) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord + 1) == tMeta), (aWorld.getBlock(xCoord - 1, yCoord, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord - 1, yCoord, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord, zCoord - 1) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord - 1) == tMeta)};
- switch (aSide) {
- case 0:
- if (tConnectedSides[0]) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
- }
- if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
- }
- if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
- }
- if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
- }
- if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
- }
- if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
- }
- if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((!tConnectedSides[4]) && (!tConnectedSides[2])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
- }
- if ((!tConnectedSides[5]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
- }
- case 1:
- if (tConnectedSides[1]) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
- }
- if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
- }
- if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
- }
- if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
- }
- if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
- }
- if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
- }
- if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
- }
- if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((!tConnectedSides[2]) && (!tConnectedSides[4])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
- }
- if ((!tConnectedSides[3]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
- }
- case 2:
- if (tConnectedSides[5]) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
- }
- if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
- }
- if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
- }
- if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
- }
- if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
- }
- if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
- }
- if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((!tConnectedSides[2]) && (!tConnectedSides[4])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
- }
- case 3:
- if (tConnectedSides[3]) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
- }
- if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
- }
- if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
- }
- if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
- }
- if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
- }
- if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
- }
- if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
- }
- if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((!tConnectedSides[2]) && (!tConnectedSides[4])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
- }
- case 4:
- if (tConnectedSides[4]) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
- }
- if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
- }
- if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
- }
- if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
- }
- if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
- }
- if ((!tConnectedSides[3]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
- }
- case 5:
- if (tConnectedSides[2]) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
- }
- if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
- }
- if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
- }
- if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
- }
- if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
- }
- if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
- }
- if ((!tConnectedSides[0]) && (!tConnectedSides[1])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
- }
- if ((!tConnectedSides[3]) && (!tConnectedSides[5])) {
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
+ final boolean[] tConnectedSides = {(aWorld.getBlock(xCoord, yCoord - 1, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord - 1, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord + 1, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord + 1, zCoord) == tMeta), (aWorld.getBlock(xCoord + 1, yCoord, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord + 1, yCoord, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord, zCoord + 1) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord + 1) == tMeta), (aWorld.getBlock(xCoord - 1, yCoord, zCoord) == thisBlock) && (aWorld.getBlockMetadata(xCoord - 1, yCoord, zCoord) == tMeta), (aWorld.getBlock(xCoord, yCoord, zCoord - 1) == thisBlock) && (aWorld.getBlockMetadata(xCoord, yCoord, zCoord - 1) == tMeta)};
+ switch (aSide) {
+ case 0:
+ if (tConnectedSides[0]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
+ }
+ if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
+ }
+ if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
+ }
+ if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
+ }
+ if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
+ }
+ if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
+ }
+ if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
+ }
+ if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
+ }
+ if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
+ }
+ if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
+ }
+ if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
+ }
+ if ((!tConnectedSides[4]) && (!tConnectedSides[2])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
+ }
+ if ((!tConnectedSides[5]) && (!tConnectedSides[3])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
+ }
+ case 1:
+ if (tConnectedSides[1]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
+ }
+ if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
+ }
+ if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
+ }
+ if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
+ }
+ if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
+ }
+ if ((tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
+ }
+ if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (tConnectedSides[2]) && (tConnectedSides[3])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
+ }
+ if ((tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (tConnectedSides[3])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
+ }
+ if ((tConnectedSides[4]) && (tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
+ }
+ if ((!tConnectedSides[4]) && (tConnectedSides[5]) && (tConnectedSides[2]) && (!tConnectedSides[3])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
+ }
+ if ((!tConnectedSides[4]) && (!tConnectedSides[5]) && (!tConnectedSides[2]) && (!tConnectedSides[3])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
+ }
+ if ((!tConnectedSides[2]) && (!tConnectedSides[4])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
+ }
+ if ((!tConnectedSides[3]) && (!tConnectedSides[5])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
+ }
+ case 2:
+ if (tConnectedSides[5]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
+ }
+ if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
+ }
+ if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
+ }
+ if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
+ }
+ if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
+ }
+ if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
+ }
+ if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
+ }
+ if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
+ }
+ if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
+ }
+ if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
+ }
+ if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
+ }
+ if ((!tConnectedSides[2]) && (!tConnectedSides[4])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
+ }
+ if ((!tConnectedSides[0]) && (!tConnectedSides[1])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
+ }
+ case 3:
+ if (tConnectedSides[3]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
+ }
+ if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
+ }
+ if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
+ }
+ if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
+ }
+ if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
+ }
+ if ((tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
+ }
+ if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (tConnectedSides[4]) && (tConnectedSides[1])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
+ }
+ if ((tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (tConnectedSides[1])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
+ }
+ if ((tConnectedSides[2]) && (tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
+ }
+ if ((!tConnectedSides[2]) && (tConnectedSides[0]) && (tConnectedSides[4]) && (!tConnectedSides[1])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
+ }
+ if ((!tConnectedSides[2]) && (!tConnectedSides[0]) && (!tConnectedSides[4]) && (!tConnectedSides[1])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
+ }
+ if ((!tConnectedSides[2]) && (!tConnectedSides[4])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
+ }
+ if ((!tConnectedSides[0]) && (!tConnectedSides[1])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
+ }
+ case 4:
+ if (tConnectedSides[4]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
+ }
+ if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
+ }
+ if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
+ }
+ if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
+ }
+ if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
+ }
+ if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
+ }
+ if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
+ }
+ if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
+ }
+ if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
+ }
+ if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
+ }
+ if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
+ }
+ if ((!tConnectedSides[0]) && (!tConnectedSides[1])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
+ }
+ if ((!tConnectedSides[3]) && (!tConnectedSides[5])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
+ }
+ case 5:
+ if (tConnectedSides[2]) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
+ }
+ if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 6)].getIcon();
+ }
+ if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 5)].getIcon();
+ }
+ if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 2)].getIcon();
+ }
+ if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 3)].getIcon();
+ }
+ if ((tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 4)].getIcon();
+ }
+ if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (tConnectedSides[1]) && (tConnectedSides[5])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 11)].getIcon();
+ }
+ if ((tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (tConnectedSides[5])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 8)].getIcon();
+ }
+ if ((tConnectedSides[0]) && (tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 9)].getIcon();
+ }
+ if ((!tConnectedSides[0]) && (tConnectedSides[3]) && (tConnectedSides[1]) && (!tConnectedSides[5])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 10)].getIcon();
+ }
+ if ((!tConnectedSides[0]) && (!tConnectedSides[3]) && (!tConnectedSides[1]) && (!tConnectedSides[5])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
+ }
+ if ((!tConnectedSides[0]) && (!tConnectedSides[1])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 0)].getIcon();
+ }
+ if ((!tConnectedSides[3]) && (!tConnectedSides[5])) {
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 1)].getIcon();
+ }
+ break;
}
- break;
+ return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
}
- return Textures.BlockIcons.CONNECTED_HULLS[(tStartIndex + 7)].getIcon();
-}
-
-
+
+
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java
index e2882a6e47..880813b392 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java
@@ -18,15 +18,15 @@ public class TexturesGtBlock {
protected IIcon mIcon;
protected String mIconName;
- public CustomIcon(String aIconName) {
- mIconName = aIconName;
- Utils.LOG_WARNING("Constructing a Custom Texture. " + mIconName);
+ public CustomIcon(final String aIconName) {
+ this.mIconName = aIconName;
+ Utils.LOG_WARNING("Constructing a Custom Texture. " + this.mIconName);
GregTech_API.sGTBlockIconload.add(this);
}
@Override
public IIcon getIcon() {
- return mIcon;
+ return this.mIcon;
}
@Override
@@ -36,7 +36,7 @@ public class TexturesGtBlock {
@Override
public void run() {
- mIcon = GregTech_API.sBlockIcons.registerIcon(CORE.MODID + ":" + mIconName);
+ this.mIcon = GregTech_API.sBlockIcons.registerIcon(CORE.MODID + ":" + this.mIconName);
Utils.LOG_WARNING("FIND ME _ Processing texture: "+this.getTextureFile().getResourcePath());
}
@@ -50,139 +50,139 @@ public class TexturesGtBlock {
/*
* Add Some Custom Textures below.
* I am not sure whether or not I need to declare them as such, but better to be safe than sorry.
- * Right?
+ * Right?
*/
//PlaceHolder Texture
- private static final CustomIcon Internal_PlaceHolder = new CustomIcon("TileEntities/_PlaceHolder");
+ private static final CustomIcon Internal_PlaceHolder = new CustomIcon("TileEntities/_PlaceHolder");
public static final CustomIcon _PlaceHolder = Internal_PlaceHolder;
//Machine Casings
//Simple
- private static final CustomIcon Internal_Casing_Machine_Simple_Top = new CustomIcon("TileEntities/machine_top");
+ private static final CustomIcon Internal_Casing_Machine_Simple_Top = new CustomIcon("TileEntities/machine_top");
public static final CustomIcon Casing_Machine_Simple_Top = Internal_Casing_Machine_Simple_Top;
- private static final CustomIcon Internal_Casing_Machine_Simple_Bottom = new CustomIcon("TileEntities/machine_bottom");
+ private static final CustomIcon Internal_Casing_Machine_Simple_Bottom = new CustomIcon("TileEntities/machine_bottom");
public static final CustomIcon Casing_Machine_Simple_Bottom = Internal_Casing_Machine_Simple_Bottom;
//Advanced and Ultra
- private static final CustomIcon Internal_Casing_Machine_Advanced = new CustomIcon("TileEntities/high_adv_machine");
+ private static final CustomIcon Internal_Casing_Machine_Advanced = new CustomIcon("TileEntities/high_adv_machine");
public static final CustomIcon Casing_Machine_Advanced = Internal_Casing_Machine_Advanced;
- private static final CustomIcon Internal_Casing_Machine_Ultra = new CustomIcon("TileEntities/adv_machine_lesu");
+ private static final CustomIcon Internal_Casing_Machine_Ultra = new CustomIcon("TileEntities/adv_machine_lesu");
public static final CustomIcon Casing_Machine_Ultra = Internal_Casing_Machine_Ultra;
//Dimensional - Non Overlay
- private static final CustomIcon Internal_Casing_Machine_Dimensional = new CustomIcon("TileEntities/adv_machine_dimensional");
+ private static final CustomIcon Internal_Casing_Machine_Dimensional = new CustomIcon("TileEntities/adv_machine_dimensional");
public static final CustomIcon Casing_Machine_Dimensional = Internal_Casing_Machine_Dimensional;
- private static final CustomIcon Internal_Casing_Machine_Dimensional_Adv = new CustomIcon("TileEntities/high_adv_machine_dimensional");
+ private static final CustomIcon Internal_Casing_Machine_Dimensional_Adv = new CustomIcon("TileEntities/high_adv_machine_dimensional");
public static final CustomIcon Casing_Machine_Dimensional_Adv = Internal_Casing_Machine_Dimensional_Adv;
//Material Casings
- private static final CustomIcon Internal_Casing_Tantalloy61 = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TANTALLOY61");
+ private static final CustomIcon Internal_Casing_Tantalloy61 = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TANTALLOY61");
public static final CustomIcon Casing_Material_Tantalloy61 = Internal_Casing_Tantalloy61;
- private static final CustomIcon Internal_Casing_MaragingSteel = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_MARAGINGSTEEL");
+ private static final CustomIcon Internal_Casing_MaragingSteel = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_MARAGINGSTEEL");
public static final CustomIcon Casing_Material_MaragingSteel = Internal_Casing_MaragingSteel;
- private static final CustomIcon Internal_Casing_Stellite = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_STELLITE");
+ private static final CustomIcon Internal_Casing_Stellite = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_STELLITE");
public static final CustomIcon Casing_Material_Stellite = Internal_Casing_Stellite;
- private static final CustomIcon Internal_Casing_Talonite = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TALONITE");
+ private static final CustomIcon Internal_Casing_Talonite = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TALONITE");
public static final CustomIcon Casing_Material_Talonite = Internal_Casing_Talonite;
- private static final CustomIcon Internal_Casing_Tumbaga = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TUMBAGA");
+ private static final CustomIcon Internal_Casing_Tumbaga = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_TUMBAGA");
public static final CustomIcon Casing_Material_Tumbaga = Internal_Casing_Tumbaga;
- private static final CustomIcon Internal_Casing_Zeron100 = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_ZERON100");
+ private static final CustomIcon Internal_Casing_Zeron100 = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_ZERON100");
public static final CustomIcon Casing_Material_Zeron100 = Internal_Casing_Zeron100;
- private static final CustomIcon Internal_Casing_Potin = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_POTIN");
+ private static final CustomIcon Internal_Casing_Potin = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_POTIN");
public static final CustomIcon Casing_Material_Potin = Internal_Casing_Potin;
- private static final CustomIcon Internal_Casing_Grisium = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_GRISIUM");
+ private static final CustomIcon Internal_Casing_Grisium = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_GRISIUM");
public static final CustomIcon Casing_Material_Grisium = Internal_Casing_Grisium;
- private static final CustomIcon Internal_Casing_Incoloy020 = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_INCOLOY_020");
+ private static final CustomIcon Internal_Casing_Incoloy020 = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_INCOLOY_020");
public static final CustomIcon Casing_Material_Incoloy020 = Internal_Casing_Incoloy020;
- private static final CustomIcon Internal_Casing_IncoloyDS = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_INCOLOY_DS");
+ private static final CustomIcon Internal_Casing_IncoloyDS = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_INCOLOY_DS");
public static final CustomIcon Casing_Material_IncoloyDS = Internal_Casing_IncoloyDS;
- private static final CustomIcon Internal_Casing_IncoloyMA956 = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_INCOLOY_MA956");
+ private static final CustomIcon Internal_Casing_IncoloyMA956 = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_INCOLOY_MA956");
public static final CustomIcon Casing_Material_IncoloyMA956 = Internal_Casing_IncoloyMA956;
- private static final CustomIcon Internal_Casing_ZirconiumCarbide = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_ZIRCONIUM_CARBIDE");
+ private static final CustomIcon Internal_Casing_ZirconiumCarbide = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_ZIRCONIUM_CARBIDE");
public static final CustomIcon Casing_Material_ZirconiumCarbide = Internal_Casing_ZirconiumCarbide;
- private static final CustomIcon Internal_Casing_HastelloyX = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_HASTELLOY_X");
+ private static final CustomIcon Internal_Casing_HastelloyX = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_HASTELLOY_X");
public static final CustomIcon Casing_Material_HastelloyX = Internal_Casing_HastelloyX;
- private static final CustomIcon Internal_Casing_HastelloyN = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_HASTELLOY_N");
+ private static final CustomIcon Internal_Casing_HastelloyN = new CustomIcon("TileEntities/MACHINE_CASING_STABLE_HASTELLOY_N");
public static final CustomIcon Casing_Material_HastelloyN = Internal_Casing_HastelloyN;
- private static final CustomIcon Internal_Casing_Fluid_IncoloyDS = new CustomIcon("TileEntities/MACHINE_CASING_FLUID_INCOLOY_DS");
+ private static final CustomIcon Internal_Casing_Fluid_IncoloyDS = new CustomIcon("TileEntities/MACHINE_CASING_FLUID_INCOLOY_DS");
public static final CustomIcon Casing_Material_Fluid_IncoloyDS = Internal_Casing_Fluid_IncoloyDS;
//Material Machine/Firebox Casings
- private static final CustomIcon Internal_Casing_Staballoy_Firebox = new CustomIcon("TileEntities/MACHINE_CASING_FIREBOX_STABALLOY");
+ private static final CustomIcon Internal_Casing_Staballoy_Firebox = new CustomIcon("TileEntities/MACHINE_CASING_FIREBOX_STABALLOY");
public static final CustomIcon Casing_Staballoy_Firebox = Internal_Casing_Staballoy_Firebox;
- //Misc Casings
- private static final CustomIcon Internal_Casing_Machine_Redstone_Off = new CustomIcon("TileEntities/cover_redstone_conductor");
+ //Misc Casings
+ private static final CustomIcon Internal_Casing_Machine_Redstone_Off = new CustomIcon("TileEntities/cover_redstone_conductor");
public static final CustomIcon Casing_Machine_Redstone_Off = Internal_Casing_Machine_Redstone_Off;
- private static final CustomIcon Internal_Casing_Machine_Redstone_On = new CustomIcon("TileEntities/cover_redstone_emitter");
+ private static final CustomIcon Internal_Casing_Machine_Redstone_On = new CustomIcon("TileEntities/cover_redstone_emitter");
public static final CustomIcon Casing_Machine_Redstone_On = Internal_Casing_Machine_Redstone_On;
//MACHINE_CASING_FARM_MANAGER_STRUCTURAL
//Farm Manager Casings
- private static final CustomIcon Internal_Casing_Machine_Farm_Manager = new CustomIcon("TileEntities/MACHINE_CASING_FARM_MANAGER_STRUCTURAL");
+ private static final CustomIcon Internal_Casing_Machine_Farm_Manager = new CustomIcon("TileEntities/MACHINE_CASING_FARM_MANAGER_STRUCTURAL");
public static final CustomIcon Casing_Machine_Farm_Manager = Internal_Casing_Machine_Farm_Manager;
//Acacia_Log
- private static final CustomIcon Internal_Casing_Machine_Acacia_Log = new CustomIcon("TileEntities/log_acacia_top");
+ private static final CustomIcon Internal_Casing_Machine_Acacia_Log = new CustomIcon("TileEntities/log_acacia_top");
public static final CustomIcon Casing_Machine_Acacia_Log = Internal_Casing_Machine_Acacia_Log;
//Podzol Top
- private static final CustomIcon Internal_Casing_Machine_Podzol = new CustomIcon("TileEntities/dirt_podzol_top");
+ private static final CustomIcon Internal_Casing_Machine_Podzol = new CustomIcon("TileEntities/dirt_podzol_top");
public static final CustomIcon Casing_Machine_Podzol = Internal_Casing_Machine_Podzol;
//Overlays
//Fan Textures
- private static final CustomIcon Internal_Overlay_Machine_Vent = new CustomIcon("TileEntities/machine_top_vent_rotating");
+ private static final CustomIcon Internal_Overlay_Machine_Vent = new CustomIcon("TileEntities/machine_top_vent_rotating");
public static final CustomIcon Overlay_Machine_Vent = Internal_Overlay_Machine_Vent;
- private static final CustomIcon Internal_Overlay_Machine_Vent_Fast = new CustomIcon("TileEntities/machine_top_vent_rotating_fast");
+ private static final CustomIcon Internal_Overlay_Machine_Vent_Fast = new CustomIcon("TileEntities/machine_top_vent_rotating_fast");
public static final CustomIcon Overlay_Machine_Vent_Fast = Internal_Overlay_Machine_Vent_Fast;
- private static final CustomIcon Internal_Overlay_Machine_Vent_Adv = new CustomIcon("TileEntities/adv_machine_vent_rotating");
+ private static final CustomIcon Internal_Overlay_Machine_Vent_Adv = new CustomIcon("TileEntities/adv_machine_vent_rotating");
public static final CustomIcon Overlay_Machine_Vent_Adv = Internal_Overlay_Machine_Vent_Adv;
//Speaker Texture
- private static final CustomIcon Internal_Overlay_Machine_Sound = new CustomIcon("TileEntities/audio_out");
+ private static final CustomIcon Internal_Overlay_Machine_Sound = new CustomIcon("TileEntities/audio_out");
public static final CustomIcon Overlay_Machine_Sound = Internal_Overlay_Machine_Sound;
- private static final CustomIcon Internal_Overlay_Machine_Sound_Active = new CustomIcon("TileEntities/audio_out_active");
+ private static final CustomIcon Internal_Overlay_Machine_Sound_Active = new CustomIcon("TileEntities/audio_out_active");
public static final CustomIcon Overlay_Machine_Sound_Active = Internal_Overlay_Machine_Sound_Active;
//Diesel Engines
- private static final CustomIcon Internal_Overlay_Machine_Diesel_Vertical = new CustomIcon("TileEntities/machine_top_dieselmotor");
+ private static final CustomIcon Internal_Overlay_Machine_Diesel_Vertical = new CustomIcon("TileEntities/machine_top_dieselmotor");
public static final CustomIcon Overlay_Machine_Diesel_Vertical = Internal_Overlay_Machine_Diesel_Vertical;
- private static final CustomIcon Internal_Overlay_Machine_Diesel_Horizontal = new CustomIcon("TileEntities/machine_top_dieselmotor2");
+ private static final CustomIcon Internal_Overlay_Machine_Diesel_Horizontal = new CustomIcon("TileEntities/machine_top_dieselmotor2");
public static final CustomIcon Overlay_Machine_Diesel_Horizontal = Internal_Overlay_Machine_Diesel_Horizontal;
- private static final CustomIcon Internal_Overlay_Machine_Diesel_Vertical_Active = new CustomIcon("TileEntities/machine_top_dieselmotor_active");
+ private static final CustomIcon Internal_Overlay_Machine_Diesel_Vertical_Active = new CustomIcon("TileEntities/machine_top_dieselmotor_active");
public static final CustomIcon Overlay_Machine_Diesel_Vertical_Active = Internal_Overlay_Machine_Diesel_Vertical_Active;
- private static final CustomIcon Internal_Overlay_Machine_Diesel_Horizontal_Active = new CustomIcon("TileEntities/machine_top_dieselmotor2_active");
+ private static final CustomIcon Internal_Overlay_Machine_Diesel_Horizontal_Active = new CustomIcon("TileEntities/machine_top_dieselmotor2_active");
public static final CustomIcon Overlay_Machine_Diesel_Horizontal_Active = Internal_Overlay_Machine_Diesel_Horizontal_Active;
//Computer Screens
- private static final CustomIcon Internal_Casing_Machine_Screen_1 = new CustomIcon("TileEntities/adv_machine_screen_random1");
+ private static final CustomIcon Internal_Casing_Machine_Screen_1 = new CustomIcon("TileEntities/adv_machine_screen_random1");
public static final CustomIcon Casing_Machine_Screen_1 = Internal_Casing_Machine_Screen_1;
- private static final CustomIcon Internal_Casing_Machine_Screen_2 = new CustomIcon("TileEntities/adv_machine_screen_random2");
+ private static final CustomIcon Internal_Casing_Machine_Screen_2 = new CustomIcon("TileEntities/adv_machine_screen_random2");
public static final CustomIcon Casing_Machine_Screen_2 = Internal_Casing_Machine_Screen_2;
- private static final CustomIcon Internal_Casing_Machine_Screen_3 = new CustomIcon("TileEntities/adv_machine_screen_random3");
+ private static final CustomIcon Internal_Casing_Machine_Screen_3 = new CustomIcon("TileEntities/adv_machine_screen_random3");
public static final CustomIcon Casing_Machine_Screen_3 = Internal_Casing_Machine_Screen_3;
- private static final CustomIcon Internal_Casing_Machine_Screen_Frequency = new CustomIcon("TileEntities/adv_machine_screen_frequency");
+ private static final CustomIcon Internal_Casing_Machine_Screen_Frequency = new CustomIcon("TileEntities/adv_machine_screen_frequency");
public static final CustomIcon Casing_Machine_Screen_Frequency = Internal_Casing_Machine_Screen_Frequency;
- private static final CustomIcon Internal_Overlay_Machine_Screen_Logo = new CustomIcon("TileEntities/adv_machine_screen_logo");
+ private static final CustomIcon Internal_Overlay_Machine_Screen_Logo = new CustomIcon("TileEntities/adv_machine_screen_logo");
public static final CustomIcon Overlay_Machine_Screen_Logo = Internal_Overlay_Machine_Screen_Logo;
//Crafting Overlays
- private static final CustomIcon Internal_Overlay_Crafting_Bronze = new CustomIcon("TileEntities/bronze_top_crafting");
+ private static final CustomIcon Internal_Overlay_Crafting_Bronze = new CustomIcon("TileEntities/bronze_top_crafting");
public static final CustomIcon Overlay_Crafting_Bronze = Internal_Overlay_Crafting_Bronze;
- private static final CustomIcon Internal_Overlay_Crafting_Steel = new CustomIcon("TileEntities/cover_crafting");
+ private static final CustomIcon Internal_Overlay_Crafting_Steel = new CustomIcon("TileEntities/cover_crafting");
public static final CustomIcon Overlay_Crafting_Steel = Internal_Overlay_Crafting_Steel;
//Dimensional
- private static final CustomIcon Internal_Overlay_Machine_Dimensional_Blue = new CustomIcon("TileEntities/adv_machine_dimensional_cover_blue");
+ private static final CustomIcon Internal_Overlay_Machine_Dimensional_Blue = new CustomIcon("TileEntities/adv_machine_dimensional_cover_blue");
public static final CustomIcon Overlay_Machine_Dimensional_Blue = Internal_Overlay_Machine_Dimensional_Blue;
- private static final CustomIcon Internal_Overlay_Machine_Dimensional_Orange = new CustomIcon("TileEntities/adv_machine_dimensional_cover_orange");
+ private static final CustomIcon Internal_Overlay_Machine_Dimensional_Orange = new CustomIcon("TileEntities/adv_machine_dimensional_cover_orange");
public static final CustomIcon Overlay_Machine_Dimensional_Orange = Internal_Overlay_Machine_Dimensional_Orange;
//Icons
- private static final CustomIcon Internal_Overlay_MatterFab = new CustomIcon("TileEntities/adv_machine_matterfab");
+ private static final CustomIcon Internal_Overlay_MatterFab = new CustomIcon("TileEntities/adv_machine_matterfab");
public static final CustomIcon Overlay_MatterFab = Internal_Overlay_MatterFab;
- private static final CustomIcon Internal_Overlay_MatterFab_Active = new CustomIcon("TileEntities/adv_machine_matterfab_active");
+ private static final CustomIcon Internal_Overlay_MatterFab_Active = new CustomIcon("TileEntities/adv_machine_matterfab_active");
public static final CustomIcon Overlay_MatterFab_Active = Internal_Overlay_MatterFab_Active;
- private static final CustomIcon Internal_Overlay_Oil = new CustomIcon("TileEntities/adv_machine_oil");
+ private static final CustomIcon Internal_Overlay_Oil = new CustomIcon("TileEntities/adv_machine_oil");
public static final CustomIcon Overlay_Oil = Internal_Overlay_Oil;
- private static final CustomIcon Internal_Overlay_UU_Matter = new CustomIcon("TileEntities/adv_machine_uum");
+ private static final CustomIcon Internal_Overlay_UU_Matter = new CustomIcon("TileEntities/adv_machine_uum");
public static final CustomIcon Overlay_UU_Matter = Internal_Overlay_UU_Matter;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java
index 1b3af3a842..31a95560da 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java
@@ -11,49 +11,49 @@ import net.minecraft.util.ResourceLocation;
public final class TexturesGtTools {
public final static CustomIcon SKOOKUM_CHOOCHER = new CustomIcon("iconsets/SKOOKUMCHOOCHER");
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
public final static class CustomIcon implements IIconContainer, Runnable {
- protected IIcon mIcon, mOverlay;
- protected final String mIconName;
-
- public CustomIcon(final String aIconName) {
- mIconName = aIconName;
- Utils.LOG_INFO("Constructing a Custom Texture. " + mIconName);
- GregTech_API.sGTItemIconload.add(this);
- }
-
- @Override
- public IIcon getIcon() {
- return mIcon;
- }
-
- @Override
- public IIcon getOverlayIcon() {
- return mOverlay;
- }
-
- @Override
- public void run() {
- mIcon = GregTech_API.sItemIcons.registerIcon(CORE.MODID + ":" + mIconName);
- //Utils.LOG_INFO("Registering a Custom Texture. "+mIcon.g);
- mOverlay = GregTech_API.sItemIcons.registerIcon(CORE.MODID + ":" + mIconName + "_OVERLAY");
- }
-
- @Override
- public ResourceLocation getTextureFile() {
- return TextureMap.locationItemsTexture;
- }
- }
+ protected IIcon mIcon, mOverlay;
+ protected final String mIconName;
+
+ public CustomIcon(final String aIconName) {
+ this.mIconName = aIconName;
+ Utils.LOG_INFO("Constructing a Custom Texture. " + this.mIconName);
+ GregTech_API.sGTItemIconload.add(this);
+ }
+
+ @Override
+ public IIcon getIcon() {
+ return this.mIcon;
+ }
+
+ @Override
+ public IIcon getOverlayIcon() {
+ return this.mOverlay;
+ }
+
+ @Override
+ public void run() {
+ this.mIcon = GregTech_API.sItemIcons.registerIcon(CORE.MODID + ":" + this.mIconName);
+ //Utils.LOG_INFO("Registering a Custom Texture. "+mIcon.g);
+ this.mOverlay = GregTech_API.sItemIcons.registerIcon(CORE.MODID + ":" + this.mIconName + "_OVERLAY");
+ }
+
+ @Override
+ public ResourceLocation getTextureFile() {
+ return TextureMap.locationItemsTexture;
+ }
+ }
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java
index ba2dc9053c..fcde96042c 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/TreeFarmHelper.java
@@ -1,6 +1,8 @@
package gtPlusPlus.xmod.gregtech.common.helpers;
import static gtPlusPlus.core.lib.CORE.configSwitches.enableTreeFarmerParticles;
+
+import cpw.mods.fml.common.eventhandler.Event.Result;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
@@ -23,7 +25,6 @@ import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.player.BonemealEvent;
import net.minecraftforge.fluids.FluidStack;
-import cpw.mods.fml.common.eventhandler.Event.Result;
public class TreeFarmHelper {
@@ -32,7 +33,7 @@ public class TreeFarmHelper {
public static final FluidStack fertT3 = FluidUtils.getFluidStack("fluid.un32fertiliser", 1);
public static ITexture[][][] getTextureSet() {
- ITexture[][][] rTextures = new ITexture[10][17][];
+ final ITexture[][][] rTextures = new ITexture[10][17][];
for (byte i = -1; i < 16; i++) {
rTextures[0][i + 1] = TreeFarmHelper.getFront(i);
rTextures[1][i + 1] = TreeFarmHelper.getBack(i);
@@ -88,8 +89,8 @@ public class TreeFarmHelper {
return getSides(aColor);
}
- public static boolean applyBonemeal(EntityPlayer player, World world, int intX, int intY, int intZ, short multiplier){
- Block block = world.getBlock(intX, intY, intZ);
+ public static boolean applyBonemeal(final EntityPlayer player, final World world, final int intX, final int intY, final int intZ, final short multiplier){
+ final Block block = world.getBlock(intX, intY, intZ);
int roll;
@@ -97,15 +98,15 @@ public class TreeFarmHelper {
if (multiplier==1){
roll = MathUtils.randInt(1, 15);
- rollNeeded = 15;
+ rollNeeded = 15;
}
else if (multiplier==2){
roll = MathUtils.randInt(1, 10);
- rollNeeded = 10;
+ rollNeeded = 10;
}
else {
roll = MathUtils.randInt(1, 5);
- rollNeeded = 5;
+ rollNeeded = 5;
}
if (roll != rollNeeded){
@@ -118,7 +119,7 @@ public class TreeFarmHelper {
world.playAuxSFX(2005, intX, intY, intZ, 0);
}
}
- BonemealEvent event = new BonemealEvent(player, world, block, intX, intY, intZ);
+ final BonemealEvent event = new BonemealEvent(player, world, block, intX, intY, intZ);
if (MinecraftForge.EVENT_BUS.post(event)){
Utils.LOG_MACHINE_INFO("Not sure why this returned false");
return false;
@@ -130,13 +131,13 @@ public class TreeFarmHelper {
return true;
}
if (block instanceof IGrowable){
- IGrowable igrowable = (IGrowable)block;
+ final IGrowable igrowable = (IGrowable)block;
if (igrowable.func_149851_a(world, intX, intY, intZ, world.isRemote)){
if (!world.isRemote){
if (igrowable.func_149852_a(world, CORE.RANDOM, intX, intY, intZ)){
igrowable.func_149853_b(world, CORE.RANDOM, intX, intY, intZ);
}
- }
+ }
return true;
}
}
@@ -146,53 +147,57 @@ public class TreeFarmHelper {
public static boolean cleanUp(final IGregTechTileEntity aBaseMetaTileEntity){
Utils.LOG_MACHINE_INFO("called cleanUp()");
int cleanedUp = 0;
- final int xDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 11;
+ final int xDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 11;
final int zDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 11;
-
+
for (int h=1;h<175;h++){
- for (int i = -11; i <= 11; i++) {
- for (int j = -11; j <= 11; j++) {
+ for (int i = -11; i <= 11; i++) {
+ for (int j = -11; j <= 11; j++) {
- Block testBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j);
+ final Block testBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j);
- if
+ if
((
- (i == -8 || i == 8) ||
- (i == -9 || i == 9) ||
- (i == -10 || i == 10) ||
- (i == -11 || i == 11)
+ ((i == -8) || (i == 8)) ||
+ ((i == -9) || (i == 9)) ||
+ ((i == -10) || (i == 10)) ||
+ ((i == -11) || (i == 11))
)
- &&
+ &&
(
- (j == -8 || j == 8) ||
- (j == -9 || j == 9) ||
- (j == -10 || j == 10) ||
- (j == -11 || j == 11)
- )){
-
- if (!testBlock.getUnlocalizedName().toLowerCase().contains("air") || !testBlock.getUnlocalizedName().toLowerCase().contains("pumpkin"))
- Utils.LOG_INFO("5:"+testBlock.getUnlocalizedName());
- else aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getXCoord()+xDir+i, aBaseMetaTileEntity.getYCoord()+h, aBaseMetaTileEntity.getZCoord()+zDir+j, Blocks.bookshelf);
+ ((j == -8) || (j == 8)) ||
+ ((j == -9) || (j == 9)) ||
+ ((j == -10) || (j == 10)) ||
+ ((j == -11) || (j == 11))
+ )){
+
+ if (!testBlock.getUnlocalizedName().toLowerCase().contains("air") || !testBlock.getUnlocalizedName().toLowerCase().contains("pumpkin")) {
+ Utils.LOG_INFO("5:"+testBlock.getUnlocalizedName());
+ } else {
+ aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getXCoord()+xDir+i, aBaseMetaTileEntity.getYCoord()+h, aBaseMetaTileEntity.getZCoord()+zDir+j, Blocks.bookshelf);
+ }
}
//If not in the middle - don't know how else to check this one without lots of !=
if (
- i != 7 && i != -7 && j != 7 && j != -7 &&
- i != 6 && i != -6 && j != 6 && j != -6 &&
- i != 5 && i != -5 && j != 5 && j != -5 &&
- i != 4 && i != -4 && j != 4 && j != -4 &&
- i != 3 && i != -3 && j != 3 && j != -3 &&
- i != 2 && i != -2 && j != 2 && j != -2 &&
- i != 1 && i != -1 && j != 1 && j != -1 &&
- i != 0 && j != 0
+ (i != 7) && (i != -7) && (j != 7) && (j != -7) &&
+ (i != 6) && (i != -6) && (j != 6) && (j != -6) &&
+ (i != 5) && (i != -5) && (j != 5) && (j != -5) &&
+ (i != 4) && (i != -4) && (j != 4) && (j != -4) &&
+ (i != 3) && (i != -3) && (j != 3) && (j != -3) &&
+ (i != 2) && (i != -2) && (j != 2) && (j != -2) &&
+ (i != 1) && (i != -1) && (j != 1) && (j != -1) &&
+ (i != 0) && (j != 0)
){
-
- if (!testBlock.getUnlocalizedName().toLowerCase().contains("air") || !testBlock.getUnlocalizedName().toLowerCase().contains("pumpkin"))
- Utils.LOG_INFO("0:"+testBlock.getUnlocalizedName());
- else aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getXCoord()+xDir+i, aBaseMetaTileEntity.getYCoord()+h, aBaseMetaTileEntity.getZCoord()+zDir+j, Blocks.melon_block);
-
+
+ if (!testBlock.getUnlocalizedName().toLowerCase().contains("air") || !testBlock.getUnlocalizedName().toLowerCase().contains("pumpkin")) {
+ Utils.LOG_INFO("0:"+testBlock.getUnlocalizedName());
+ } else {
+ aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getXCoord()+xDir+i, aBaseMetaTileEntity.getYCoord()+h, aBaseMetaTileEntity.getZCoord()+zDir+j, Blocks.melon_block);
+ }
+
if (TreefarmManager.isLeaves(testBlock) || TreefarmManager.isWoodLog(testBlock)){
Utils.LOG_INFO("1:"+testBlock.getUnlocalizedName());
@@ -208,7 +213,7 @@ public class TreeFarmHelper {
else {
//Utils.LOG_INFO("2:"+testBlock.getUnlocalizedName());
}
- }
+ }
else {
//Utils.LOG_INFO("1");
}
@@ -219,12 +224,12 @@ public class TreeFarmHelper {
}
}
Utils.LOG_MACHINE_INFO("cleaning up | "+cleanedUp );
- return true;
+ return true;
}
public static SAWTOOL isCorrectMachinePart(final ItemStack aStack) {
if (aStack != null){
- if (aStack.getItem() instanceof GT_MetaGenerated_Item_02 || aStack.getItem() instanceof GT_MetaGenerated_Tool){
+ if ((aStack.getItem() instanceof GT_MetaGenerated_Item_02) || (aStack.getItem() instanceof GT_MetaGenerated_Tool)){
if (OrePrefixes.craftingTool.contains(aStack)){
if (aStack.getDisplayName().toLowerCase().contains("saw")){
if (aStack.getItemDamage() == 10){
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java
index 0ba848a90d..aa687bfe71 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java
@@ -1,6 +1,7 @@
package gtPlusPlus.xmod.gregtech.common.items;
import static gtPlusPlus.core.util.Utils.getTcAspectStack;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.*;
import gregtech.api.interfaces.ITexture;
@@ -10,189 +11,190 @@ import gregtech.api.util.GT_OreDictUnificator;
import gregtech.common.covers.*;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.Utils;
-import gtPlusPlus.xmod.gregtech.api.enums.*;
+import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
+import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials;
import gtPlusPlus.xmod.gregtech.api.items.Gregtech_MetaItem_X32;
import net.minecraft.item.EnumAction;
public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
- public MetaGeneratedGregtechItems INSTANCE;
-
- public MetaGeneratedGregtechItems() {
- super("MU-metaitem.01", new OrePrefixes[]{null});
- INSTANCE = this;
- int tLastID = 0;
-
- if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){
- Utils.LOG_INFO("Gregtech 5.09 not found, using fallback components. (I like how I have to add compat to something I added first and had stolen.)");
- GregtechItemList.Electric_Pump_LuV.set(addItem(tLastID = 0, "Electric Pump (LuV)", "163920 L/sec (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)}));
- GregtechItemList.Electric_Pump_ZPM.set(addItem(tLastID = 1, "Electric Pump (ZPM)", "655680 L/sec (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.ITER, 2L), getTcAspectStack(TC_Aspects.AQUA, 2L)}));
- GregtechItemList.Electric_Pump_UV.set(addItem(tLastID = 2, "Electric Pump (UV)", "2622720 L/sec (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.ITER, 4L), getTcAspectStack(TC_Aspects.AQUA, 4L)}));
- GregtechItemList.Electric_Pump_MAX.set(addItem(tLastID = 3, "Electric Pump (MAX)", "10490880 L/sec (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.ITER, 8L), getTcAspectStack(TC_Aspects.AQUA, 8L)}));
- GregTech_API.registerCover(GregtechItemList.Electric_Pump_LuV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(8196));
- GregTech_API.registerCover(GregtechItemList.Electric_Pump_ZPM.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[6][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(32768));
- GregTech_API.registerCover(GregtechItemList.Electric_Pump_UV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[7][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(131072));
- GregTech_API.registerCover(GregtechItemList.Electric_Pump_MAX.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(524288));
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Pump_LuV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", Character.valueOf('M'), GregtechItemList.Electric_Motor_LuV, Character.valueOf('O'), OrePrefixes.ring.get(Materials.Rubber), Character.valueOf('X'), OrePrefixes.rotor.get(Materials.Tin), Character.valueOf('S'), OrePrefixes.screw.get(Materials.Tin), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.Tin), Character.valueOf('P'), OrePrefixes.pipeMedium.get(Materials.Bronze)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Pump_ZPM.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", Character.valueOf('M'), GregtechItemList.Electric_Motor_ZPM, Character.valueOf('O'), OrePrefixes.ring.get(Materials.Rubber), Character.valueOf('X'), OrePrefixes.rotor.get(Materials.Bronze), Character.valueOf('S'), OrePrefixes.screw.get(Materials.Bronze), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.AnyCopper), Character.valueOf('P'), OrePrefixes.pipeMedium.get(Materials.Steel)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Pump_UV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", Character.valueOf('M'), GregtechItemList.Electric_Motor_UV, Character.valueOf('O'), OrePrefixes.ring.get(Materials.Rubber), Character.valueOf('X'), OrePrefixes.rotor.get(Materials.Steel), Character.valueOf('S'), OrePrefixes.screw.get(Materials.Steel), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.Gold), Character.valueOf('P'), OrePrefixes.pipeMedium.get(Materials.StainlessSteel)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Pump_MAX.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", Character.valueOf('M'), GregtechItemList.Electric_Motor_MAX, Character.valueOf('O'), OrePrefixes.ring.get(Materials.Rubber), Character.valueOf('X'), OrePrefixes.rotor.get(Materials.StainlessSteel), Character.valueOf('S'), OrePrefixes.screw.get(Materials.StainlessSteel), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.Aluminium), Character.valueOf('P'), OrePrefixes.pipeMedium.get(Materials.Titanium)});
- tLastID = 4;
- GregtechItemList.Electric_Motor_LuV.set(addItem(tLastID = 4, "Electric Motor (LuV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.MOTUS, 1L)}));
- GregtechItemList.Electric_Motor_ZPM.set(addItem(tLastID = 5, "Electric Motor (ZPM)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.MOTUS, 2L)}));
- GregtechItemList.Electric_Motor_UV.set(addItem(tLastID = 6, "Electric Motor (UV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.MOTUS, 4L)}));
- GregtechItemList.Electric_Motor_MAX.set(addItem(tLastID = 7, "Electric Motor (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.MOTUS, 8L)}));
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Motor_LuV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", Character.valueOf('I'), OrePrefixes.stick.get(Materials.IronMagnetic), Character.valueOf('R'), OrePrefixes.stick.get(Materials.AnyIron), Character.valueOf('W'), OrePrefixes.wireGt01.get(Materials.AnyCopper), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Tin)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Motor_ZPM.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", Character.valueOf('I'), OrePrefixes.stick.get(Materials.SteelMagnetic), Character.valueOf('R'), OrePrefixes.stick.get(Materials.Aluminium), Character.valueOf('W'), OrePrefixes.wireGt01.get(Materials.Electrum), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Silver)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Motor_UV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", Character.valueOf('I'), OrePrefixes.stick.get(Materials.SteelMagnetic), Character.valueOf('R'), OrePrefixes.stick.get(Materials.StainlessSteel), Character.valueOf('W'), OrePrefixes.wireGt02.get(Materials.Cupronickel), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Gold)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Motor_MAX.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", Character.valueOf('I'), OrePrefixes.stick.get(Materials.NeodymiumMagnetic), Character.valueOf('R'), OrePrefixes.stick.get(Materials.Titanium), Character.valueOf('W'), OrePrefixes.wireGt02.get(Materials.TungstenSteel), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Nichrome)});
-
- tLastID = 8;
- GregtechItemList.Conveyor_Module_LuV.set(addItem(tLastID = 8, "Conveyor Module (LuV)", "1 Stack every 20 secs (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L)}));
- GregtechItemList.Conveyor_Module_ZPM.set(addItem(tLastID = 9, "Conveyor Module (ZPM)", "1 Stack every 5 secs (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.ITER, 2L)}));
- GregtechItemList.Conveyor_Module_UV.set(addItem(tLastID = 10, "Conveyor Module (UV)", "1 Stack every 1 sec (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.ITER, 4L)}));
- GregtechItemList.Conveyor_Module_MAX.set(addItem(tLastID = 11, "Conveyor Module (MAX)", "1 Stack every 1/5 sec (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.ITER, 8L)}));
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Conveyor_Module_LuV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", Character.valueOf('M'), GregtechItemList.Electric_Motor_LuV, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Tin), Character.valueOf('R'), OrePrefixes.plate.get(Materials.Rubber)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Conveyor_Module_ZPM.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", Character.valueOf('M'), GregtechItemList.Electric_Motor_ZPM, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.AnyCopper), Character.valueOf('R'), OrePrefixes.plate.get(Materials.Rubber)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Conveyor_Module_UV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", Character.valueOf('M'), GregtechItemList.Electric_Motor_UV, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Gold), Character.valueOf('R'), OrePrefixes.plate.get(Materials.Rubber)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Conveyor_Module_MAX.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", Character.valueOf('M'), GregtechItemList.Electric_Motor_MAX, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Aluminium), Character.valueOf('R'), OrePrefixes.plate.get(Materials.Rubber)});
- GregTech_API.registerCover(GregtechItemList.Conveyor_Module_LuV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(400));
- GregTech_API.registerCover(GregtechItemList.Conveyor_Module_ZPM.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(100));
- GregTech_API.registerCover(GregtechItemList.Conveyor_Module_UV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[3][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(20));
- GregTech_API.registerCover(GregtechItemList.Conveyor_Module_MAX.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(4));
- tLastID = 12;
- GregtechItemList.Electric_Piston_LuV.set(addItem(tLastID = 12, "Electric Piston (LuV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.MOTUS, 1L)}));
- GregtechItemList.Electric_Piston_ZPM.set(addItem(tLastID = 13, "Electric Piston (ZPM)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.MOTUS, 2L)}));
- GregtechItemList.Electric_Piston_UV.set(addItem(tLastID = 14, "Electric Piston (UV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.MOTUS, 4L)}));
- GregtechItemList.Electric_Piston_MAX.set(addItem(tLastID = 15, "Electric Piston (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 16L), getTcAspectStack(TC_Aspects.MOTUS, 8L)}));
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Piston_LuV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", Character.valueOf('P'), OrePrefixes.plate.get(Materials.Steel), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Steel), Character.valueOf('G'), OrePrefixes.gearGtSmall.get(Materials.Steel), Character.valueOf('M'), GregtechItemList.Electric_Motor_LuV, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Tin)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Piston_ZPM.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", Character.valueOf('P'), OrePrefixes.plate.get(Materials.Aluminium), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Aluminium), Character.valueOf('G'), OrePrefixes.gearGtSmall.get(Materials.Aluminium), Character.valueOf('M'), GregtechItemList.Electric_Motor_ZPM, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.AnyCopper)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Piston_UV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", Character.valueOf('P'), OrePrefixes.plate.get(Materials.StainlessSteel), Character.valueOf('S'), OrePrefixes.stick.get(Materials.StainlessSteel), Character.valueOf('G'), OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), Character.valueOf('M'), GregtechItemList.Electric_Motor_UV, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Gold)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Piston_MAX.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", Character.valueOf('P'), OrePrefixes.plate.get(Materials.Titanium), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Titanium), Character.valueOf('G'), OrePrefixes.gearGtSmall.get(Materials.Titanium), Character.valueOf('M'), GregtechItemList.Electric_Motor_MAX, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Aluminium)});
- tLastID = 16;
- GregtechItemList.Robot_Arm_LuV.set(addItem(tLastID = 16, "Robot Arm (LuV)", "Inserts into specific Slots (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.MOTUS, 1L), Utils.getTcAspectStack("COGNITIO", 1L)}));
- GregtechItemList.Robot_Arm_ZPM.set(addItem(tLastID = 17, "Robot Arm (ZPM)", "Inserts into specific Slots (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.MOTUS, 2L), getTcAspectStack("COGNITIO", 2L)}));
- GregtechItemList.Robot_Arm_UV.set(addItem(tLastID = 18, "Robot Arm (UV)", "Inserts into specific Slots (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.MOTUS, 4L), getTcAspectStack("COGNITIO", 4L)}));
- GregtechItemList.Robot_Arm_MAX.set(addItem(tLastID = 19, "Robot Arm (MAX)", "Inserts into specific Slots (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 16L), getTcAspectStack(TC_Aspects.MOTUS, 8L), getTcAspectStack("COGNITIO", 8L)}));
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Robot_Arm_LuV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", Character.valueOf('S'), OrePrefixes.stick.get(Materials.Steel), Character.valueOf('M'), GregtechItemList.Electric_Motor_LuV, Character.valueOf('P'), GregtechItemList.Electric_Piston_LuV, Character.valueOf('E'), OrePrefixes.circuit.get(Materials.Basic), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Tin)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Robot_Arm_ZPM.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", Character.valueOf('S'), OrePrefixes.stick.get(Materials.Aluminium), Character.valueOf('M'), GregtechItemList.Electric_Motor_ZPM, Character.valueOf('P'), GregtechItemList.Electric_Piston_ZPM, Character.valueOf('E'), OrePrefixes.circuit.get(Materials.Good), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.AnyCopper)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Robot_Arm_UV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", Character.valueOf('S'), OrePrefixes.stick.get(Materials.StainlessSteel), Character.valueOf('M'), GregtechItemList.Electric_Motor_UV, Character.valueOf('P'), GregtechItemList.Electric_Piston_UV, Character.valueOf('E'), OrePrefixes.circuit.get(Materials.Advanced), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Gold)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Robot_Arm_MAX.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", Character.valueOf('S'), OrePrefixes.stick.get(Materials.Titanium), Character.valueOf('M'), GregtechItemList.Electric_Motor_MAX, Character.valueOf('P'), GregtechItemList.Electric_Piston_MAX, Character.valueOf('E'), OrePrefixes.circuit.get(Materials.Elite), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Aluminium)});
- GregTech_API.registerCover(GregtechItemList.Robot_Arm_LuV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(400));
- GregTech_API.registerCover(GregtechItemList.Robot_Arm_ZPM.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(100));
- GregTech_API.registerCover(GregtechItemList.Robot_Arm_UV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[3][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(20));
- GregTech_API.registerCover(GregtechItemList.Robot_Arm_MAX.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(4));
- tLastID = 20;
- GregtechItemList.Field_Generator_LuV.set(addItem(tLastID = 20, "Field Generator (LuV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.TUTAMEN, 1L)}));
- GregtechItemList.Field_Generator_ZPM.set(addItem(tLastID = 21, "Field Generator (ZPM)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.TUTAMEN, 2L)}));
- GregtechItemList.Field_Generator_UV.set(addItem(tLastID = 22, "Field Generator (UV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.TUTAMEN, 4L)}));
- GregtechItemList.Field_Generator_MAX.set(addItem(tLastID = 23, "Field Generator (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 16L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.TUTAMEN, 8L)}));
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Field_Generator_LuV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", Character.valueOf('G'), OrePrefixes.gem.get(Materials.EnderPearl), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Basic), Character.valueOf('W'), OrePrefixes.wireGt01.get(Materials.Osmium)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Field_Generator_ZPM.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", Character.valueOf('G'), OrePrefixes.gem.get(Materials.EnderEye), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Good), Character.valueOf('W'), OrePrefixes.wireGt02.get(Materials.Osmium)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Field_Generator_UV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", Character.valueOf('G'), OrePrefixes.gem.get(Materials.NetherStar), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Advanced), Character.valueOf('W'), OrePrefixes.wireGt04.get(Materials.Osmium)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Field_Generator_MAX.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", Character.valueOf('G'), OrePrefixes.gem.get(Materials.NetherStar), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Elite), Character.valueOf('W'), OrePrefixes.wireGt08.get(Materials.Osmium)});
- tLastID = 24;
- GregtechItemList.Emitter_LuV.set(addItem(tLastID = 24, "Emitter (LuV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.LUX, 1L)}));
- GregtechItemList.Emitter_ZPM.set(addItem(tLastID = 25, "Emitter (ZPM)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.LUX, 2L)}));
- GregtechItemList.Emitter_UV.set(addItem(tLastID = 26, "Emitter (UV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.LUX, 4L)}));
- GregtechItemList.Emitter_MAX.set(addItem(tLastID = 27, "Emitter (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.LUX, 8L)}));
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Emitter_LuV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.Quartzite), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Brass), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Basic), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.Tin)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Emitter_ZPM.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.NetherQuartz), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Electrum), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Good), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.AnyCopper)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Emitter_UV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.Emerald), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Chrome), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Advanced), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.Gold)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Emitter_MAX.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.EnderPearl), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Platinum), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Elite), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.Aluminium)});
- tLastID = 28;
- GregtechItemList.Sensor_LuV.set(addItem(tLastID = 28, "Sensor (LuV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.SENSUS, 1L)}));
- GregtechItemList.Sensor_ZPM.set(addItem(tLastID = 29, "Sensor (ZPM)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.SENSUS, 2L)}));
- GregtechItemList.Sensor_UV.set(addItem(tLastID = 30, "Sensor (UV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.SENSUS, 4L)}));
- GregtechItemList.Sensor_MAX.set(addItem(tLastID = 31, "Sensor (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.SENSUS, 8L)}));
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Sensor_LuV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.Quartzite), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Brass), Character.valueOf('P'), OrePrefixes.plate.get(Materials.Steel), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Basic)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Sensor_ZPM.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.NetherQuartz), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Electrum), Character.valueOf('P'), OrePrefixes.plate.get(Materials.Aluminium), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Good)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Sensor_UV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.Emerald), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Chrome), Character.valueOf('P'), OrePrefixes.plate.get(Materials.StainlessSteel), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Advanced)});
- //GT_ModHandler.addCraftingRecipe(GregtechItemList.Sensor_MAX.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.EnderPearl), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Platinum), Character.valueOf('P'), OrePrefixes.plate.get(Materials.Titanium), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Elite)});
-
- }
-
- else {
- GregtechItemList.Electric_Pump_MAX.set(addItem(tLastID = 3, "Electric Pump (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.ITER, 8L), getTcAspectStack(TC_Aspects.AQUA, 8L)}));
- GregtechItemList.Electric_Motor_MAX.set(addItem(tLastID = 7, "Electric Motor (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.MOTUS, 8L)}));
- GregtechItemList.Conveyor_Module_MAX.set(addItem(tLastID = 11, "Conveyor Module (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.ITER, 8L)}));
- GregtechItemList.Electric_Piston_MAX.set(addItem(tLastID = 15, "Electric Piston (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 16L), getTcAspectStack(TC_Aspects.MOTUS, 8L)}));
- GregtechItemList.Robot_Arm_MAX.set(addItem(tLastID = 19, "Robot Arm (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 16L), getTcAspectStack(TC_Aspects.MOTUS, 8L), getTcAspectStack("COGNITIO", 8L)}));
- GregtechItemList.Field_Generator_MAX.set(addItem(tLastID = 23, "Field Generator (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 16L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.TUTAMEN, 8L)}));
- GregtechItemList.Emitter_MAX.set(addItem(tLastID = 27, "Emitter (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.LUX, 8L)}));
- GregtechItemList.Sensor_MAX.set(addItem(tLastID = 31, "Sensor (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.SENSUS, 8L)}));
-
- }
-
- GregtechItemList.Circuit_IV.set(addItem(tLastID = 704, "Symbiotic Circuit (IV)", "A Symbiotic Data Processor", new Object[]{GregtechOrePrefixes.circuit.get(GT_Materials.Symbiotic)}));
- GregtechItemList.Circuit_LuV.set(addItem(tLastID = 705, "Neutronic Circuit (LuV)", "A Neutron Particle Processor", new Object[]{GregtechOrePrefixes.circuit.get(GT_Materials.Neutronic)}));
- GregtechItemList.Circuit_ZPM.set(addItem(tLastID = 706, "Quantum Circuit (ZPM)", "A Singlularity Processor", new Object[]{GregtechOrePrefixes.circuit.get(GT_Materials.Quantum)}));
- GregtechItemList.Circuit_Board_IV.set(addItem(tLastID = 710, "IV Circuit Board", "An IV Voltage Rated Circuit Board", new Object[0]));
- GregtechItemList.Circuit_Board_LuV.set(addItem(tLastID = 711, "LuV Circuit Board", "An LuV Voltage Rated Circuit Board", new Object[0]));
- GregtechItemList.Circuit_Board_ZPM.set(addItem(tLastID = 712, "ZPM Processor Board", "A ZPM Voltage Rated Processor Board", new Object[0]));
- GregtechItemList.Circuit_Parts_Crystal_Chip_IV.set(addItem(tLastID = 713, "(IV) Energized Crystal Chip", "Needed for Circuits", new Object[0]));
- GregtechItemList.Circuit_Parts_Crystal_Chip_LuV.set(addItem(tLastID = 714, "(LuV) Neutron based Microchip", "Needed for Circuits", new Object[0]));
- GregtechItemList.Circuit_Parts_Crystal_Chip_ZPM.set(addItem(tLastID = 715, "(ZPM) Quantum Chip", "Needed for Circuits", new Object[0]));
- GregtechItemList.Circuit_Parts_IV.set(addItem(tLastID = 716, "(IV) Energized Circuit Parts", "Circuit Parts", new Object[0]));
- GregtechItemList.Circuit_Parts_LuV.set(addItem(tLastID = 717, "(LuV) Neutron-based Circuit Parts", "Circuit Parts", new Object[0]));
- GregtechItemList.Circuit_Parts_ZPM.set(addItem(tLastID = 718, "(ZPM) Quantum Circuit Parts", "Circuit Parts", new Object[0]));
- GregtechItemList.Circuit_Parts_Wiring_IV.set(addItem(tLastID = 719, "Etched IV Voltage Wiring", "Part of Circuit Boards", new Object[0]));
- GregtechItemList.Circuit_Parts_Wiring_LuV.set(addItem(tLastID = 720, "Etched LuV Voltage Wiring", "Part of Circuit Boards", new Object[0]));
- GregtechItemList.Circuit_Parts_Wiring_ZPM.set(addItem(tLastID = 721, "Etched ZPM Voltage Wiring", "Part of Circuit Boards", new Object[0]));
-
-
-
-
- //Extruder Shape
- GregtechItemList.Shape_Extruder_WindmillShaft.set(addItem(tLastID = 40, "Extruder Shape (Shaft)", "Extruder Shape for making Windmill Shafts", new Object[0]));
-
-
- //Batteries
- GregtechItemList.Battery_RE_EV_Sodium.set(addItem(tLastID = 50, "Quad Cell Sodium Battery", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.METALLUM, 2L), getTcAspectStack(TC_Aspects.POTENTIA, 2L)}));
- setElectricStats(32000 + tLastID, 3200000L, GT_Values.V[4], 4L, -3L, true);
-
- GregtechItemList.Battery_RE_EV_Cadmium.set(addItem(tLastID = 52, "Quad Cell Cadmium Battery", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.METALLUM, 1L), getTcAspectStack(TC_Aspects.POTENTIA, 1L)}));
- setElectricStats(32000 + tLastID, 4800000L, GT_Values.V[4], 4L, -3L, true);
-
- GregtechItemList.Battery_RE_EV_Lithium.set(addItem(tLastID = 54, "Quad Cell Lithium Battery", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 3L), getTcAspectStack(TC_Aspects.METALLUM, 3L), getTcAspectStack(TC_Aspects.POTENTIA, 3L)}));
- setElectricStats(32000 + tLastID, 6400000L, GT_Values.V[4], 4L, -3L, true);
-
- /*GregtechItemList.Battery_RE_EV_Sodium.set(addItem(tLastID = 50, "Quad Cell Acid Battery", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.METALLUM, 1L), getTcAspectStack(TC_Aspects.POTENTIA, 1L)}));
+ public MetaGeneratedGregtechItems INSTANCE;
+
+ public MetaGeneratedGregtechItems() {
+ super("MU-metaitem.01", new OrePrefixes[]{null});
+ this.INSTANCE = this;
+ int tLastID = 0;
+
+ if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){
+ Utils.LOG_INFO("Gregtech 5.09 not found, using fallback components. (I like how I have to add compat to something I added first and had stolen.)");
+ GregtechItemList.Electric_Pump_LuV.set(this.addItem(tLastID = 0, "Electric Pump (LuV)", "163920 L/sec (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)}));
+ GregtechItemList.Electric_Pump_ZPM.set(this.addItem(tLastID = 1, "Electric Pump (ZPM)", "655680 L/sec (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.ITER, 2L), getTcAspectStack(TC_Aspects.AQUA, 2L)}));
+ GregtechItemList.Electric_Pump_UV.set(this.addItem(tLastID = 2, "Electric Pump (UV)", "2622720 L/sec (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.ITER, 4L), getTcAspectStack(TC_Aspects.AQUA, 4L)}));
+ GregtechItemList.Electric_Pump_MAX.set(this.addItem(tLastID = 3, "Electric Pump (MAX)", "10490880 L/sec (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.ITER, 8L), getTcAspectStack(TC_Aspects.AQUA, 8L)}));
+ GregTech_API.registerCover(GregtechItemList.Electric_Pump_LuV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(8196));
+ GregTech_API.registerCover(GregtechItemList.Electric_Pump_ZPM.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[6][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(32768));
+ GregTech_API.registerCover(GregtechItemList.Electric_Pump_UV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[7][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(131072));
+ GregTech_API.registerCover(GregtechItemList.Electric_Pump_MAX.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(524288));
+ //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Pump_LuV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", Character.valueOf('M'), GregtechItemList.Electric_Motor_LuV, Character.valueOf('O'), OrePrefixes.ring.get(Materials.Rubber), Character.valueOf('X'), OrePrefixes.rotor.get(Materials.Tin), Character.valueOf('S'), OrePrefixes.screw.get(Materials.Tin), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.Tin), Character.valueOf('P'), OrePrefixes.pipeMedium.get(Materials.Bronze)});
+ //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Pump_ZPM.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", Character.valueOf('M'), GregtechItemList.Electric_Motor_ZPM, Character.valueOf('O'), OrePrefixes.ring.get(Materials.Rubber), Character.valueOf('X'), OrePrefixes.rotor.get(Materials.Bronze), Character.valueOf('S'), OrePrefixes.screw.get(Materials.Bronze), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.AnyCopper), Character.valueOf('P'), OrePrefixes.pipeMedium.get(Materials.Steel)});
+ //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Pump_UV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", Character.valueOf('M'), GregtechItemList.Electric_Motor_UV, Character.valueOf('O'), OrePrefixes.ring.get(Materials.Rubber), Character.valueOf('X'), OrePrefixes.rotor.get(Materials.Steel), Character.valueOf('S'), OrePrefixes.screw.get(Materials.Steel), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.Gold), Character.valueOf('P'), OrePrefixes.pipeMedium.get(Materials.StainlessSteel)});
+ //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Pump_MAX.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", Character.valueOf('M'), GregtechItemList.Electric_Motor_MAX, Character.valueOf('O'), OrePrefixes.ring.get(Materials.Rubber), Character.valueOf('X'), OrePrefixes.rotor.get(Materials.StainlessSteel), Character.valueOf('S'), OrePrefixes.screw.get(Materials.StainlessSteel), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.Aluminium), Character.valueOf('P'), OrePrefixes.pipeMedium.get(Materials.Titanium)});
+ tLastID = 4;
+ GregtechItemList.Electric_Motor_LuV.set(this.addItem(tLastID = 4, "Electric Motor (LuV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.MOTUS, 1L)}));
+ GregtechItemList.Electric_Motor_ZPM.set(this.addItem(tLastID = 5, "Electric Motor (ZPM)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.MOTUS, 2L)}));
+ GregtechItemList.Electric_Motor_UV.set(this.addItem(tLastID = 6, "Electric Motor (UV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.MOTUS, 4L)}));
+ GregtechItemList.Electric_Motor_MAX.set(this.addItem(tLastID = 7, "Electric Motor (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.MOTUS, 8L)}));
+ //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Motor_LuV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", Character.valueOf('I'), OrePrefixes.stick.get(Materials.IronMagnetic), Character.valueOf('R'), OrePrefixes.stick.get(Materials.AnyIron), Character.valueOf('W'), OrePrefixes.wireGt01.get(Materials.AnyCopper), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Tin)});
+ //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Motor_ZPM.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", Character.valueOf('I'), OrePrefixes.stick.get(Materials.SteelMagnetic), Character.valueOf('R'), OrePrefixes.stick.get(Materials.Aluminium), Character.valueOf('W'), OrePrefixes.wireGt01.get(Materials.Electrum), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Silver)});
+ //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Motor_UV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", Character.valueOf('I'), OrePrefixes.stick.get(Materials.SteelMagnetic), Character.valueOf('R'), OrePrefixes.stick.get(Materials.StainlessSteel), Character.valueOf('W'), OrePrefixes.wireGt02.get(Materials.Cupronickel), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Gold)});
+ //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Motor_MAX.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CWR", "WIW", "RWC", Character.valueOf('I'), OrePrefixes.stick.get(Materials.NeodymiumMagnetic), Character.valueOf('R'), OrePrefixes.stick.get(Materials.Titanium), Character.valueOf('W'), OrePrefixes.wireGt02.get(Materials.TungstenSteel), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Nichrome)});
+
+ tLastID = 8;
+ GregtechItemList.Conveyor_Module_LuV.set(this.addItem(tLastID = 8, "Conveyor Module (LuV)", "1 Stack every 20 secs (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L)}));
+ GregtechItemList.Conveyor_Module_ZPM.set(this.addItem(tLastID = 9, "Conveyor Module (ZPM)", "1 Stack every 5 secs (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.ITER, 2L)}));
+ GregtechItemList.Conveyor_Module_UV.set(this.addItem(tLastID = 10, "Conveyor Module (UV)", "1 Stack every 1 sec (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.ITER, 4L)}));
+ GregtechItemList.Conveyor_Module_MAX.set(this.addItem(tLastID = 11, "Conveyor Module (MAX)", "1 Stack every 1/5 sec (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.ITER, 8L)}));
+ //GT_ModHandler.addCraftingRecipe(GregtechItemList.Conveyor_Module_LuV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", Character.valueOf('M'), GregtechItemList.Electric_Motor_LuV, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Tin), Character.valueOf('R'), OrePrefixes.plate.get(Materials.Rubber)});
+ //GT_ModHandler.addCraftingRecipe(GregtechItemList.Conveyor_Module_ZPM.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", Character.valueOf('M'), GregtechItemList.Electric_Motor_ZPM, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.AnyCopper), Character.valueOf('R'), OrePrefixes.plate.get(Materials.Rubber)});
+ //GT_ModHandler.addCraftingRecipe(GregtechItemList.Conveyor_Module_UV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", Character.valueOf('M'), GregtechItemList.Electric_Motor_UV, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Gold), Character.valueOf('R'), OrePrefixes.plate.get(Materials.Rubber)});
+ //GT_ModHandler.addCraftingRecipe(GregtechItemList.Conveyor_Module_MAX.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "MCM", "RRR", Character.valueOf('M'), GregtechItemList.Electric_Motor_MAX, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Aluminium), Character.valueOf('R'), OrePrefixes.plate.get(Materials.Rubber)});
+ GregTech_API.registerCover(GregtechItemList.Conveyor_Module_LuV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(400));
+ GregTech_API.registerCover(GregtechItemList.Conveyor_Module_ZPM.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(100));
+ GregTech_API.registerCover(GregtechItemList.Conveyor_Module_UV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[3][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(20));
+ GregTech_API.registerCover(GregtechItemList.Conveyor_Module_MAX.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR)}), new GT_Cover_Conveyor(4));
+ tLastID = 12;
+ GregtechItemList.Electric_Piston_LuV.set(this.addItem(tLastID = 12, "Electric Piston (LuV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.MOTUS, 1L)}));
+ GregtechItemList.Electric_Piston_ZPM.set(this.addItem(tLastID = 13, "Electric Piston (ZPM)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.MOTUS, 2L)}));
+ GregtechItemList.Electric_Piston_UV.set(this.addItem(tLastID = 14, "Electric Piston (UV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.MOTUS, 4L)}));
+ GregtechItemList.Electric_Piston_MAX.set(this.addItem(tLastID = 15, "Electric Piston (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 16L), getTcAspectStack(TC_Aspects.MOTUS, 8L)}));
+ //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Piston_LuV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", Character.valueOf('P'), OrePrefixes.plate.get(Materials.Steel), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Steel), Character.valueOf('G'), OrePrefixes.gearGtSmall.get(Materials.Steel), Character.valueOf('M'), GregtechItemList.Electric_Motor_LuV, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Tin)});
+ //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Piston_ZPM.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", Character.valueOf('P'), OrePrefixes.plate.get(Materials.Aluminium), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Aluminium), Character.valueOf('G'), OrePrefixes.gearGtSmall.get(Materials.Aluminium), Character.valueOf('M'), GregtechItemList.Electric_Motor_ZPM, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.AnyCopper)});
+ //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Piston_UV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", Character.valueOf('P'), OrePrefixes.plate.get(Materials.StainlessSteel), Character.valueOf('S'), OrePrefixes.stick.get(Materials.StainlessSteel), Character.valueOf('G'), OrePrefixes.gearGtSmall.get(Materials.StainlessSteel), Character.valueOf('M'), GregtechItemList.Electric_Motor_UV, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Gold)});
+ //GT_ModHandler.addCraftingRecipe(GregtechItemList.Electric_Piston_MAX.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"PPP", "CSS", "CMG", Character.valueOf('P'), OrePrefixes.plate.get(Materials.Titanium), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Titanium), Character.valueOf('G'), OrePrefixes.gearGtSmall.get(Materials.Titanium), Character.valueOf('M'), GregtechItemList.Electric_Motor_MAX, Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Aluminium)});
+ tLastID = 16;
+ GregtechItemList.Robot_Arm_LuV.set(this.addItem(tLastID = 16, "Robot Arm (LuV)", "Inserts into specific Slots (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.MOTUS, 1L), Utils.getTcAspectStack("COGNITIO", 1L)}));
+ GregtechItemList.Robot_Arm_ZPM.set(this.addItem(tLastID = 17, "Robot Arm (ZPM)", "Inserts into specific Slots (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.MOTUS, 2L), getTcAspectStack("COGNITIO", 2L)}));
+ GregtechItemList.Robot_Arm_UV.set(this.addItem(tLastID = 18, "Robot Arm (UV)", "Inserts into specific Slots (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.MOTUS, 4L), getTcAspectStack("COGNITIO", 4L)}));
+ GregtechItemList.Robot_Arm_MAX.set(this.addItem(tLastID = 19, "Robot Arm (MAX)", "Inserts into specific Slots (as Cover)", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 16L), getTcAspectStack(TC_Aspects.MOTUS, 8L), getTcAspectStack("COGNITIO", 8L)}));
+ //GT_ModHandler.addCraftingRecipe(GregtechItemList.Robot_Arm_LuV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", Character.valueOf('S'), OrePrefixes.stick.get(Materials.Steel), Character.valueOf('M'), GregtechItemList.Electric_Motor_LuV, Character.valueOf('P'), GregtechItemList.Electric_Piston_LuV, Character.valueOf('E'), OrePrefixes.circuit.get(Materials.Basic), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Tin)});
+ //GT_ModHandler.addCraftingRecipe(GregtechItemList.Robot_Arm_ZPM.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", Character.valueOf('S'), OrePrefixes.stick.get(Materials.Aluminium), Character.valueOf('M'), GregtechItemList.Electric_Motor_ZPM, Character.valueOf('P'), GregtechItemList.Electric_Piston_ZPM, Character.valueOf('E'), OrePrefixes.circuit.get(Materials.Good), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.AnyCopper)});
+ //GT_ModHandler.addCraftingRecipe(GregtechItemList.Robot_Arm_UV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", Character.valueOf('S'), OrePrefixes.stick.get(Materials.StainlessSteel), Character.valueOf('M'), GregtechItemList.Electric_Motor_UV, Character.valueOf('P'), GregtechItemList.Electric_Piston_UV, Character.valueOf('E'), OrePrefixes.circuit.get(Materials.Advanced), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Gold)});
+ //GT_ModHandler.addCraftingRecipe(GregtechItemList.Robot_Arm_MAX.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"CCC", "MSM", "PES", Character.valueOf('S'), OrePrefixes.stick.get(Materials.Titanium), Character.valueOf('M'), GregtechItemList.Electric_Motor_MAX, Character.valueOf('P'), GregtechItemList.Electric_Piston_MAX, Character.valueOf('E'), OrePrefixes.circuit.get(Materials.Elite), Character.valueOf('C'), OrePrefixes.cableGt01.get(Materials.Aluminium)});
+ GregTech_API.registerCover(GregtechItemList.Robot_Arm_LuV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(400));
+ GregTech_API.registerCover(GregtechItemList.Robot_Arm_ZPM.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(100));
+ GregTech_API.registerCover(GregtechItemList.Robot_Arm_UV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[3][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(20));
+ GregTech_API.registerCover(GregtechItemList.Robot_Arm_MAX.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM)}), new GT_Cover_Arm(4));
+ tLastID = 20;
+ GregtechItemList.Field_Generator_LuV.set(this.addItem(tLastID = 20, "Field Generator (LuV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.TUTAMEN, 1L)}));
+ GregtechItemList.Field_Generator_ZPM.set(this.addItem(tLastID = 21, "Field Generator (ZPM)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.TUTAMEN, 2L)}));
+ GregtechItemList.Field_Generator_UV.set(this.addItem(tLastID = 22, "Field Generator (UV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.TUTAMEN, 4L)}));
+ GregtechItemList.Field_Generator_MAX.set(this.addItem(tLastID = 23, "Field Generator (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 16L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.TUTAMEN, 8L)}));
+ //GT_ModHandler.addCraftingRecipe(GregtechItemList.Field_Generator_LuV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", Character.valueOf('G'), OrePrefixes.gem.get(Materials.EnderPearl), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Basic), Character.valueOf('W'), OrePrefixes.wireGt01.get(Materials.Osmium)});
+ //GT_ModHandler.addCraftingRecipe(GregtechItemList.Field_Generator_ZPM.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", Character.valueOf('G'), OrePrefixes.gem.get(Materials.EnderEye), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Good), Character.valueOf('W'), OrePrefixes.wireGt02.get(Materials.Osmium)});
+ //GT_ModHandler.addCraftingRecipe(GregtechItemList.Field_Generator_UV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", Character.valueOf('G'), OrePrefixes.gem.get(Materials.NetherStar), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Advanced), Character.valueOf('W'), OrePrefixes.wireGt04.get(Materials.Osmium)});
+ //GT_ModHandler.addCraftingRecipe(GregtechItemList.Field_Generator_MAX.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"WCW", "CGC", "WCW", Character.valueOf('G'), OrePrefixes.gem.get(Materials.NetherStar), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Elite), Character.valueOf('W'), OrePrefixes.wireGt08.get(Materials.Osmium)});
+ tLastID = 24;
+ GregtechItemList.Emitter_LuV.set(this.addItem(tLastID = 24, "Emitter (LuV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.LUX, 1L)}));
+ GregtechItemList.Emitter_ZPM.set(this.addItem(tLastID = 25, "Emitter (ZPM)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.LUX, 2L)}));
+ GregtechItemList.Emitter_UV.set(this.addItem(tLastID = 26, "Emitter (UV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.LUX, 4L)}));
+ GregtechItemList.Emitter_MAX.set(this.addItem(tLastID = 27, "Emitter (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.LUX, 8L)}));
+ //GT_ModHandler.addCraftingRecipe(GregtechItemList.Emitter_LuV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.Quartzite), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Brass), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Basic), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.Tin)});
+ //GT_ModHandler.addCraftingRecipe(GregtechItemList.Emitter_ZPM.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.NetherQuartz), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Electrum), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Good), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.AnyCopper)});
+ //GT_ModHandler.addCraftingRecipe(GregtechItemList.Emitter_UV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.Emerald), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Chrome), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Advanced), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.Gold)});
+ //GT_ModHandler.addCraftingRecipe(GregtechItemList.Emitter_MAX.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSC", "WQS", "CWS", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.EnderPearl), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Platinum), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Elite), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.Aluminium)});
+ tLastID = 28;
+ GregtechItemList.Sensor_LuV.set(this.addItem(tLastID = 28, "Sensor (LuV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.SENSUS, 1L)}));
+ GregtechItemList.Sensor_ZPM.set(this.addItem(tLastID = 29, "Sensor (ZPM)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.MACHINA, 2L), getTcAspectStack(TC_Aspects.SENSUS, 2L)}));
+ GregtechItemList.Sensor_UV.set(this.addItem(tLastID = 30, "Sensor (UV)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 4L), getTcAspectStack(TC_Aspects.MACHINA, 4L), getTcAspectStack(TC_Aspects.SENSUS, 4L)}));
+ GregtechItemList.Sensor_MAX.set(this.addItem(tLastID = 31, "Sensor (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.SENSUS, 8L)}));
+ //GT_ModHandler.addCraftingRecipe(GregtechItemList.Sensor_LuV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.Quartzite), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Brass), Character.valueOf('P'), OrePrefixes.plate.get(Materials.Steel), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Basic)});
+ //GT_ModHandler.addCraftingRecipe(GregtechItemList.Sensor_ZPM.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.NetherQuartz), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Electrum), Character.valueOf('P'), OrePrefixes.plate.get(Materials.Aluminium), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Good)});
+ //GT_ModHandler.addCraftingRecipe(GregtechItemList.Sensor_UV.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.Emerald), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Chrome), Character.valueOf('P'), OrePrefixes.plate.get(Materials.StainlessSteel), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Advanced)});
+ //GT_ModHandler.addCraftingRecipe(GregtechItemList.Sensor_MAX.get(1L, new Object[0]), //GT_ModHandler.RecipeBits.DISMANTLEABLE | //GT_ModHandler.RecipeBits.NOT_REMOVABLE | //GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", Character.valueOf('Q'), OrePrefixes.gem.get(Materials.EnderPearl), Character.valueOf('S'), OrePrefixes.stick.get(Materials.Platinum), Character.valueOf('P'), OrePrefixes.plate.get(Materials.Titanium), Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Elite)});
+
+ }
+
+ else {
+ GregtechItemList.Electric_Pump_MAX.set(this.addItem(tLastID = 3, "Electric Pump (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.ITER, 8L), getTcAspectStack(TC_Aspects.AQUA, 8L)}));
+ GregtechItemList.Electric_Motor_MAX.set(this.addItem(tLastID = 7, "Electric Motor (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.MOTUS, 8L)}));
+ GregtechItemList.Conveyor_Module_MAX.set(this.addItem(tLastID = 11, "Conveyor Module (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.ITER, 8L)}));
+ GregtechItemList.Electric_Piston_MAX.set(this.addItem(tLastID = 15, "Electric Piston (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 16L), getTcAspectStack(TC_Aspects.MOTUS, 8L)}));
+ GregtechItemList.Robot_Arm_MAX.set(this.addItem(tLastID = 19, "Robot Arm (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 16L), getTcAspectStack(TC_Aspects.MOTUS, 8L), getTcAspectStack("COGNITIO", 8L)}));
+ GregtechItemList.Field_Generator_MAX.set(this.addItem(tLastID = 23, "Field Generator (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 16L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.TUTAMEN, 8L)}));
+ GregtechItemList.Emitter_MAX.set(this.addItem(tLastID = 27, "Emitter (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.LUX, 8L)}));
+ GregtechItemList.Sensor_MAX.set(this.addItem(tLastID = 31, "Sensor (MAX)", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.SENSUS, 8L)}));
+
+ }
+
+ GregtechItemList.Circuit_IV.set(this.addItem(tLastID = 704, "Symbiotic Circuit (IV)", "A Symbiotic Data Processor", new Object[]{GregtechOrePrefixes.circuit.get(GT_Materials.Symbiotic)}));
+ GregtechItemList.Circuit_LuV.set(this.addItem(tLastID = 705, "Neutronic Circuit (LuV)", "A Neutron Particle Processor", new Object[]{GregtechOrePrefixes.circuit.get(GT_Materials.Neutronic)}));
+ GregtechItemList.Circuit_ZPM.set(this.addItem(tLastID = 706, "Quantum Circuit (ZPM)", "A Singlularity Processor", new Object[]{GregtechOrePrefixes.circuit.get(GT_Materials.Quantum)}));
+ GregtechItemList.Circuit_Board_IV.set(this.addItem(tLastID = 710, "IV Circuit Board", "An IV Voltage Rated Circuit Board", new Object[0]));
+ GregtechItemList.Circuit_Board_LuV.set(this.addItem(tLastID = 711, "LuV Circuit Board", "An LuV Voltage Rated Circuit Board", new Object[0]));
+ GregtechItemList.Circuit_Board_ZPM.set(this.addItem(tLastID = 712, "ZPM Processor Board", "A ZPM Voltage Rated Processor Board", new Object[0]));
+ GregtechItemList.Circuit_Parts_Crystal_Chip_IV.set(this.addItem(tLastID = 713, "(IV) Energized Crystal Chip", "Needed for Circuits", new Object[0]));
+ GregtechItemList.Circuit_Parts_Crystal_Chip_LuV.set(this.addItem(tLastID = 714, "(LuV) Neutron based Microchip", "Needed for Circuits", new Object[0]));
+ GregtechItemList.Circuit_Parts_Crystal_Chip_ZPM.set(this.addItem(tLastID = 715, "(ZPM) Quantum Chip", "Needed for Circuits", new Object[0]));
+ GregtechItemList.Circuit_Parts_IV.set(this.addItem(tLastID = 716, "(IV) Energized Circuit Parts", "Circuit Parts", new Object[0]));
+ GregtechItemList.Circuit_Parts_LuV.set(this.addItem(tLastID = 717, "(LuV) Neutron-based Circuit Parts", "Circuit Parts", new Object[0]));
+ GregtechItemList.Circuit_Parts_ZPM.set(this.addItem(tLastID = 718, "(ZPM) Quantum Circuit Parts", "Circuit Parts", new Object[0]));
+ GregtechItemList.Circuit_Parts_Wiring_IV.set(this.addItem(tLastID = 719, "Etched IV Voltage Wiring", "Part of Circuit Boards", new Object[0]));
+ GregtechItemList.Circuit_Parts_Wiring_LuV.set(this.addItem(tLastID = 720, "Etched LuV Voltage Wiring", "Part of Circuit Boards", new Object[0]));
+ GregtechItemList.Circuit_Parts_Wiring_ZPM.set(this.addItem(tLastID = 721, "Etched ZPM Voltage Wiring", "Part of Circuit Boards", new Object[0]));
+
+
+
+
+ //Extruder Shape
+ GregtechItemList.Shape_Extruder_WindmillShaft.set(this.addItem(tLastID = 40, "Extruder Shape (Shaft)", "Extruder Shape for making Windmill Shafts", new Object[0]));
+
+
+ //Batteries
+ GregtechItemList.Battery_RE_EV_Sodium.set(this.addItem(tLastID = 50, "Quad Cell Sodium Battery", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 2L), getTcAspectStack(TC_Aspects.METALLUM, 2L), getTcAspectStack(TC_Aspects.POTENTIA, 2L)}));
+ this.setElectricStats(32000 + tLastID, 3200000L, GT_Values.V[4], 4L, -3L, true);
+
+ GregtechItemList.Battery_RE_EV_Cadmium.set(this.addItem(tLastID = 52, "Quad Cell Cadmium Battery", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.METALLUM, 1L), getTcAspectStack(TC_Aspects.POTENTIA, 1L)}));
+ this.setElectricStats(32000 + tLastID, 4800000L, GT_Values.V[4], 4L, -3L, true);
+
+ GregtechItemList.Battery_RE_EV_Lithium.set(this.addItem(tLastID = 54, "Quad Cell Lithium Battery", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 3L), getTcAspectStack(TC_Aspects.METALLUM, 3L), getTcAspectStack(TC_Aspects.POTENTIA, 3L)}));
+ this.setElectricStats(32000 + tLastID, 6400000L, GT_Values.V[4], 4L, -3L, true);
+
+ /*GregtechItemList.Battery_RE_EV_Sodium.set(addItem(tLastID = 50, "Quad Cell Acid Battery", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.METALLUM, 1L), getTcAspectStack(TC_Aspects.POTENTIA, 1L)}));
setElectricStats(32000 + tLastID, 5000000L, GT_Values.V[2], 4L, -3L, true);
GregtechItemList.Battery_RE_EV_Sodium.set(addItem(tLastID = 50, "Quad Cell Mercury Battery", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.METALLUM, 1L), getTcAspectStack(TC_Aspects.POTENTIA, 1L)}));
setElectricStats(32000 + tLastID, 5000000L, GT_Values.V[2], 4L, -3L, true);*/
-
-
- //FOOOOOOOOOOOOOOD
- GregtechItemList.Food_Baked_Raisin_Bread.set(addItem(tLastID = 60, "Raisin Bread", "Extra Raisins, Just for ImQ009", new Object[]{new GT_FoodStat(5, 0.5F, EnumAction.eat, null, false, true, false, new int[0]), getTcAspectStack(TC_Aspects.CORPUS, 1L), getTcAspectStack(TC_Aspects.FAMES, 1L), getTcAspectStack(TC_Aspects.IGNIS, 1L)}));
-
-
-
- GregtechItemList.Fluid_Cell_144L.set(addItem(tLastID = 61, "144L Invar Fluid Cell", "Holds exactly one dust worth of liquid.", new Object[]{new ItemData(Materials.Invar, OrePrefixes.plate.mMaterialAmount * 8L + 4L * OrePrefixes.ring.mMaterialAmount, new MaterialStack[0]), getTcAspectStack(TC_Aspects.VACUOS, 2L), getTcAspectStack(TC_Aspects.AQUA, 1L)}));
- setFluidContainerStats(32000 + tLastID, 144L, 64L);
-
- GregtechItemList.Fluid_Cell_36L.set(addItem(tLastID = 62, "36L Brass Fluid Cell", "Holds exactly one small dust worth of liquid.", new Object[]{new ItemData(Materials.Brass, OrePrefixes.plate.mMaterialAmount * 8L + 4L * OrePrefixes.ring.mMaterialAmount, new MaterialStack[0]), getTcAspectStack(TC_Aspects.VACUOS, 2L), getTcAspectStack(TC_Aspects.AQUA, 1L)}));
- setFluidContainerStats(32000 + tLastID, 36L, 64L);
-
- GregtechItemList.Fluid_Cell_16L.set(addItem(tLastID = 63, "16L Bronze Fluid Cell", "Holds exactly one tiny dust / nugget worth of liquid.", new Object[]{new ItemData(Materials.Bronze, OrePrefixes.plate.mMaterialAmount * 8L + 4L * OrePrefixes.ring.mMaterialAmount, new MaterialStack[0]), getTcAspectStack(TC_Aspects.VACUOS, 2L), getTcAspectStack(TC_Aspects.AQUA, 1L)}));
- setFluidContainerStats(32000 + tLastID, 16L, 64L);
-
- GregtechItemList.Fluid_Cell_1L.set(addItem(tLastID = 64, "1L Wrought Iron Fluid Cell", "Holds exactly one litre worth of liquid.", new Object[]{new ItemData(Materials.WroughtIron, OrePrefixes.plate.mMaterialAmount * 8L + 4L * OrePrefixes.ring.mMaterialAmount, new MaterialStack[0]), getTcAspectStack(TC_Aspects.VACUOS, 2L), getTcAspectStack(TC_Aspects.AQUA, 1L)}));
- setFluidContainerStats(32000 + tLastID, 1L, 64L);
-
- if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.WroughtIron, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.WroughtIron, 2L), GregtechItemList.Fluid_Cell_1L.get(1L, new Object[0]), 50, 32);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Bronze, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Bronze, 2L), GregtechItemList.Fluid_Cell_16L.get(1L, new Object[0]), 50, 32);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Brass, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Brass, 2L), GregtechItemList.Fluid_Cell_36L.get(1L, new Object[0]), 75, 32);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Invar, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Invar, 2L), GregtechItemList.Fluid_Cell_144L.get(1L, new Object[0]), 75, 32);
-
- }
- else {
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 8L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.WroughtIron, 4L), GregtechItemList.Fluid_Cell_1L.get(1L, new Object[0]), 50, 32);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Bronze, 8L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Bronze, 4L), GregtechItemList.Fluid_Cell_16L.get(1L, new Object[0]), 50, 32);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Brass, 8L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Brass, 4L), GregtechItemList.Fluid_Cell_36L.get(1L, new Object[0]), 75, 32);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Invar, 8L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Invar, 4L), GregtechItemList.Fluid_Cell_144L.get(1L, new Object[0]), 75, 32);
- }
- }
+
+
+ //FOOOOOOOOOOOOOOD
+ GregtechItemList.Food_Baked_Raisin_Bread.set(this.addItem(tLastID = 60, "Raisin Bread", "Extra Raisins, Just for ImQ009", new Object[]{new GT_FoodStat(5, 0.5F, EnumAction.eat, null, false, true, false, new int[0]), getTcAspectStack(TC_Aspects.CORPUS, 1L), getTcAspectStack(TC_Aspects.FAMES, 1L), getTcAspectStack(TC_Aspects.IGNIS, 1L)}));
+
+
+
+ GregtechItemList.Fluid_Cell_144L.set(this.addItem(tLastID = 61, "144L Invar Fluid Cell", "Holds exactly one dust worth of liquid.", new Object[]{new ItemData(Materials.Invar, (OrePrefixes.plate.mMaterialAmount * 8L) + (4L * OrePrefixes.ring.mMaterialAmount), new MaterialStack[0]), getTcAspectStack(TC_Aspects.VACUOS, 2L), getTcAspectStack(TC_Aspects.AQUA, 1L)}));
+ this.setFluidContainerStats(32000 + tLastID, 144L, 64L);
+
+ GregtechItemList.Fluid_Cell_36L.set(this.addItem(tLastID = 62, "36L Brass Fluid Cell", "Holds exactly one small dust worth of liquid.", new Object[]{new ItemData(Materials.Brass, (OrePrefixes.plate.mMaterialAmount * 8L) + (4L * OrePrefixes.ring.mMaterialAmount), new MaterialStack[0]), getTcAspectStack(TC_Aspects.VACUOS, 2L), getTcAspectStack(TC_Aspects.AQUA, 1L)}));
+ this.setFluidContainerStats(32000 + tLastID, 36L, 64L);
+
+ GregtechItemList.Fluid_Cell_16L.set(this.addItem(tLastID = 63, "16L Bronze Fluid Cell", "Holds exactly one tiny dust / nugget worth of liquid.", new Object[]{new ItemData(Materials.Bronze, (OrePrefixes.plate.mMaterialAmount * 8L) + (4L * OrePrefixes.ring.mMaterialAmount), new MaterialStack[0]), getTcAspectStack(TC_Aspects.VACUOS, 2L), getTcAspectStack(TC_Aspects.AQUA, 1L)}));
+ this.setFluidContainerStats(32000 + tLastID, 16L, 64L);
+
+ GregtechItemList.Fluid_Cell_1L.set(this.addItem(tLastID = 64, "1L Wrought Iron Fluid Cell", "Holds exactly one litre worth of liquid.", new Object[]{new ItemData(Materials.WroughtIron, (OrePrefixes.plate.mMaterialAmount * 8L) + (4L * OrePrefixes.ring.mMaterialAmount), new MaterialStack[0]), getTcAspectStack(TC_Aspects.VACUOS, 2L), getTcAspectStack(TC_Aspects.AQUA, 1L)}));
+ this.setFluidContainerStats(32000 + tLastID, 1L, 64L);
+
+ if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){
+ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.WroughtIron, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.WroughtIron, 2L), GregtechItemList.Fluid_Cell_1L.get(1L, new Object[0]), 50, 32);
+ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Bronze, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Bronze, 2L), GregtechItemList.Fluid_Cell_16L.get(1L, new Object[0]), 50, 32);
+ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Brass, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Brass, 2L), GregtechItemList.Fluid_Cell_36L.get(1L, new Object[0]), 75, 32);
+ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Invar, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Invar, 2L), GregtechItemList.Fluid_Cell_144L.get(1L, new Object[0]), 75, 32);
+
+ }
+ else {
+ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 8L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.WroughtIron, 4L), GregtechItemList.Fluid_Cell_1L.get(1L, new Object[0]), 50, 32);
+ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Bronze, 8L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Bronze, 4L), GregtechItemList.Fluid_Cell_16L.get(1L, new Object[0]), 50, 32);
+ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Brass, 8L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Brass, 4L), GregtechItemList.Fluid_Cell_36L.get(1L, new Object[0]), 75, 32);
+ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Invar, 8L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Invar, 4L), GregtechItemList.Fluid_Cell_144L.get(1L, new Object[0]), 75, 32);
+ }
+ }
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java
index d5bd4c134c..5ddb67b6d3 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java
@@ -14,18 +14,18 @@ public class MetaGeneratedGregtechTools extends GT_MetaGenerated_Tool {
public MetaGeneratedGregtechTools() {
super("plusplus.metatool.01");
- INSTANCE = this;
+ INSTANCE = this;
GregTech_API.registerTool(
- addTool(
+ this.addTool(
SKOOKUM_CHOOCHER, "Skookum Choocher",
- "Can Really Chooch. Does a Skookum job at Hammering and Wrenching stuff.",
+ "Can Really Chooch. Does a Skookum job at Hammering and Wrenching stuff.",
new TOOL_Gregtech_Choocher(),
new Object[]{GregtechToolDictNames.craftingToolSkookumChoocher,
- ToolDictNames.craftingToolHardHammer,
- ToolDictNames.craftingToolWrench,
- new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)}),
- GregTech_API.sWrenchList);
+ ToolDictNames.craftingToolHardHammer,
+ ToolDictNames.craftingToolWrench,
+ new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L),
+ new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L),
+ new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)}),
+ GregTech_API.sWrenchList);
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java
index fcd991583b..7335ce1bf7 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java
@@ -1,12 +1,11 @@
package gtPlusPlus.xmod.gregtech.common.items.behaviours;
+import java.util.List;
+
import gregtech.api.items.GT_MetaBase_Item;
import gregtech.api.util.GT_LanguageManager;
import gregtech.common.items.behaviors.Behaviour_None;
import gregtech.common.items.behaviors.Behaviour_Wrench;
-
-import java.util.List;
-
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
@@ -16,8 +15,8 @@ extends Behaviour_None {
private boolean isWrench = true;
private final Behaviour_Wrench wrench = new Behaviour_Wrench(150);
private final Behaviour_Prospecting_Ex prospecting = new Behaviour_Prospecting_Ex(10, 1250);
- private String mTooltip1 = GT_LanguageManager.addStringLocalization("gt.behaviour.choochering1", "Current tool mode: ");
- private String mTooltip2 = GT_LanguageManager.addStringLocalization("gt.behaviour.choochering2", "Change tool mode using Shift+Rightclick.");
+ private final String mTooltip1 = GT_LanguageManager.addStringLocalization("gt.behaviour.choochering1", "Current tool mode: ");
+ private final String mTooltip2 = GT_LanguageManager.addStringLocalization("gt.behaviour.choochering2", "Change tool mode using Shift+Rightclick.");
private final String mTooltipH = GT_LanguageManager.addStringLocalization("gt.behaviour.prospectingEx", "Usable for Prospecting large areas.");
private final String mTooltipW = GT_LanguageManager.addStringLocalization("gt.behaviour.wrench", "Rotates Blocks on Rightclick.");
@@ -26,39 +25,39 @@ extends Behaviour_None {
}
@Override
- public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
+ public boolean onItemUseFirst(final GT_MetaBase_Item aItem, final ItemStack aStack, final EntityPlayer aPlayer, final World aWorld, final int aX, final int aY, final int aZ, final int aSide, final float hitX, final float hitY, final float hitZ) {
if (aWorld.isRemote) {
return false;
}
if (aPlayer.isSneaking()){
- if (isWrench){
- isWrench = false;
+ if (this.isWrench){
+ this.isWrench = false;
return false;
}
- isWrench = true;
+ this.isWrench = true;
return false;
}
else if (!aPlayer.isSneaking()){
- if (isWrench){
- wrench.onItemUseFirst(aItem, aStack, aPlayer, aWorld, aSide, aSide, aSide, aSide, hitZ, hitZ, hitZ);
+ if (this.isWrench){
+ this.wrench.onItemUseFirst(aItem, aStack, aPlayer, aWorld, aSide, aSide, aSide, aSide, hitZ, hitZ, hitZ);
return false;
}
- prospecting.onItemUseFirst(aItem, aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ);
+ this.prospecting.onItemUseFirst(aItem, aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ);
return false;
}
return false;
}
@Override
- public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) {
+ public List<String> getAdditionalToolTips(final GT_MetaBase_Item aItem, final List<String> aList, final ItemStack aStack) {
+
-
- if (isWrench){
- aList.add(this.mTooltip1+"Wrench");
+ if (this.isWrench){
+ aList.add(this.mTooltip1+"Wrench");
aList.add(this.mTooltipW);
}
else {
- aList.add(this.mTooltip1+"Prospecting");
+ aList.add(this.mTooltip1+"Prospecting");
aList.add(this.mTooltipH);
}
aList.add(this.mTooltip2);
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Prospecting_Ex.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Prospecting_Ex.java
index 11ff6f0f91..bd4b6d0154 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Prospecting_Ex.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Prospecting_Ex.java
@@ -1,5 +1,7 @@
package gtPlusPlus.xmod.gregtech.common.items.behaviours;
+import java.util.Random;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.Materials;
import gregtech.api.items.GT_MetaBase_Item;
@@ -9,9 +11,6 @@ import gregtech.api.util.*;
import gregtech.common.blocks.GT_Block_Ores;
import gregtech.common.blocks.GT_TileEntity_Ores;
import gregtech.common.items.behaviors.Behaviour_Prospecting;
-
-import java.util.Random;
-
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
@@ -22,98 +21,99 @@ import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.IFluidBlock;
public class Behaviour_Prospecting_Ex
- extends Behaviour_Prospecting {
- private final int mVanillaCosts;
- private final int mEUCosts;
+extends Behaviour_Prospecting {
+ private final int mVanillaCosts;
+ private final int mEUCosts;
- public Behaviour_Prospecting_Ex(int aVanillaCosts, int aEUCosts) {
- super(aVanillaCosts, aEUCosts);
- this.mVanillaCosts = aVanillaCosts;
- this.mEUCosts = aEUCosts;
- }
+ public Behaviour_Prospecting_Ex(final int aVanillaCosts, final int aEUCosts) {
+ super(aVanillaCosts, aEUCosts);
+ this.mVanillaCosts = aVanillaCosts;
+ this.mEUCosts = aEUCosts;
+ }
- public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
- if (aWorld.isRemote) {
- return false;
- }
- Block aBlock = aWorld.getBlock(aX, aY, aZ);
- if (aBlock == null) {
- return false;
- }
- byte aMeta = (byte) aWorld.getBlockMetadata(aX, aY, aZ);
+ @Override
+ public boolean onItemUseFirst(final GT_MetaBase_Item aItem, final ItemStack aStack, final EntityPlayer aPlayer, final World aWorld, final int aX, final int aY, final int aZ, final int aSide, final float hitX, final float hitY, final float hitZ) {
+ if (aWorld.isRemote) {
+ return false;
+ }
+ final Block aBlock = aWorld.getBlock(aX, aY, aZ);
+ if (aBlock == null) {
+ return false;
+ }
+ final byte aMeta = (byte) aWorld.getBlockMetadata(aX, aY, aZ);
- ItemData tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(aBlock, 1, aMeta));
- if ((tAssotiation != null) && (tAssotiation.mPrefix.toString().startsWith("ore"))) {
- GT_Utility.sendChatToPlayer(aPlayer, "This is " + tAssotiation.mMaterial.mMaterial.mDefaultLocalName + " Ore.");
- GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(1)), 1.0F, -1.0F, aX, aY, aZ);
- return true;
- }
- if ((aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.stone)) || (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, GregTech_API.sBlockGranites)) || (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.netherrack)) || (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.end_stone)) || (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.dirt)) ||(aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.grass)) ) {
- if (GT_ModHandler.damageOrDechargeItem(aStack, this.mVanillaCosts, this.mEUCosts, aPlayer)) {
- GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(1)), 1.0F, -1.0F, aX, aY, aZ);
- int tX = aX;
- int tY = aY;
- int tZ = aZ;
- int tMetaID = 0;
- int tQuality = ((aItem instanceof GT_MetaGenerated_Tool) ? ((GT_MetaGenerated_Tool) aItem).getHarvestLevel(aStack, "") : 0)*3;
+ ItemData tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(aBlock, 1, aMeta));
+ if ((tAssotiation != null) && (tAssotiation.mPrefix.toString().startsWith("ore"))) {
+ GT_Utility.sendChatToPlayer(aPlayer, "This is " + tAssotiation.mMaterial.mMaterial.mDefaultLocalName + " Ore.");
+ GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(1)), 1.0F, -1.0F, aX, aY, aZ);
+ return true;
+ }
+ if ((aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.stone)) || (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, GregTech_API.sBlockGranites)) || (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.netherrack)) || (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.end_stone)) || (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.dirt)) ||(aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.grass)) ) {
+ if (GT_ModHandler.damageOrDechargeItem(aStack, this.mVanillaCosts, this.mEUCosts, aPlayer)) {
+ GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(Integer.valueOf(1)), 1.0F, -1.0F, aX, aY, aZ);
+ int tX = aX;
+ int tY = aY;
+ int tZ = aZ;
+ int tMetaID = 0;
+ final int tQuality = ((aItem instanceof GT_MetaGenerated_Tool) ? ((GT_MetaGenerated_Tool) aItem).getHarvestLevel(aStack, "") : 0)*3;
- int i = 0;
- for (int j = 6 + tQuality; i < j; i++) {
- tX -= ForgeDirection.getOrientation(aSide).offsetX;
- tY -= ForgeDirection.getOrientation(aSide).offsetY;
- tZ -= ForgeDirection.getOrientation(aSide).offsetZ;
+ int i = 0;
+ for (final int j = 6 + tQuality; i < j; i++) {
+ tX -= ForgeDirection.getOrientation(aSide).offsetX;
+ tY -= ForgeDirection.getOrientation(aSide).offsetY;
+ tZ -= ForgeDirection.getOrientation(aSide).offsetZ;
- Block tBlock = aWorld.getBlock(tX, tY, tZ);
- if ((tBlock == Blocks.lava) || (tBlock == Blocks.flowing_lava)) {
- GT_Utility.sendChatToPlayer(aPlayer, "There is Lava behind this Block.");
- break;
- }
- if ((tBlock == Blocks.water) || (tBlock == Blocks.flowing_water) || ((tBlock instanceof IFluidBlock))) {
- GT_Utility.sendChatToPlayer(aPlayer, "There is a Liquid behind this Block.");
- break;
- }
- if ((tBlock == Blocks.monster_egg) || (!GT_Utility.hasBlockHitBox(aWorld, tX, tY, tZ))) {
- GT_Utility.sendChatToPlayer(aPlayer, "There is an Air Pocket behind this Block.");
- break;
- }
- if (tBlock != aBlock) {
- if (i >= 4) {
- break;
- }
- GT_Utility.sendChatToPlayer(aPlayer, "Material is changing behind this Block.");
- break;
- }
- }
- Random tRandom = new Random(aX ^ aY ^ aZ ^ aSide);
- i = 0;
- for (int j = 9 + 2 * tQuality; i < j; i++) {
- tX = aX - 4 - tQuality + tRandom.nextInt(j);
- tY = aY - 4 - tQuality + tRandom.nextInt(j);
- tZ = aZ - 4 - tQuality + tRandom.nextInt(j);
- Block tBlock = aWorld.getBlock(tX, tY, tZ);
- if ((tBlock instanceof GT_Block_Ores)) {
- TileEntity tTileEntity = aWorld.getTileEntity(tX, tY, tZ);
- if ((tTileEntity instanceof GT_TileEntity_Ores)) {
- Materials tMaterial = GregTech_API.sGeneratedMaterials[(((GT_TileEntity_Ores) tTileEntity).mMetaData % 1000)];
- if ((tMaterial != null) && (tMaterial != Materials._NULL)) {
- GT_Utility.sendChatToPlayer(aPlayer, "Found traces of " + tMaterial.mDefaultLocalName + " Ore.");
- return true;
- }
- }
- } else {
- tMetaID = aWorld.getBlockMetadata(tX, tY, tZ);
- tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(tBlock, 1, tMetaID));
- if ((tAssotiation != null) && (tAssotiation.mPrefix.toString().startsWith("ore"))) {
- GT_Utility.sendChatToPlayer(aPlayer, "Found traces of " + tAssotiation.mMaterial.mMaterial.mDefaultLocalName + " Ore.");
- return true;
- }
- }
- }
- GT_Utility.sendChatToPlayer(aPlayer, "No Ores found.");
- }
- return true;
- }
- return false;
- }
+ final Block tBlock = aWorld.getBlock(tX, tY, tZ);
+ if ((tBlock == Blocks.lava) || (tBlock == Blocks.flowing_lava)) {
+ GT_Utility.sendChatToPlayer(aPlayer, "There is Lava behind this Block.");
+ break;
+ }
+ if ((tBlock == Blocks.water) || (tBlock == Blocks.flowing_water) || ((tBlock instanceof IFluidBlock))) {
+ GT_Utility.sendChatToPlayer(aPlayer, "There is a Liquid behind this Block.");
+ break;
+ }
+ if ((tBlock == Blocks.monster_egg) || (!GT_Utility.hasBlockHitBox(aWorld, tX, tY, tZ))) {
+ GT_Utility.sendChatToPlayer(aPlayer, "There is an Air Pocket behind this Block.");
+ break;
+ }
+ if (tBlock != aBlock) {
+ if (i >= 4) {
+ break;
+ }
+ GT_Utility.sendChatToPlayer(aPlayer, "Material is changing behind this Block.");
+ break;
+ }
+ }
+ final Random tRandom = new Random(aX ^ aY ^ aZ ^ aSide);
+ i = 0;
+ for (final int j = 9 + (2 * tQuality); i < j; i++) {
+ tX = (aX - 4 - tQuality) + tRandom.nextInt(j);
+ tY = (aY - 4 - tQuality) + tRandom.nextInt(j);
+ tZ = (aZ - 4 - tQuality) + tRandom.nextInt(j);
+ final Block tBlock = aWorld.getBlock(tX, tY, tZ);
+ if ((tBlock instanceof GT_Block_Ores)) {
+ final TileEntity tTileEntity = aWorld.getTileEntity(tX, tY, tZ);
+ if ((tTileEntity instanceof GT_TileEntity_Ores)) {
+ final Materials tMaterial = GregTech_API.sGeneratedMaterials[(((GT_TileEntity_Ores) tTileEntity).mMetaData % 1000)];
+ if ((tMaterial != null) && (tMaterial != Materials._NULL)) {
+ GT_Utility.sendChatToPlayer(aPlayer, "Found traces of " + tMaterial.mDefaultLocalName + " Ore.");
+ return true;
+ }
+ }
+ } else {
+ tMetaID = aWorld.getBlockMetadata(tX, tY, tZ);
+ tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(tBlock, 1, tMetaID));
+ if ((tAssotiation != null) && (tAssotiation.mPrefix.toString().startsWith("ore"))) {
+ GT_Utility.sendChatToPlayer(aPlayer, "Found traces of " + tAssotiation.mMaterial.mMaterial.mDefaultLocalName + " Ore.");
+ return true;
+ }
+ }
+ }
+ GT_Utility.sendChatToPlayer(aPlayer, "No Ores found.");
+ }
+ return true;
+ }
+ return false;
+ }
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractGenerator.java
index 9fa42b0286..73eae3608c 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractGenerator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractGenerator.java
@@ -1,6 +1,7 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.automation;
import static gtPlusPlus.core.lib.CORE.sTesseractGenerators;
+
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.*;
@@ -32,17 +33,17 @@ extends GT_MetaTileEntity_BasicTank
public int mNeededEnergy = 0;
public int mFrequency = 0;
- public GT_MetaTileEntity_TesseractGenerator(int aID, String aName, String aNameRegional, int aTier) {
+ public GT_MetaTileEntity_TesseractGenerator(final int aID, final String aName, final String aNameRegional, final int aTier) {
super(aID, aName, aNameRegional, aTier, 3, "");
}
- public GT_MetaTileEntity_TesseractGenerator(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
+ public GT_MetaTileEntity_TesseractGenerator(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) {
super(aName, aTier, 3, aDescription, aTextures);
- }
+ }
@Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_TesseractGenerator(mName, mTier, mDescription, mTextures);
+ public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_TesseractGenerator(this.mName, this.mTier, this.mDescription, this.mTextures);
}
@Override
@@ -64,7 +65,7 @@ extends GT_MetaTileEntity_BasicTank
}
@Override
- public boolean isFacingValid(byte aFacing)
+ public boolean isFacingValid(final byte aFacing)
{
return true;
}
@@ -82,18 +83,18 @@ extends GT_MetaTileEntity_BasicTank
}
@Override
- public boolean isInputFacing(byte aSide)
+ public boolean isInputFacing(final byte aSide)
{
return true;
}
@Override
- public boolean isOutputFacing(byte aSide) {
- return aSide == getBaseMetaTileEntity().getBackFacing();
+ public boolean isOutputFacing(final byte aSide) {
+ return aSide == this.getBaseMetaTileEntity().getBackFacing();
}
@Override
- public boolean isValidSlot(int aIndex)
+ public boolean isValidSlot(final int aIndex)
{
return false;
}
@@ -101,7 +102,7 @@ extends GT_MetaTileEntity_BasicTank
@Override
public long getMinimumStoredEU()
{
- return getBaseMetaTileEntity().getEUCapacity() / 2;
+ return this.getBaseMetaTileEntity().getEUCapacity() / 2;
}
@Override
@@ -125,11 +126,11 @@ extends GT_MetaTileEntity_BasicTank
@Override
public long maxSteamStore()
{
- return maxEUStore();
+ return this.maxEUStore();
}
@Override
- public boolean isAccessAllowed(EntityPlayer aPlayer)
+ public boolean isAccessAllowed(final EntityPlayer aPlayer)
{
return true;
}
@@ -153,19 +154,19 @@ extends GT_MetaTileEntity_BasicTank
}
@Override
- public void saveNBTData(NBTTagCompound aNBT)
+ public void saveNBTData(final NBTTagCompound aNBT)
{
aNBT.setInteger("mFrequency", this.mFrequency);
}
@Override
- public void loadNBTData(NBTTagCompound aNBT)
+ public void loadNBTData(final NBTTagCompound aNBT)
{
this.mFrequency = aNBT.getInteger("mFrequency");
}
@Override
- public void onConfigLoad(GT_Config aConfig)
+ public void onConfigLoad(final GT_Config aConfig)
{
TESSERACT_ENERGY_COST = 1024;
TESSERACT_ENERGY_COST_DIMENSIONAL = 2048;
@@ -181,17 +182,17 @@ extends GT_MetaTileEntity_BasicTank
{
sTesseractGenerators.clear();
}
-
+
@Override
- public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ){
- if (aSide == getBaseMetaTileEntity().getFrontFacing()){
- float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ);
- switch ((byte)((byte)(int)(tCoords[0] * 2.0F) + 2 * (byte)(int)(tCoords[1] * 2.0F))){
- case 0:
+ public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer, final byte aSide, final float aX, final float aY, final float aZ){
+ if (aSide == this.getBaseMetaTileEntity().getFrontFacing()){
+ final float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ);
+ switch ((byte)((byte)(int)(tCoords[0] * 2.0F) + (2 * (byte)(int)(tCoords[1] * 2.0F)))){
+ case 0:
Utils.LOG_INFO("Freq. -1 | " + this.mFrequency);
this.mFrequency -= 1;
break;
- case 1:
+ case 1:
Utils.LOG_INFO("Freq. +1 | " + this.mFrequency);
this.mFrequency += 1;
default:
@@ -200,44 +201,44 @@ extends GT_MetaTileEntity_BasicTank
}
PlayerUtils.messagePlayer(aPlayer, "Frequency: " + this.mFrequency);
PlayerUtils.messagePlayer(aPlayer, ((sTesseractGenerators.get(Integer.valueOf(this.mFrequency)) != null) && (sTesseractGenerators.get(Integer.valueOf(this.mFrequency)) != this) ? EnumChatFormatting.RED + " (Occupied)" : ""));
- }
+ }
return true;
}
@Override
- public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ)
+ public void onScrewdriverRightClick(final byte aSide, final EntityPlayer aPlayer, final float aX, final float aY, final float aZ)
{
- if (aSide == getBaseMetaTileEntity().getFrontFacing())
+ if (aSide == this.getBaseMetaTileEntity().getFrontFacing())
{
- float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ);
- switch ((byte)((byte)(int)(tCoords[0] * 2.0F) + 2 * (byte)(int)(tCoords[1] * 2.0F)))
+ final float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ);
+ switch ((byte)((byte)(int)(tCoords[0] * 2.0F) + (2 * (byte)(int)(tCoords[1] * 2.0F))))
{
- case 0:
+ case 0:
this.mFrequency -= 64;
break;
- case 1:
+ case 1:
this.mFrequency += 64;
break;
- case 2:
+ case 2:
this.mFrequency -= 512;
break;
- case 3:
+ case 3:
this.mFrequency += 512;
}
GT_Utility.sendChatToPlayer(aPlayer, "Frequency: " + this.mFrequency + ((sTesseractGenerators.get(Integer.valueOf(this.mFrequency)) != null) && (sTesseractGenerators.get(Integer.valueOf(this.mFrequency)) != this) ? EnumChatFormatting.RED + " (Occupied)" : ""));
}
}
- public boolean allowCoverOnSide(byte aSide, int aCoverID)
+ public boolean allowCoverOnSide(final byte aSide, final int aCoverID)
{
- return aSide != getBaseMetaTileEntity().getFrontFacing();
+ return aSide != this.getBaseMetaTileEntity().getFrontFacing();
}
@Override
public String[] getInfoData()
{
- TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity != null) && (getBaseMetaTileEntity().isAllowedToWork()) && ((tTileEntity instanceof IGregTechDeviceInformation)) && (((IGregTechDeviceInformation)tTileEntity).isGivingInformation())) {
+ final TileEntity tTileEntity = this.getBaseMetaTileEntity().getTileEntityAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if ((tTileEntity != null) && (this.getBaseMetaTileEntity().isAllowedToWork()) && ((tTileEntity instanceof IGregTechDeviceInformation)) && (((IGregTechDeviceInformation)tTileEntity).isGivingInformation())) {
return ((IGregTechDeviceInformation)tTileEntity).getInfoData();
}
return new String[] { "Tesseract Generator", "Freqency:", "" + this.mFrequency, (sTesseractGenerators.get(Integer.valueOf(this.mFrequency)) == this) && (this.isWorking >= 20) ? "Active" : "Inactive" };
@@ -251,8 +252,8 @@ extends GT_MetaTileEntity_BasicTank
public boolean isSendingInformation()
{
- TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity != null) && (getBaseMetaTileEntity().isAllowedToWork()) && ((tTileEntity instanceof IGregTechDeviceInformation))) {
+ final TileEntity tTileEntity = this.getBaseMetaTileEntity().getTileEntityAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if ((tTileEntity != null) && (this.getBaseMetaTileEntity().isAllowedToWork()) && ((tTileEntity instanceof IGregTechDeviceInformation))) {
return ((IGregTechDeviceInformation)tTileEntity).isGivingInformation();
}
return false;
@@ -261,8 +262,8 @@ extends GT_MetaTileEntity_BasicTank
@Override
public boolean isDigitalChest()
{
- TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity != null) && (getBaseMetaTileEntity().isAllowedToWork()) && ((tTileEntity instanceof IDigitalChest))) {
+ final TileEntity tTileEntity = this.getBaseMetaTileEntity().getTileEntityAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if ((tTileEntity != null) && (this.getBaseMetaTileEntity().isAllowedToWork()) && ((tTileEntity instanceof IDigitalChest))) {
return ((IDigitalChest)tTileEntity).isDigitalChest();
}
return false;
@@ -271,18 +272,18 @@ extends GT_MetaTileEntity_BasicTank
@Override
public ItemStack[] getStoredItemData()
{
- TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity != null) && (getBaseMetaTileEntity().isAllowedToWork()) && ((tTileEntity instanceof IDigitalChest))) {
+ final TileEntity tTileEntity = this.getBaseMetaTileEntity().getTileEntityAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if ((tTileEntity != null) && (this.getBaseMetaTileEntity().isAllowedToWork()) && ((tTileEntity instanceof IDigitalChest))) {
return ((IDigitalChest)tTileEntity).getStoredItemData();
}
return null;
}
@Override
- public void setItemCount(int aCount)
+ public void setItemCount(final int aCount)
{
- TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity != null) && (getBaseMetaTileEntity().isAllowedToWork()) && ((tTileEntity instanceof IDigitalChest))) {
+ final TileEntity tTileEntity = this.getBaseMetaTileEntity().getTileEntityAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if ((tTileEntity != null) && (this.getBaseMetaTileEntity().isAllowedToWork()) && ((tTileEntity instanceof IDigitalChest))) {
((IDigitalChest)tTileEntity).setItemCount(aCount);
}
}
@@ -290,45 +291,45 @@ extends GT_MetaTileEntity_BasicTank
@Override
public int getMaxItemCount()
{
- TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity != null) && (getBaseMetaTileEntity().isAllowedToWork()) && ((tTileEntity instanceof IDigitalChest))) {
+ final TileEntity tTileEntity = this.getBaseMetaTileEntity().getTileEntityAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if ((tTileEntity != null) && (this.getBaseMetaTileEntity().isAllowedToWork()) && ((tTileEntity instanceof IDigitalChest))) {
return ((IDigitalChest)tTileEntity).getMaxItemCount();
}
return 0;
}
@Override
- public boolean isItemValidForSlot(int aIndex, ItemStack aStack)
+ public boolean isItemValidForSlot(final int aIndex, final ItemStack aStack)
{
- IInventory tTileEntity = getBaseMetaTileEntity().getIInventoryAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final IInventory tTileEntity = this.getBaseMetaTileEntity().getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return false;
}
return tTileEntity.isItemValidForSlot(aIndex, aStack);
}
@Override
- public int[] getAccessibleSlotsFromSide(int aSide)
+ public int[] getAccessibleSlotsFromSide(final int aSide)
{
- IInventory tTileEntity = getBaseMetaTileEntity().getIInventoryAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final IInventory tTileEntity = this.getBaseMetaTileEntity().getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return new int[0];
}
if ((tTileEntity instanceof ISidedInventory)) {
return ((ISidedInventory)tTileEntity).getAccessibleSlotsFromSide(aSide);
}
- int[] rArray = new int[getSizeInventory()];
- for (int i = 0; i < getSizeInventory(); i++) {
+ final int[] rArray = new int[this.getSizeInventory()];
+ for (int i = 0; i < this.getSizeInventory(); i++) {
rArray[i] = i;
}
return rArray;
}
@Override
- public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide)
+ public boolean canInsertItem(final int aIndex, final ItemStack aStack, final int aSide)
{
- IInventory tTileEntity = getBaseMetaTileEntity().getIInventoryAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final IInventory tTileEntity = this.getBaseMetaTileEntity().getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return false;
}
if ((tTileEntity instanceof ISidedInventory)) {
@@ -338,10 +339,10 @@ extends GT_MetaTileEntity_BasicTank
}
@Override
- public boolean canExtractItem(int aIndex, ItemStack aStack, int aSide)
+ public boolean canExtractItem(final int aIndex, final ItemStack aStack, final int aSide)
{
- IInventory tTileEntity = getBaseMetaTileEntity().getIInventoryAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final IInventory tTileEntity = this.getBaseMetaTileEntity().getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return false;
}
if ((tTileEntity instanceof ISidedInventory)) {
@@ -353,38 +354,38 @@ extends GT_MetaTileEntity_BasicTank
@Override
public int getSizeInventory()
{
- IInventory tTileEntity = getBaseMetaTileEntity().getIInventoryAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final IInventory tTileEntity = this.getBaseMetaTileEntity().getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return 0;
}
return tTileEntity.getSizeInventory();
}
@Override
- public ItemStack getStackInSlot(int aIndex)
+ public ItemStack getStackInSlot(final int aIndex)
{
- IInventory tTileEntity = getBaseMetaTileEntity().getIInventoryAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final IInventory tTileEntity = this.getBaseMetaTileEntity().getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return null;
}
return tTileEntity.getStackInSlot(aIndex);
}
@Override
- public void setInventorySlotContents(int aIndex, ItemStack aStack)
+ public void setInventorySlotContents(final int aIndex, final ItemStack aStack)
{
- IInventory tTileEntity = getBaseMetaTileEntity().getIInventoryAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final IInventory tTileEntity = this.getBaseMetaTileEntity().getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return;
}
tTileEntity.setInventorySlotContents(aIndex, aStack);
}
@Override
- public ItemStack decrStackSize(int aIndex, int aAmount)
+ public ItemStack decrStackSize(final int aIndex, final int aAmount)
{
- IInventory tTileEntity = getBaseMetaTileEntity().getIInventoryAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final IInventory tTileEntity = this.getBaseMetaTileEntity().getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return null;
}
return tTileEntity.decrStackSize(aIndex, aAmount);
@@ -393,8 +394,8 @@ extends GT_MetaTileEntity_BasicTank
@Override
public String getInventoryName()
{
- IInventory tTileEntity = getBaseMetaTileEntity().getIInventoryAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final IInventory tTileEntity = this.getBaseMetaTileEntity().getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return "";
}
return tTileEntity.getInventoryName();
@@ -403,107 +404,107 @@ extends GT_MetaTileEntity_BasicTank
@Override
public int getInventoryStackLimit()
{
- IInventory tTileEntity = getBaseMetaTileEntity().getIInventoryAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final IInventory tTileEntity = this.getBaseMetaTileEntity().getIInventoryAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return 0;
}
return tTileEntity.getInventoryStackLimit();
}
@Override
- public boolean canFill(ForgeDirection aSide, Fluid aFluid)
+ public boolean canFill(final ForgeDirection aSide, final Fluid aFluid)
{
- IFluidHandler tTileEntity = getBaseMetaTileEntity().getITankContainerAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final IFluidHandler tTileEntity = this.getBaseMetaTileEntity().getITankContainerAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return false;
}
return tTileEntity.canFill(aSide, aFluid);
}
@Override
- public boolean canDrain(ForgeDirection aSide, Fluid aFluid)
+ public boolean canDrain(final ForgeDirection aSide, final Fluid aFluid)
{
- IFluidHandler tTileEntity = getBaseMetaTileEntity().getITankContainerAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final IFluidHandler tTileEntity = this.getBaseMetaTileEntity().getITankContainerAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return false;
}
return tTileEntity.canDrain(aSide, aFluid);
}
@Override
- public FluidTankInfo[] getTankInfo(ForgeDirection aSide)
+ public FluidTankInfo[] getTankInfo(final ForgeDirection aSide)
{
- IFluidHandler tTileEntity = getBaseMetaTileEntity().getITankContainerAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final IFluidHandler tTileEntity = this.getBaseMetaTileEntity().getITankContainerAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return new FluidTankInfo[0];
}
return tTileEntity.getTankInfo(aSide);
}
@Override
- public int fill_default(ForgeDirection aDirection, FluidStack aFluid, boolean doFill)
+ public int fill_default(final ForgeDirection aDirection, final FluidStack aFluid, final boolean doFill)
{
- IFluidHandler tTileEntity = getBaseMetaTileEntity().getITankContainerAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final IFluidHandler tTileEntity = this.getBaseMetaTileEntity().getITankContainerAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return 0;
}
return tTileEntity.fill(aDirection, aFluid, doFill);
}
@Override
- public FluidStack drain(ForgeDirection aDirection, int maxDrain, boolean doDrain)
+ public FluidStack drain(final ForgeDirection aDirection, final int maxDrain, final boolean doDrain)
{
- IFluidHandler tTileEntity = getBaseMetaTileEntity().getITankContainerAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final IFluidHandler tTileEntity = this.getBaseMetaTileEntity().getITankContainerAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return null;
}
return tTileEntity.drain(aDirection, maxDrain, doDrain);
}
@Override
- public FluidStack drain(ForgeDirection aSide, FluidStack aFluid, boolean doDrain)
+ public FluidStack drain(final ForgeDirection aSide, final FluidStack aFluid, final boolean doDrain)
{
- IFluidHandler tTileEntity = getBaseMetaTileEntity().getITankContainerAtSide(getBaseMetaTileEntity().getBackFacing());
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final IFluidHandler tTileEntity = this.getBaseMetaTileEntity().getITankContainerAtSide(this.getBaseMetaTileEntity().getBackFacing());
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return null;
}
return tTileEntity.drain(aSide, aFluid, doDrain);
}
- public boolean addEnergyConsumption(GT_MetaTileEntity_TesseractTerminal aTerminal)
+ public boolean addEnergyConsumption(final GT_MetaTileEntity_TesseractTerminal aTerminal)
{
- if (!getBaseMetaTileEntity().isAllowedToWork()) {
+ if (!this.getBaseMetaTileEntity().isAllowedToWork()) {
return false;
}
- this.mNeededEnergy += (aTerminal.getBaseMetaTileEntity().getWorld() == getBaseMetaTileEntity().getWorld() ? TESSERACT_ENERGY_COST : TESSERACT_ENERGY_COST_DIMENSIONAL);
+ this.mNeededEnergy += (aTerminal.getBaseMetaTileEntity().getWorld() == this.getBaseMetaTileEntity().getWorld() ? TESSERACT_ENERGY_COST : TESSERACT_ENERGY_COST_DIMENSIONAL);
return true;
}
- public boolean isValidTesseractGenerator(String aOwnerName, boolean aWorkIrrelevant)
+ public boolean isValidTesseractGenerator(final String aOwnerName, final boolean aWorkIrrelevant)
{
- return (getBaseMetaTileEntity() != null) && (!getBaseMetaTileEntity().isInvalidTileEntity()) && (getBaseMetaTileEntity().isAllowedToWork()) && ((aOwnerName == null) || (getBaseMetaTileEntity().getOwnerName().equals(aOwnerName))) && ((aWorkIrrelevant) || (this.isWorking >= 20));
+ return (this.getBaseMetaTileEntity() != null) && (!this.getBaseMetaTileEntity().isInvalidTileEntity()) && (this.getBaseMetaTileEntity().isAllowedToWork()) && ((aOwnerName == null) || (this.getBaseMetaTileEntity().getOwnerName().equals(aOwnerName))) && ((aWorkIrrelevant) || (this.isWorking >= 20));
}
public void onPostTick()
{
- if (getBaseMetaTileEntity().isServerSide()){
+ if (this.getBaseMetaTileEntity().isServerSide()){
if (this.mFrequency != this.oFrequency){
-
+
Utils.LOG_INFO("mFreq != oFreq");
-
+
if (sTesseractGenerators.get(Integer.valueOf(this.oFrequency)) == this)
{
sTesseractGenerators.remove(Integer.valueOf(this.oFrequency));
- getBaseMetaTileEntity().issueBlockUpdate();
+ this.getBaseMetaTileEntity().issueBlockUpdate();
Utils.LOG_INFO("this Gen == oFreq on map - do block update");
}
Utils.LOG_INFO("mFreq will be set to oFreq");
this.oFrequency = this.mFrequency;
}
- if ((getBaseMetaTileEntity().isAllowedToWork()) && (getBaseMetaTileEntity().decreaseStoredEnergyUnits(this.mNeededEnergy, false)))
+ if ((this.getBaseMetaTileEntity().isAllowedToWork()) && (this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(this.mNeededEnergy, false)))
{
Utils.LOG_INFO("Can Work & Has Energy");
- if ((sTesseractGenerators.get(Integer.valueOf(this.mFrequency)) == null) || (!((GT_MetaTileEntity_TesseractGenerator)sTesseractGenerators.get(Integer.valueOf(this.mFrequency))).isValidTesseractGenerator(null, true))) {
+ if ((sTesseractGenerators.get(Integer.valueOf(this.mFrequency)) == null) || (!sTesseractGenerators.get(Integer.valueOf(this.mFrequency)).isValidTesseractGenerator(null, true))) {
Utils.LOG_INFO("storing TE I think to mFreq map?");
sTesseractGenerators.put(Integer.valueOf(this.mFrequency), this);
}
@@ -514,7 +515,7 @@ extends GT_MetaTileEntity_BasicTank
{
Utils.LOG_INFO("this gen == mFreq on map - do block update");
sTesseractGenerators.remove(Integer.valueOf(this.mFrequency));
- getBaseMetaTileEntity().issueBlockUpdate();
+ this.getBaseMetaTileEntity().issueBlockUpdate();
}
this.isWorking = 0;
}
@@ -526,7 +527,7 @@ extends GT_MetaTileEntity_BasicTank
}
if (this.isWorking == 20)
{
- getBaseMetaTileEntity().issueBlockUpdate();
+ this.getBaseMetaTileEntity().issueBlockUpdate();
this.isWorking = ((byte)(this.isWorking + 1));
}
}
@@ -545,26 +546,26 @@ extends GT_MetaTileEntity_BasicTank
}
@Override
- public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
+ public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
return false;
}
@Override
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
+ public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
return false;
}
@Override
- public ITexture[][][] getTextureSet(ITexture[] aTextures) {
+ public ITexture[][][] getTextureSet(final ITexture[] aTextures) {
return new ITexture[0][0][0];
}
@Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
return aSide == aFacing ? new ITexture[]{ new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional), new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_Frequency)} : new ITexture[]{new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional), new GT_RenderedTexture(Textures.BlockIcons.VOID)};
}
-
+
//To-Do?
@Override
public boolean doesFillContainers() {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractTerminal.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractTerminal.java
index 3544d2a124..4056af5df8 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractTerminal.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractTerminal.java
@@ -26,17 +26,17 @@ extends GT_MetaTileEntity_BasicTank
public boolean mDidWork = false;
public static boolean sInterDimensionalTesseractAllowed = true;
- public GT_MetaTileEntity_TesseractTerminal(int aID, String aName, String aNameRegional, int aTier) {
+ public GT_MetaTileEntity_TesseractTerminal(final int aID, final String aName, final String aNameRegional, final int aTier) {
super(aID, aName, aNameRegional, aTier, 3, "");
}
- public GT_MetaTileEntity_TesseractTerminal(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
+ public GT_MetaTileEntity_TesseractTerminal(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) {
super(aName, aTier, 3, aDescription, aTextures);
- }
+ }
@Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_TesseractTerminal(mName, mTier, mDescription, mTextures);
+ public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_TesseractTerminal(this.mName, this.mTier, this.mDescription, this.mTextures);
}
@Override
@@ -58,26 +58,26 @@ extends GT_MetaTileEntity_BasicTank
}
@Override
- public boolean isFacingValid(byte aFacing)
+ public boolean isFacingValid(final byte aFacing)
{
return true;
}
-
+
@Override
- public boolean isOutputFacing(byte aSide) {
- return aSide == getBaseMetaTileEntity().getBackFacing();
+ public boolean isOutputFacing(final byte aSide) {
+ return aSide == this.getBaseMetaTileEntity().getBackFacing();
}
@Override
- public boolean isValidSlot(int aIndex)
+ public boolean isValidSlot(final int aIndex)
{
return false;
}
-
+
@Override
public long getMinimumStoredEU()
{
- return getBaseMetaTileEntity().getEUCapacity() / 2;
+ return this.getBaseMetaTileEntity().getEUCapacity() / 2;
}
@Override
@@ -87,11 +87,11 @@ extends GT_MetaTileEntity_BasicTank
}
@Override
- public boolean isAccessAllowed(EntityPlayer aPlayer)
+ public boolean isAccessAllowed(final EntityPlayer aPlayer)
{
return true;
}
-
+
@Override
public long maxEUStore()
{
@@ -101,7 +101,7 @@ extends GT_MetaTileEntity_BasicTank
@Override
public long maxSteamStore()
{
- return maxEUStore();
+ return this.maxEUStore();
}
@Override
@@ -113,7 +113,7 @@ extends GT_MetaTileEntity_BasicTank
@Override
public int getProgresstime()
{
- return getTesseract(this.mFrequency, false) != null ? 999 : 0;
+ return this.getTesseract(this.mFrequency, false) != null ? 999 : 0;
}
@Override
@@ -123,19 +123,19 @@ extends GT_MetaTileEntity_BasicTank
}
@Override
- public void saveNBTData(NBTTagCompound aNBT)
+ public void saveNBTData(final NBTTagCompound aNBT)
{
aNBT.setInteger("mFrequency", this.mFrequency);
}
@Override
- public void loadNBTData(NBTTagCompound aNBT)
+ public void loadNBTData(final NBTTagCompound aNBT)
{
this.mFrequency = aNBT.getInteger("mFrequency");
}
@Override
- public void onConfigLoad(GT_Config aConfig)
+ public void onConfigLoad(final GT_Config aConfig)
{
sInterDimensionalTesseractAllowed = true;
}
@@ -147,10 +147,10 @@ extends GT_MetaTileEntity_BasicTank
float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ);
switch ((byte)((byte)(int)(tCoords[0] * 2.0F) + 2 * (byte)(int)(tCoords[1] * 2.0F)))
{
- case 0:
+ case 0:
this.mFrequency -= 1;
break;
- case 1:
+ case 1:
this.mFrequency += 1;
}
GT_Utility.sendChatToPlayer(aPlayer, "Frequency: " + this.mFrequency + (getTesseract(this.mFrequency, false) == null ? "" : new StringBuilder().append(EnumChatFormatting.GREEN).append(" (Connected)").toString()));
@@ -159,15 +159,15 @@ extends GT_MetaTileEntity_BasicTank
}*/
@Override
- public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ){
- if (aSide == getBaseMetaTileEntity().getFrontFacing()){
- float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ);
- switch ((byte)((byte)(int)(tCoords[0] * 2.0F) + 2 * (byte)(int)(tCoords[1] * 2.0F))){
- case 0:
+ public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer, final byte aSide, final float aX, final float aY, final float aZ){
+ if (aSide == this.getBaseMetaTileEntity().getFrontFacing()){
+ final float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ);
+ switch ((byte)((byte)(int)(tCoords[0] * 2.0F) + (2 * (byte)(int)(tCoords[1] * 2.0F)))){
+ case 0:
Utils.LOG_INFO("Freq. -1 | " + this.mFrequency);
this.mFrequency -= 1;
break;
- case 1:
+ case 1:
Utils.LOG_INFO("Freq. +1 | " + this.mFrequency);
this.mFrequency += 1;
default:
@@ -175,43 +175,43 @@ extends GT_MetaTileEntity_BasicTank
break;
}
PlayerUtils.messagePlayer(aPlayer, "Frequency: " + this.mFrequency);
- PlayerUtils.messagePlayer(aPlayer, (getTesseract(this.mFrequency, false) == null ? "" : new StringBuilder().append(EnumChatFormatting.GREEN).append(" (Connected)").toString()));
+ PlayerUtils.messagePlayer(aPlayer, (this.getTesseract(this.mFrequency, false) == null ? "" : new StringBuilder().append(EnumChatFormatting.GREEN).append(" (Connected)").toString()));
}
return true;
}
-
+
@Override
- public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ)
+ public void onScrewdriverRightClick(final byte aSide, final EntityPlayer aPlayer, final float aX, final float aY, final float aZ)
{
- if (aSide == getBaseMetaTileEntity().getFrontFacing())
+ if (aSide == this.getBaseMetaTileEntity().getFrontFacing())
{
- float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ);
- switch ((byte)((byte)(int)(tCoords[0] * 2.0F) + 2 * (byte)(int)(tCoords[1] * 2.0F)))
+ final float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ);
+ switch ((byte)((byte)(int)(tCoords[0] * 2.0F) + (2 * (byte)(int)(tCoords[1] * 2.0F))))
{
- case 0:
+ case 0:
this.mFrequency -= 64;
break;
- case 1:
+ case 1:
this.mFrequency += 64;
break;
- case 2:
+ case 2:
this.mFrequency -= 512;
break;
- case 3:
+ case 3:
this.mFrequency += 512;
}
- GT_Utility.sendChatToPlayer(aPlayer, "Frequency: " + this.mFrequency + (getTesseract(this.mFrequency, false) == null ? "" : new StringBuilder().append(EnumChatFormatting.GREEN).append(" (Connected)").toString()));
+ GT_Utility.sendChatToPlayer(aPlayer, "Frequency: " + this.mFrequency + (this.getTesseract(this.mFrequency, false) == null ? "" : new StringBuilder().append(EnumChatFormatting.GREEN).append(" (Connected)").toString()));
}
}
- public boolean allowCoverOnSide(byte aSide, int aCoverID)
+ public boolean allowCoverOnSide(final byte aSide, final int aCoverID)
{
- return aSide != getBaseMetaTileEntity().getFrontFacing();
+ return aSide != this.getBaseMetaTileEntity().getFrontFacing();
}
- public GT_MetaTileEntity_TesseractGenerator getTesseract(int aFrequency, boolean aWorkIrrelevant)
+ public GT_MetaTileEntity_TesseractGenerator getTesseract(final int aFrequency, final boolean aWorkIrrelevant)
{
- GT_MetaTileEntity_TesseractGenerator rTesseract = (GT_MetaTileEntity_TesseractGenerator)CORE.sTesseractGenerators.get(Integer.valueOf(aFrequency));
+ final GT_MetaTileEntity_TesseractGenerator rTesseract = CORE.sTesseractGenerators.get(Integer.valueOf(aFrequency));
if (rTesseract == null) {
return null;
}
@@ -219,10 +219,10 @@ extends GT_MetaTileEntity_BasicTank
{
CORE.sTesseractGenerators.put(Integer.valueOf(aFrequency), null);return null;
}
- if (!rTesseract.isValidTesseractGenerator(getBaseMetaTileEntity().getOwnerName(), aWorkIrrelevant)) {
+ if (!rTesseract.isValidTesseractGenerator(this.getBaseMetaTileEntity().getOwnerName(), aWorkIrrelevant)) {
return null;
}
- if ((!sInterDimensionalTesseractAllowed) && (rTesseract.getBaseMetaTileEntity().getWorld() != getBaseMetaTileEntity().getWorld())) {
+ if ((!sInterDimensionalTesseractAllowed) && (rTesseract.getBaseMetaTileEntity().getWorld() != this.getBaseMetaTileEntity().getWorld())) {
return null;
}
return rTesseract;
@@ -231,11 +231,11 @@ extends GT_MetaTileEntity_BasicTank
@Override
public String[] getInfoData()
{
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity != null) && (getBaseMetaTileEntity().isAllowedToWork()) && (tTileEntity.isSendingInformation())) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if ((tTileEntity != null) && (this.getBaseMetaTileEntity().isAllowedToWork()) && (tTileEntity.isSendingInformation())) {
return tTileEntity.getInfoData();
}
- return new String[] { "Tesseract Generator", "Freqency:", "" + this.mFrequency, getTesseract(this.mFrequency, false) != null ? "Active" : "Inactive" };
+ return new String[] { "Tesseract Generator", "Freqency:", "" + this.mFrequency, this.getTesseract(this.mFrequency, false) != null ? "Active" : "Inactive" };
}
@Override
@@ -247,8 +247,8 @@ extends GT_MetaTileEntity_BasicTank
@Override
public boolean isDigitalChest()
{
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return false;
}
return tTileEntity.isDigitalChest();
@@ -257,18 +257,18 @@ extends GT_MetaTileEntity_BasicTank
@Override
public ItemStack[] getStoredItemData()
{
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return null;
}
return tTileEntity.getStoredItemData();
}
@Override
- public void setItemCount(int aCount)
+ public void setItemCount(final int aCount)
{
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return;
}
tTileEntity.setItemCount(aCount);
@@ -277,48 +277,48 @@ extends GT_MetaTileEntity_BasicTank
@Override
public int getMaxItemCount()
{
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return 0;
}
return tTileEntity.getMaxItemCount();
}
@Override
- public boolean isItemValidForSlot(int aIndex, ItemStack aStack)
+ public boolean isItemValidForSlot(final int aIndex, final ItemStack aStack)
{
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return false;
}
return tTileEntity.isItemValidForSlot(aIndex, aStack);
}
@Override
- public int[] getAccessibleSlotsFromSide(int aSide)
+ public int[] getAccessibleSlotsFromSide(final int aSide)
{
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return new int[0];
}
return tTileEntity.getAccessibleSlotsFromSide(aSide);
}
@Override
- public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide)
+ public boolean canInsertItem(final int aIndex, final ItemStack aStack, final int aSide)
{
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return false;
}
return tTileEntity.canInsertItem(aIndex, aStack, aSide);
}
@Override
- public boolean canExtractItem(int aIndex, ItemStack aStack, int aSide)
+ public boolean canExtractItem(final int aIndex, final ItemStack aStack, final int aSide)
{
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return false;
}
return tTileEntity.canExtractItem(aIndex, aStack, aSide);
@@ -327,38 +327,38 @@ extends GT_MetaTileEntity_BasicTank
@Override
public int getSizeInventory()
{
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return 0;
}
return tTileEntity.getSizeInventory();
}
@Override
- public ItemStack getStackInSlot(int aIndex)
+ public ItemStack getStackInSlot(final int aIndex)
{
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return null;
}
return tTileEntity.getStackInSlot(aIndex);
}
@Override
- public void setInventorySlotContents(int aIndex, ItemStack aStack)
+ public void setInventorySlotContents(final int aIndex, final ItemStack aStack)
{
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return;
}
tTileEntity.setInventorySlotContents(aIndex, aStack);
}
@Override
- public ItemStack decrStackSize(int aIndex, int aAmount)
+ public ItemStack decrStackSize(final int aIndex, final int aAmount)
{
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return null;
}
return tTileEntity.decrStackSize(aIndex, aAmount);
@@ -367,8 +367,8 @@ extends GT_MetaTileEntity_BasicTank
@Override
public String getInventoryName()
{
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return "";
}
return tTileEntity.getInventoryName();
@@ -377,68 +377,68 @@ extends GT_MetaTileEntity_BasicTank
@Override
public int getInventoryStackLimit()
{
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return 0;
}
return tTileEntity.getInventoryStackLimit();
}
@Override
- public boolean canFill(ForgeDirection aSide, Fluid aFluid)
+ public boolean canFill(final ForgeDirection aSide, final Fluid aFluid)
{
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return false;
}
return tTileEntity.canFill(aSide, aFluid);
}
@Override
- public boolean canDrain(ForgeDirection aSide, Fluid aFluid)
+ public boolean canDrain(final ForgeDirection aSide, final Fluid aFluid)
{
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return false;
}
return tTileEntity.canDrain(aSide, aFluid);
}
@Override
- public FluidTankInfo[] getTankInfo(ForgeDirection aSide)
+ public FluidTankInfo[] getTankInfo(final ForgeDirection aSide)
{
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return new FluidTankInfo[0];
}
return tTileEntity.getTankInfo(aSide);
}
@Override
- public int fill_default(ForgeDirection aDirection, FluidStack aFluid, boolean doFill)
+ public int fill_default(final ForgeDirection aDirection, final FluidStack aFluid, final boolean doFill)
{
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return 0;
}
return tTileEntity.fill(aDirection, aFluid, doFill);
}
@Override
- public FluidStack drain(ForgeDirection aDirection, int maxDrain, boolean doDrain)
+ public FluidStack drain(final ForgeDirection aDirection, final int maxDrain, final boolean doDrain)
{
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return null;
}
return tTileEntity.drain(aDirection, maxDrain, doDrain);
}
@Override
- public FluidStack drain(ForgeDirection aSide, FluidStack aFluid, boolean doDrain)
+ public FluidStack drain(final ForgeDirection aSide, final FluidStack aFluid, final boolean doDrain)
{
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, false);
- if ((tTileEntity == null) || (!getBaseMetaTileEntity().isAllowedToWork())) {
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, false);
+ if ((tTileEntity == null) || (!this.getBaseMetaTileEntity().isAllowedToWork())) {
return null;
}
return tTileEntity.drain(aSide, aFluid, doDrain);
@@ -446,22 +446,22 @@ extends GT_MetaTileEntity_BasicTank
public void onPostTick()
{
- if ((getBaseMetaTileEntity().isServerSide()) && (getBaseMetaTileEntity().isAllowedToWork()))
+ if ((this.getBaseMetaTileEntity().isServerSide()) && (this.getBaseMetaTileEntity().isAllowedToWork()))
{
- GT_MetaTileEntity_TesseractGenerator tTileEntity = getTesseract(this.mFrequency, true);
+ final GT_MetaTileEntity_TesseractGenerator tTileEntity = this.getTesseract(this.mFrequency, true);
if (tTileEntity != null)
{
tTileEntity.addEnergyConsumption(this);
- if ((!this.mDidWork) && (getTesseract(this.mFrequency, false) != null))
+ if ((!this.mDidWork) && (this.getTesseract(this.mFrequency, false) != null))
{
this.mDidWork = true;
- getBaseMetaTileEntity().issueBlockUpdate();
+ this.getBaseMetaTileEntity().issueBlockUpdate();
}
}
else if (this.mDidWork == true)
{
this.mDidWork = false;
- getBaseMetaTileEntity().issueBlockUpdate();
+ this.getBaseMetaTileEntity().issueBlockUpdate();
}
}
}
@@ -473,22 +473,22 @@ extends GT_MetaTileEntity_BasicTank
}
@Override
- public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
+ public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
return false;
}
@Override
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
+ public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
return false;
}
@Override
- public ITexture[][][] getTextureSet(ITexture[] aTextures) {
+ public ITexture[][][] getTextureSet(final ITexture[] aTextures) {
return new ITexture[0][0][0];
}
@Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
return aSide == aFacing ? new ITexture[]{new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional), new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Screen_Frequency)} : new ITexture[]{new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Dimensional), new GT_RenderedTexture(Textures.BlockIcons.VOID)};
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Solar.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Solar.java
index c2cadab478..3c90bf6836 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Solar.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Solar.java
@@ -17,128 +17,135 @@ import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidHandler;
public class GT_MetaTileEntity_Boiler_Solar
- extends GT_MetaTileEntity_Boiler {
- public GT_MetaTileEntity_Boiler_Solar(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional, "Steam Power by the Sun", new ITexture[0]);
- }
+extends GT_MetaTileEntity_Boiler {
+ public GT_MetaTileEntity_Boiler_Solar(final int aID, final String aName, final String aNameRegional) {
+ super(aID, aName, aNameRegional, "Steam Power by the Sun", new ITexture[0]);
+ }
- public GT_MetaTileEntity_Boiler_Solar(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, aDescription, aTextures);
- }
+ public GT_MetaTileEntity_Boiler_Solar(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) {
+ super(aName, aTier, aDescription, aTextures);
+ }
- public ITexture[][][] getTextureSet(ITexture[] aTextures) {
- ITexture[][][] rTextures = new ITexture[4][17][];
- for (byte i = -1; i < 16; i = (byte) (i + 1)) {
- ITexture[] tmp0 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
- rTextures[0][(i + 1)] = tmp0;
- ITexture[] tmp1 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.BOILER_SOLAR)};
- rTextures[1][(i + 1)] = tmp1;
- ITexture[] tmp2 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
- rTextures[2][(i + 1)] = tmp2;
- ITexture[] tmp3 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE)};
- rTextures[3][(i + 1)] = tmp3;
- }
- return rTextures;
- }
+ @Override
+ public ITexture[][][] getTextureSet(final ITexture[] aTextures) {
+ final ITexture[][][] rTextures = new ITexture[4][17][];
+ for (byte i = -1; i < 16; i = (byte) (i + 1)) {
+ final ITexture[] tmp0 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
+ rTextures[0][(i + 1)] = tmp0;
+ final ITexture[] tmp1 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.BOILER_SOLAR)};
+ rTextures[1][(i + 1)] = tmp1;
+ final ITexture[] tmp2 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa))};
+ rTextures[2][(i + 1)] = tmp2;
+ final ITexture[] tmp3 = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE)};
+ rTextures[3][(i + 1)] = tmp3;
+ }
+ return rTextures;
+ }
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- return mTextures[aSide >= 2 ? ((byte) (aSide != aFacing ? 2 : 3)) : aSide][aColorIndex + 1];
- }
+ @Override
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ return this.mTextures[aSide >= 2 ? ((byte) (aSide != aFacing ? 2 : 3)) : aSide][aColorIndex + 1];
+ }
- public int maxProgresstime() {
- return 500;
- }
+ @Override
+ public int maxProgresstime() {
+ return 500;
+ }
- public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_Container_Boiler(aPlayerInventory, aBaseMetaTileEntity, 16000);
- }
+ @Override
+ public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GT_Container_Boiler(aPlayerInventory, aBaseMetaTileEntity, 16000);
+ }
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_Boiler(aPlayerInventory, aBaseMetaTileEntity, "SolarBoiler.png", 16000);
- }
+ @Override
+ public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GT_GUIContainer_Boiler(aPlayerInventory, aBaseMetaTileEntity, "SolarBoiler.png", 16000);
+ }
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_Boiler_Solar(this.mName, this.mTier, this.mDescription, this.mTextures);
- }
-
- private int mRunTime = 0;
-
- @Override
- public void saveNBTData(NBTTagCompound aNBT) {
- super.saveNBTData(aNBT);
- aNBT.setInteger("mRunTime", this.mRunTime);
- }
+ @Override
+ public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_Boiler_Solar(this.mName, this.mTier, this.mDescription, this.mTextures);
+ }
- @Override
- public void loadNBTData(NBTTagCompound aNBT) {
- super.loadNBTData(aNBT);
- this.mRunTime = aNBT.getInteger("mRunTime");
- }
+ private int mRunTime = 0;
- public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
- if ((aBaseMetaTileEntity.isServerSide()) && (aTick > 20L)) {
- if (this.mTemperature <= 20) {
- this.mTemperature = 20;
- this.mLossTimer = 0;
- }
- if (++this.mLossTimer > 45) {
- this.mTemperature -= 1;
- this.mLossTimer = 0;
- }
- if (this.mSteam != null) {
- byte i = aBaseMetaTileEntity.getFrontFacing();
- IFluidHandler tTileEntity = aBaseMetaTileEntity.getITankContainerAtSide(i);
- if (tTileEntity != null) {
- FluidStack tDrained = aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), Math.max(1, this.mSteam.amount / 2), false);
- if (tDrained != null) {
- int tFilledAmount = tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), tDrained, false);
- if (tFilledAmount > 0) {
- tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), tFilledAmount, true), true);
- }
- }
- }
- }
- if (aTick % 25L == 0L) {
- if (this.mTemperature > 100) {
- if ((this.mFluid == null) || (!GT_ModHandler.isWater(this.mFluid)) || (this.mFluid.amount <= 0)) {
- this.mHadNoWater = true;
- } else {
- if (this.mHadNoWater) {
- aBaseMetaTileEntity.doExplosion(2048L);
- return;
- }
- this.mFluid.amount -= 1;
- mRunTime += 1;
- int tOutput = 150;
- if(mRunTime > 10000){
- tOutput = Math.max(50, 150 - ((mRunTime-10000)/100));
- }
- if (this.mSteam == null) {
- this.mSteam = GT_ModHandler.getSteam(tOutput);
- } else if (GT_ModHandler.isSteam(this.mSteam)) {
- this.mSteam.amount += tOutput;
- } else {
- this.mSteam = GT_ModHandler.getSteam(tOutput);
- }
- }
- } else {
- this.mHadNoWater = false;
- }
- }
- if ((this.mSteam != null) &&
- (this.mSteam.amount > 16000)) {
- sendSound((byte) 1);
- this.mSteam.amount = 12000;
- }
- if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) && (aTick % 256L == 0L) && (!aBaseMetaTileEntity.getWorld().isThundering())) {
- boolean bRain = aBaseMetaTileEntity.getWorld().isRaining() && aBaseMetaTileEntity.getBiome().rainfall > 0.0F;
- mProcessingEnergy += bRain && aBaseMetaTileEntity.getWorld().skylightSubtracted >= 4 || !aBaseMetaTileEntity.getSkyAtSide((byte) 1) ? 0 : !bRain && aBaseMetaTileEntity.getWorld().isDaytime() ? 8 : 1;
- }
- if ((this.mTemperature < 500) && (this.mProcessingEnergy > 0) && (aTick % 12L == 0L)) {
- this.mProcessingEnergy -= 1;
- this.mTemperature += 1;
- }
- aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0);
- }
- }
+ @Override
+ public void saveNBTData(final NBTTagCompound aNBT) {
+ super.saveNBTData(aNBT);
+ aNBT.setInteger("mRunTime", this.mRunTime);
+ }
+
+ @Override
+ public void loadNBTData(final NBTTagCompound aNBT) {
+ super.loadNBTData(aNBT);
+ this.mRunTime = aNBT.getInteger("mRunTime");
+ }
+
+ @Override
+ public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) {
+ if ((aBaseMetaTileEntity.isServerSide()) && (aTick > 20L)) {
+ if (this.mTemperature <= 20) {
+ this.mTemperature = 20;
+ this.mLossTimer = 0;
+ }
+ if (++this.mLossTimer > 45) {
+ this.mTemperature -= 1;
+ this.mLossTimer = 0;
+ }
+ if (this.mSteam != null) {
+ final byte i = aBaseMetaTileEntity.getFrontFacing();
+ final IFluidHandler tTileEntity = aBaseMetaTileEntity.getITankContainerAtSide(i);
+ if (tTileEntity != null) {
+ final FluidStack tDrained = aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), Math.max(1, this.mSteam.amount / 2), false);
+ if (tDrained != null) {
+ final int tFilledAmount = tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), tDrained, false);
+ if (tFilledAmount > 0) {
+ tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), tFilledAmount, true), true);
+ }
+ }
+ }
+ }
+ if ((aTick % 25L) == 0L) {
+ if (this.mTemperature > 100) {
+ if ((this.mFluid == null) || (!GT_ModHandler.isWater(this.mFluid)) || (this.mFluid.amount <= 0)) {
+ this.mHadNoWater = true;
+ } else {
+ if (this.mHadNoWater) {
+ aBaseMetaTileEntity.doExplosion(2048L);
+ return;
+ }
+ this.mFluid.amount -= 1;
+ this.mRunTime += 1;
+ int tOutput = 150;
+ if(this.mRunTime > 10000){
+ tOutput = Math.max(50, 150 - ((this.mRunTime-10000)/100));
+ }
+ if (this.mSteam == null) {
+ this.mSteam = GT_ModHandler.getSteam(tOutput);
+ } else if (GT_ModHandler.isSteam(this.mSteam)) {
+ this.mSteam.amount += tOutput;
+ } else {
+ this.mSteam = GT_ModHandler.getSteam(tOutput);
+ }
+ }
+ } else {
+ this.mHadNoWater = false;
+ }
+ }
+ if ((this.mSteam != null) &&
+ (this.mSteam.amount > 16000)) {
+ this.sendSound((byte) 1);
+ this.mSteam.amount = 12000;
+ }
+ if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) && ((aTick % 256L) == 0L) && (!aBaseMetaTileEntity.getWorld().isThundering())) {
+ final boolean bRain = aBaseMetaTileEntity.getWorld().isRaining() && (aBaseMetaTileEntity.getBiome().rainfall > 0.0F);
+ this.mProcessingEnergy += (bRain && (aBaseMetaTileEntity.getWorld().skylightSubtracted >= 4)) || !aBaseMetaTileEntity.getSkyAtSide((byte) 1) ? 0 : !bRain && aBaseMetaTileEntity.getWorld().isDaytime() ? 8 : 1;
+ }
+ if ((this.mTemperature < 500) && (this.mProcessingEnergy > 0) && ((aTick % 12L) == 0L)) {
+ this.mProcessingEnergy -= 1;
+ this.mTemperature += 1;
+ }
+ aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0);
+ }
+ }
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityDoubleFuelGeneratorBase.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityDoubleFuelGeneratorBase.java
index b3a1fb456c..6ba0cb0d76 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityDoubleFuelGeneratorBase.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityDoubleFuelGeneratorBase.java
@@ -1,5 +1,6 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.generators;
+import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.GregTech_API;
import gregtech.api.enums.*;
import gregtech.api.interfaces.ITexture;
@@ -11,124 +12,123 @@ import gregtech.api.util.GT_Recipe;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.generators.GregtechRocketFuelGeneratorBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import net.minecraft.item.ItemStack;
-import cpw.mods.fml.common.registry.GameRegistry;
public class GregtechMetaTileEntityDoubleFuelGeneratorBase
- extends GregtechRocketFuelGeneratorBase {
+extends GregtechRocketFuelGeneratorBase {
- public int mEfficiency;
+ public int mEfficiency;
- public GregtechMetaTileEntityDoubleFuelGeneratorBase(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, "Requires two liquid Fuels. Fuel A is Fastburn, Fuel B is slowburn.", new ITexture[0]);
- onConfigLoad();
- }
+ public GregtechMetaTileEntityDoubleFuelGeneratorBase(final int aID, final String aName, final String aNameRegional, final int aTier) {
+ super(aID, aName, aNameRegional, aTier, "Requires two liquid Fuels. Fuel A is Fastburn, Fuel B is slowburn.", new ITexture[0]);
+ this.onConfigLoad();
+ }
- public GregtechMetaTileEntityDoubleFuelGeneratorBase(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, aDescription, aTextures);
- onConfigLoad();
- }
+ public GregtechMetaTileEntityDoubleFuelGeneratorBase(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) {
+ super(aName, aTier, aDescription, aTextures);
+ this.onConfigLoad();
+ }
- @Override
- public boolean isOutputFacing(byte aSide) {
- return aSide == getBaseMetaTileEntity().getFrontFacing();
- }
+ @Override
+ public boolean isOutputFacing(final byte aSide) {
+ return aSide == this.getBaseMetaTileEntity().getFrontFacing();
+ }
- @Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GregtechMetaTileEntityDoubleFuelGeneratorBase(this.mName, this.mTier, this.mDescription, this.mTextures);
- }
+ @Override
+ public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntityDoubleFuelGeneratorBase(this.mName, this.mTier, this.mDescription, this.mTextures);
+ }
- @Override
+ @Override
public GT_Recipe.GT_Recipe_Map getRecipes() {
- return GT_Recipe.GT_Recipe_Map.sDieselFuels;
- }
+ return GT_Recipe.GT_Recipe_Map.sDieselFuels;
+ }
- @Override
+ @Override
public int getCapacity() {
- return 32000;
- }
+ return 32000;
+ }
- public void onConfigLoad() {
- this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "RocketEngine.efficiency.tier." + this.mTier, (100 - this.mTier * 8));
- }
+ public void onConfigLoad() {
+ this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "RocketEngine.efficiency.tier." + this.mTier, (100 - (this.mTier * 8)));
+ }
- @Override
+ @Override
public int getEfficiency() {
- return this.mEfficiency;
- }
-
- @Override
- public int getFuelValue(ItemStack aStack) {
- int rValue = Math.max(GT_ModHandler.getFuelCanValue(aStack) * 6 / 5, super.getFuelValue(aStack));
- if (ItemList.Fuel_Can_Plastic_Filled.isStackEqual(aStack, false, true)) {
- rValue = Math.max(rValue, GameRegistry.getFuelValue(aStack) * 3);
- }
- return rValue;
- }
-
- private GT_RenderedTexture getCasingTexture(){
- if (this.mTier <= 4){
- return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top);
- }
- else if (this.mTier == 5){
-
- return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Advanced);
- }
- else {
-
- return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Ultra);
- }
+ return this.mEfficiency;
+ }
+
+ @Override
+ public int getFuelValue(final ItemStack aStack) {
+ int rValue = Math.max((GT_ModHandler.getFuelCanValue(aStack) * 6) / 5, super.getFuelValue(aStack));
+ if (ItemList.Fuel_Can_Plastic_Filled.isStackEqual(aStack, false, true)) {
+ rValue = Math.max(rValue, GameRegistry.getFuelValue(aStack) * 3);
+ }
+ return rValue;
+ }
+
+ private GT_RenderedTexture getCasingTexture(){
+ if (this.mTier <= 4){
+ return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top);
+ }
+ else if (this.mTier == 5){
+
+ return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Advanced);
+ }
+ else {
+
+ return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Ultra);
+ }
//return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top);
- }
-
-
- @Override
- public ITexture[] getFront(byte aColor) {
- return new ITexture[]{super.getFront(aColor)[0], getCasingTexture(), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]};
- }
-
- @Override
- public ITexture[] getBack(byte aColor) {
- return new ITexture[]{super.getBack(aColor)[0], getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent)};
- }
-
- @Override
- public ITexture[] getBottom(byte aColor) {
- return new ITexture[]{super.getBottom(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)};
- }
-
- @Override
- public ITexture[] getTop(byte aColor) {
- return new ITexture[]{super.getTop(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_Off)};
- }
-
- @Override
- public ITexture[] getSides(byte aColor) {
- return new ITexture[]{super.getSides(aColor)[0], getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal)};
- }
-
- @Override
- public ITexture[] getFrontActive(byte aColor) {
- return new ITexture[]{super.getFrontActive(aColor)[0], getCasingTexture(), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]};
- }
-
- @Override
- public ITexture[] getBackActive(byte aColor) {
- return new ITexture[]{super.getBackActive(aColor)[0], getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent_Fast)};
- }
-
- @Override
- public ITexture[] getBottomActive(byte aColor) {
- return new ITexture[]{super.getBottomActive(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)};
- }
-
- @Override
- public ITexture[] getTopActive(byte aColor) {
- return new ITexture[]{super.getTopActive(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_On)};
- }
-
- @Override
- public ITexture[] getSidesActive(byte aColor) {
- return new ITexture[]{super.getSidesActive(aColor)[0], getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal_Active)};
- }
+ }
+
+
+ @Override
+ public ITexture[] getFront(final byte aColor) {
+ return new ITexture[]{super.getFront(aColor)[0], this.getCasingTexture(), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]};
+ }
+
+ @Override
+ public ITexture[] getBack(final byte aColor) {
+ return new ITexture[]{super.getBack(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent)};
+ }
+
+ @Override
+ public ITexture[] getBottom(final byte aColor) {
+ return new ITexture[]{super.getBottom(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)};
+ }
+
+ @Override
+ public ITexture[] getTop(final byte aColor) {
+ return new ITexture[]{super.getTop(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_Off)};
+ }
+
+ @Override
+ public ITexture[] getSides(final byte aColor) {
+ return new ITexture[]{super.getSides(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal)};
+ }
+
+ @Override
+ public ITexture[] getFrontActive(final byte aColor) {
+ return new ITexture[]{super.getFrontActive(aColor)[0], this.getCasingTexture(), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]};
+ }
+
+ @Override
+ public ITexture[] getBackActive(final byte aColor) {
+ return new ITexture[]{super.getBackActive(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent_Fast)};
+ }
+
+ @Override
+ public ITexture[] getBottomActive(final byte aColor) {
+ return new ITexture[]{super.getBottomActive(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)};
+ }
+
+ @Override
+ public ITexture[] getTopActive(final byte aColor) {
+ return new ITexture[]{super.getTopActive(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_On)};
+ }
+
+ @Override
+ public ITexture[] getSidesActive(final byte aColor) {
+ return new ITexture[]{super.getSidesActive(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal_Active)};
+ }
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityGeothermalGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityGeothermalGenerator.java
index f4ee1c97b1..b6053d8d5e 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityGeothermalGenerator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityGeothermalGenerator.java
@@ -1,5 +1,6 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.generators;
+import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.GregTech_API;
import gregtech.api.enums.*;
import gregtech.api.interfaces.ITexture;
@@ -12,7 +13,6 @@ import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
-import cpw.mods.fml.common.registry.GameRegistry;
public class GregtechMetaTileEntityGeothermalGenerator
extends GT_MetaTileEntity_BasicGenerator
@@ -20,24 +20,24 @@ extends GT_MetaTileEntity_BasicGenerator
public int mEfficiency;
- public GregtechMetaTileEntityGeothermalGenerator(int aID, String aName, String aNameRegional, int aTier) {
+ public GregtechMetaTileEntityGeothermalGenerator(final int aID, final String aName, final String aNameRegional, final int aTier) {
super(aID, aName, aNameRegional, aTier, "Requires Pahoehoe Lava or Normal Lava as Fuel", new ITexture[0]);
- onConfigLoad();
+ this.onConfigLoad();
}
- public GregtechMetaTileEntityGeothermalGenerator(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
+ public GregtechMetaTileEntityGeothermalGenerator(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) {
super(aName, aTier, aDescription, aTextures);
- onConfigLoad();
- }
+ this.onConfigLoad();
+ }
@Override
- public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
+ public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) {
if (aBaseMetaTileEntity.isClientSide()){
return true;
}
aBaseMetaTileEntity.openGUI(aPlayer);
return true;
- }
+ }
@Override
public int getCapacity() {
@@ -46,7 +46,7 @@ extends GT_MetaTileEntity_BasicGenerator
}
public void onConfigLoad() {
- this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "ThermalGenerator.efficiency.tier." + this.mTier, (100 - this.mTier * 7));
+ this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "ThermalGenerator.efficiency.tier." + this.mTier, (100 - (this.mTier * 7)));
}
@Override
@@ -55,8 +55,8 @@ extends GT_MetaTileEntity_BasicGenerator
}
@Override
- public int getFuelValue(ItemStack aStack) {
- int rValue = Math.max(GT_ModHandler.getFuelCanValue(aStack) * 6 / 5, super.getFuelValue(aStack));
+ public int getFuelValue(final ItemStack aStack) {
+ int rValue = Math.max((GT_ModHandler.getFuelCanValue(aStack) * 6) / 5, super.getFuelValue(aStack));
if (ItemList.Fuel_Can_Plastic_Filled.isStackEqual(aStack, false, true)) {
rValue = Math.max(rValue, GameRegistry.getFuelValue(aStack) * 3);
}
@@ -64,62 +64,62 @@ extends GT_MetaTileEntity_BasicGenerator
}
@Override
- public boolean isOutputFacing(byte aSide) {
- return aSide == getBaseMetaTileEntity().getFrontFacing();
+ public boolean isOutputFacing(final byte aSide) {
+ return aSide == this.getBaseMetaTileEntity().getFrontFacing();
}
@Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
return new GregtechMetaTileEntityGeothermalGenerator(this.mName, this.mTier, this.mDescription, this.mTextures);
}
@Override
- public ITexture[] getFront(byte aColor) {
+ public ITexture[] getFront(final byte aColor) {
return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]};
}
@Override
- public ITexture[] getBack(byte aColor) {
+ public ITexture[] getBack(final byte aColor) {
return new ITexture[]{super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BACK), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Vertical)};
}
@Override
- public ITexture[] getBottom(byte aColor) {
+ public ITexture[] getBottom(final byte aColor) {
return new ITexture[]{super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM)};
}
@Override
- public ITexture[] getTop(byte aColor) {
+ public ITexture[] getTop(final byte aColor) {
return new ITexture[]{super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER)};
}
@Override
- public ITexture[] getSides(byte aColor) {
+ public ITexture[] getSides(final byte aColor) {
return new ITexture[]{super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.BOILER_LAVA_FRONT)};
}
@Override
- public ITexture[] getFrontActive(byte aColor) {
+ public ITexture[] getFrontActive(final byte aColor) {
return new ITexture[]{super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE_ACTIVE), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]};
}
@Override
- public ITexture[] getBackActive(byte aColor) {
+ public ITexture[] getBackActive(final byte aColor) {
return new ITexture[]{super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BACK_ACTIVE), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Vertical_Active)};
}
@Override
- public ITexture[] getBottomActive(byte aColor) {
+ public ITexture[] getBottomActive(final byte aColor) {
return new ITexture[]{super.getBottomActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_BOTTOM_ACTIVE)};
}
@Override
- public ITexture[] getTopActive(byte aColor) {
+ public ITexture[] getTopActive(final byte aColor) {
return new ITexture[]{super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE)};
}
@Override
- public ITexture[] getSidesActive(byte aColor) {
+ public ITexture[] getSidesActive(final byte aColor) {
return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.BOILER_LAVA_FRONT_ACTIVE)};
}
@@ -127,7 +127,7 @@ extends GT_MetaTileEntity_BasicGenerator
@Override
public String[] getDescription()
{
- return new String[] {"Generates power from Lava/Pahoehoe at " + getEfficiency() + "% Efficiency per tick"};
+ return new String[] {"Generates power from Lava/Pahoehoe at " + this.getEfficiency() + "% Efficiency per tick"};
}
@Override
@@ -136,7 +136,7 @@ extends GT_MetaTileEntity_BasicGenerator
return GT_Recipe_Map.sHotFuels;
}
-
+
public int getPollution() {
return 100;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityRocketFuelGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityRocketFuelGenerator.java
index ee36a920b0..b63c367fd5 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityRocketFuelGenerator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityRocketFuelGenerator.java
@@ -1,5 +1,6 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.generators;
+import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.GregTech_API;
import gregtech.api.enums.*;
import gregtech.api.interfaces.ITexture;
@@ -11,124 +12,123 @@ import gregtech.api.util.GT_Recipe;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.generators.GregtechRocketFuelGeneratorBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import net.minecraft.item.ItemStack;
-import cpw.mods.fml.common.registry.GameRegistry;
public class GregtechMetaTileEntityRocketFuelGenerator
- extends GregtechRocketFuelGeneratorBase {
+extends GregtechRocketFuelGeneratorBase {
- public int mEfficiency;
+ public int mEfficiency;
- public GregtechMetaTileEntityRocketFuelGenerator(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, "Requires liquid Fuels.", new ITexture[0]);
- onConfigLoad();
- }
+ public GregtechMetaTileEntityRocketFuelGenerator(final int aID, final String aName, final String aNameRegional, final int aTier) {
+ super(aID, aName, aNameRegional, aTier, "Requires liquid Fuels.", new ITexture[0]);
+ this.onConfigLoad();
+ }
- public GregtechMetaTileEntityRocketFuelGenerator(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, aDescription, aTextures);
- onConfigLoad();
- }
+ public GregtechMetaTileEntityRocketFuelGenerator(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) {
+ super(aName, aTier, aDescription, aTextures);
+ this.onConfigLoad();
+ }
- @Override
- public boolean isOutputFacing(byte aSide) {
- return aSide == getBaseMetaTileEntity().getFrontFacing();
- }
+ @Override
+ public boolean isOutputFacing(final byte aSide) {
+ return aSide == this.getBaseMetaTileEntity().getFrontFacing();
+ }
- @Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GregtechMetaTileEntityRocketFuelGenerator(this.mName, this.mTier, this.mDescription, this.mTextures);
- }
+ @Override
+ public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntityRocketFuelGenerator(this.mName, this.mTier, this.mDescription, this.mTextures);
+ }
- @Override
+ @Override
public GT_Recipe.GT_Recipe_Map getRecipes() {
- return GT_Recipe.GT_Recipe_Map.sDieselFuels;
- }
+ return GT_Recipe.GT_Recipe_Map.sDieselFuels;
+ }
- @Override
+ @Override
public int getCapacity() {
- return 32000;
- }
+ return 32000;
+ }
- public void onConfigLoad() {
- this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "RocketEngine.efficiency.tier." + this.mTier, (100 - this.mTier * 8));
- }
+ public void onConfigLoad() {
+ this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "RocketEngine.efficiency.tier." + this.mTier, (100 - (this.mTier * 8)));
+ }
- @Override
+ @Override
public int getEfficiency() {
- return this.mEfficiency;
- }
-
- @Override
- public int getFuelValue(ItemStack aStack) {
- int rValue = Math.max(GT_ModHandler.getFuelCanValue(aStack) * 6 / 5, super.getFuelValue(aStack));
- if (ItemList.Fuel_Can_Plastic_Filled.isStackEqual(aStack, false, true)) {
- rValue = Math.max(rValue, GameRegistry.getFuelValue(aStack) * 3);
- }
- return rValue;
- }
-
- private GT_RenderedTexture getCasingTexture(){
- if (this.mTier <= 4){
- return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top);
- }
- else if (this.mTier == 5){
-
- return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Advanced);
- }
- else{
-
- return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Ultra);
- }
+ return this.mEfficiency;
+ }
+
+ @Override
+ public int getFuelValue(final ItemStack aStack) {
+ int rValue = Math.max((GT_ModHandler.getFuelCanValue(aStack) * 6) / 5, super.getFuelValue(aStack));
+ if (ItemList.Fuel_Can_Plastic_Filled.isStackEqual(aStack, false, true)) {
+ rValue = Math.max(rValue, GameRegistry.getFuelValue(aStack) * 3);
+ }
+ return rValue;
+ }
+
+ private GT_RenderedTexture getCasingTexture(){
+ if (this.mTier <= 4){
+ return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top);
+ }
+ else if (this.mTier == 5){
+
+ return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Advanced);
+ }
+ else{
+
+ return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Ultra);
+ }
//return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top);
- }
-
-
- @Override
- public ITexture[] getFront(byte aColor) {
- return new ITexture[]{super.getFront(aColor)[0], getCasingTexture(), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]};
- }
-
- @Override
- public ITexture[] getBack(byte aColor) {
- return new ITexture[]{super.getBack(aColor)[0], getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent)};
- }
-
- @Override
- public ITexture[] getBottom(byte aColor) {
- return new ITexture[]{super.getBottom(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)};
- }
-
- @Override
- public ITexture[] getTop(byte aColor) {
- return new ITexture[]{super.getTop(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_Off)};
- }
-
- @Override
- public ITexture[] getSides(byte aColor) {
- return new ITexture[]{super.getSides(aColor)[0], getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal)};
- }
-
- @Override
- public ITexture[] getFrontActive(byte aColor) {
- return new ITexture[]{super.getFrontActive(aColor)[0], getCasingTexture(), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]};
- }
-
- @Override
- public ITexture[] getBackActive(byte aColor) {
- return new ITexture[]{super.getBackActive(aColor)[0], getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent_Fast)};
- }
-
- @Override
- public ITexture[] getBottomActive(byte aColor) {
- return new ITexture[]{super.getBottomActive(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)};
- }
-
- @Override
- public ITexture[] getTopActive(byte aColor) {
- return new ITexture[]{super.getTopActive(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_On)};
- }
-
- @Override
- public ITexture[] getSidesActive(byte aColor) {
- return new ITexture[]{super.getSidesActive(aColor)[0], getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal_Active)};
- }
+ }
+
+
+ @Override
+ public ITexture[] getFront(final byte aColor) {
+ return new ITexture[]{super.getFront(aColor)[0], this.getCasingTexture(), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]};
+ }
+
+ @Override
+ public ITexture[] getBack(final byte aColor) {
+ return new ITexture[]{super.getBack(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent)};
+ }
+
+ @Override
+ public ITexture[] getBottom(final byte aColor) {
+ return new ITexture[]{super.getBottom(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)};
+ }
+
+ @Override
+ public ITexture[] getTop(final byte aColor) {
+ return new ITexture[]{super.getTop(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_Off)};
+ }
+
+ @Override
+ public ITexture[] getSides(final byte aColor) {
+ return new ITexture[]{super.getSides(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal)};
+ }
+
+ @Override
+ public ITexture[] getFrontActive(final byte aColor) {
+ return new ITexture[]{super.getFrontActive(aColor)[0], this.getCasingTexture(), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]};
+ }
+
+ @Override
+ public ITexture[] getBackActive(final byte aColor) {
+ return new ITexture[]{super.getBackActive(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent_Fast)};
+ }
+
+ @Override
+ public ITexture[] getBottomActive(final byte aColor) {
+ return new ITexture[]{super.getBottomActive(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Bottom)};
+ }
+
+ @Override
+ public ITexture[] getTopActive(final byte aColor) {
+ return new ITexture[]{super.getTopActive(aColor)[0], new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_On)};
+ }
+
+ @Override
+ public ITexture[] getSidesActive(final byte aColor) {
+ return new ITexture[]{super.getSidesActive(aColor)[0], this.getCasingTexture(), new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Diesel_Horizontal_Active)};
+ }
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java
index c41c1851fa..a268ade81e 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java
@@ -1,6 +1,7 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.generators;
import static gregtech.api.enums.GT_Values.V;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.ConfigCategories;
import gregtech.api.enums.Textures;
@@ -16,45 +17,45 @@ import net.minecraft.entity.player.InventoryPlayer;
public class GregtechMetaTileEntitySolarGenerator extends GregtechMetaSolarGenerator {
- public GregtechMetaTileEntitySolarGenerator(int aID, String aName, String aNameRegional, int aTier) {
+ public GregtechMetaTileEntitySolarGenerator(final int aID, final String aName, final String aNameRegional, final int aTier) {
super(aID, aName, aNameRegional, aTier, "Feasts on the power of the Sun!", new ITexture[0]);
- onConfigLoad();
+ this.onConfigLoad();
}
- public GregtechMetaTileEntitySolarGenerator(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
+ public GregtechMetaTileEntitySolarGenerator(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) {
super(aName, aTier, aDescription, aTextures);
- onConfigLoad();
+ this.onConfigLoad();
}
@Override
- public boolean isOutputFacing(byte aSide) {
- return aSide == getBaseMetaTileEntity().getFrontFacing();
+ public boolean isOutputFacing(final byte aSide) {
+ return aSide == this.getBaseMetaTileEntity().getFrontFacing();
}
@Override
- public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
+ public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) {
return new CONTAINER_SolarGenerator(aPlayerInventory, aBaseMetaTileEntity, 16000);
}
@Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
+ public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) {
return new GUI_SolarGenerator(aPlayerInventory, aBaseMetaTileEntity, "SolarBoiler.png", 16000);
}
@Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
return new GregtechMetaTileEntitySolarGenerator(this.mName, this.mTier, this.mDescription, this.mTextures);
}
public void onConfigLoad() {
- this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "SunAbsorber.efficiency.tier." + this.mTier, 100 - this.mTier * 10);
+ this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "SunAbsorber.efficiency.tier." + this.mTier, 100 - (this.mTier * 10));
}
@Override
- public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) {
if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork()
- && aBaseMetaTileEntity.getUniversalEnergyStored() < maxEUOutput() + aBaseMetaTileEntity.getEUCapacity()) {
+ && (aBaseMetaTileEntity.getUniversalEnergyStored() < (this.maxEUOutput() + aBaseMetaTileEntity.getEUCapacity()))) {
if (this.mSolarCharge <= 20) {
//Utils.LOG_WARNING("1.");
@@ -67,32 +68,32 @@ public class GregtechMetaTileEntitySolarGenerator extends GregtechMetaSolarGener
this.mLossTimer = 0;
}
- if (aTick % 10L == 0L) {
+ if ((aTick % 10L) == 0L) {
- Utils.LOG_WARNING("getUniversalEnergyStored: "+aBaseMetaTileEntity.getUniversalEnergyStored() + " maxEUOutput * 20 + getMinimumStoredEU: " + (maxEUOutput() * 20 + getMinimumStoredEU()));
+ Utils.LOG_WARNING("getUniversalEnergyStored: "+aBaseMetaTileEntity.getUniversalEnergyStored() + " maxEUOutput * 20 + getMinimumStoredEU: " + ((this.maxEUOutput() * 20) + this.getMinimumStoredEU()));
- if ((this.mSolarCharge > 100) && (aBaseMetaTileEntity.isAllowedToWork()) &&
- (!aBaseMetaTileEntity.getWorld().isThundering()) &&
- aBaseMetaTileEntity.getUniversalEnergyStored() < (maxEUStore() - getMinimumStoredEU())) {
- getBaseMetaTileEntity().increaseStoredEnergyUnits(sEnergyPerTick * getEfficiency(), true);
+ if ((this.mSolarCharge > 100) && (aBaseMetaTileEntity.isAllowedToWork()) &&
+ (!aBaseMetaTileEntity.getWorld().isThundering()) &&
+ (aBaseMetaTileEntity.getUniversalEnergyStored() < (this.maxEUStore() - this.getMinimumStoredEU()))) {
+ this.getBaseMetaTileEntity().increaseStoredEnergyUnits(sEnergyPerTick * this.getEfficiency(), true);
}
- }
+ }
- if ((this.mSolarCharge < 500) && (this.mProcessingEnergy != 0) && (aTick % 32L == 0L)) {
- Utils.LOG_WARNING("Adding Solar Charge. Currently "+mSolarCharge);
+ if ((this.mSolarCharge < 500) && (this.mProcessingEnergy != 0) && ((aTick % 32L) == 0L)) {
+ Utils.LOG_WARNING("Adding Solar Charge. Currently "+this.mSolarCharge);
this.mProcessingEnergy -= 1;
this.mSolarCharge += 1;
}
- if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) && (aTick % 64L == 0L) && (!aBaseMetaTileEntity.getWorld().isThundering())) {
- Utils.LOG_WARNING("Adding Processing Energy. Currently "+mProcessingEnergy);
- boolean bRain = aBaseMetaTileEntity.getWorld().isRaining() && aBaseMetaTileEntity.getBiome().rainfall > 0.0F;
- mProcessingEnergy += bRain && aBaseMetaTileEntity.getWorld().skylightSubtracted >= 4 || !aBaseMetaTileEntity.getSkyAtSide((byte) 1) ? 0 : !bRain && aBaseMetaTileEntity.getWorld().isDaytime() ? 8 : 1;
+ if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) && ((aTick % 64L) == 0L) && (!aBaseMetaTileEntity.getWorld().isThundering())) {
+ Utils.LOG_WARNING("Adding Processing Energy. Currently "+this.mProcessingEnergy);
+ final boolean bRain = aBaseMetaTileEntity.getWorld().isRaining() && (aBaseMetaTileEntity.getBiome().rainfall > 0.0F);
+ this.mProcessingEnergy += (bRain && (aBaseMetaTileEntity.getWorld().skylightSubtracted >= 4)) || !aBaseMetaTileEntity.getSkyAtSide((byte) 1) ? 0 : !bRain && aBaseMetaTileEntity.getWorld().isDaytime() ? 8 : 1;
}
if (aBaseMetaTileEntity.isServerSide()){
//Utils.LOG_WARNING("6.");
- aBaseMetaTileEntity.setActive(aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity.getUniversalEnergyStored() >= maxEUOutput() + getMinimumStoredEU());
+ aBaseMetaTileEntity.setActive(aBaseMetaTileEntity.isAllowedToWork() && (aBaseMetaTileEntity.getUniversalEnergyStored() >= (this.maxEUOutput() + this.getMinimumStoredEU())));
}
}
}
@@ -109,65 +110,65 @@ public class GregtechMetaTileEntitySolarGenerator extends GregtechMetaSolarGener
@Override
public long maxEUStore() {
- return Math.max(getEUVar(), V[mTier] * 16000 + getMinimumStoredEU());
+ return Math.max(this.getEUVar(), (V[this.mTier] * 16000) + this.getMinimumStoredEU());
}
- ITexture SolarArray[] = {new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_8V),
+ ITexture SolarArray[] = {new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_8V),
new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_LV), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_MV), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_HV),
new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_EV), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_IV), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_LuV),
new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_ZPM), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL_UV), new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL)};
@Override
- public ITexture[] getFront(byte aColor) {
+ public ITexture[] getFront(final byte aColor) {
return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT),
Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]};
}
@Override
- public ITexture[] getBack(byte aColor) {
+ public ITexture[] getBack(final byte aColor) {
return new ITexture[]{super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC)};
}
@Override
- public ITexture[] getBottom(byte aColor) {
+ public ITexture[] getBottom(final byte aColor) {
return new ITexture[]{super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC)};
}
@Override
- public ITexture[] getTop(byte aColor) {
+ public ITexture[] getTop(final byte aColor) {
return new ITexture[]{super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL)};
}
@Override
- public ITexture[] getSides(byte aColor) {
+ public ITexture[] getSides(final byte aColor) {
return new ITexture[]{super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC)};
}
@Override
- public ITexture[] getFrontActive(byte aColor) {
+ public ITexture[] getFrontActive(final byte aColor) {
return new ITexture[]{super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_FRONT_ACTIVE),
Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]};
}
@Override
- public ITexture[] getBackActive(byte aColor) {
+ public ITexture[] getBackActive(final byte aColor) {
return new ITexture[]{super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE)};
}
@Override
- public ITexture[] getBottomActive(byte aColor) {
+ public ITexture[] getBottomActive(final byte aColor) {
return new ITexture[]{super.getBottomActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE)};
}
@Override
- public ITexture[] getTopActive(byte aColor) {
+ public ITexture[] getTopActive(final byte aColor) {
return new ITexture[]{super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.SOLARPANEL)};
}
@Override
- public ITexture[] getSidesActive(byte aColor) {
+ public ITexture[] getSidesActive(final byte aColor) {
return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE)};
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySuperCondensor.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySuperCondensor.java
index 5d1befbbad..89ed69e247 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySuperCondensor.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySuperCondensor.java
@@ -9,96 +9,96 @@ import gregtech.api.util.GT_Recipe;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GregtechMetaSuperConductorNodeBase;
public class GregtechMetaTileEntitySuperCondensor
- extends GregtechMetaSuperConductorNodeBase {
+extends GregtechMetaSuperConductorNodeBase {
- public int mEfficiency;
+ public int mEfficiency;
- public GregtechMetaTileEntitySuperCondensor(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, "Requires liquid Nitrogen/Helium", new ITexture[0]);
- onConfigLoad();
- }
+ public GregtechMetaTileEntitySuperCondensor(final int aID, final String aName, final String aNameRegional, final int aTier) {
+ super(aID, aName, aNameRegional, aTier, "Requires liquid Nitrogen/Helium", new ITexture[0]);
+ this.onConfigLoad();
+ }
- public GregtechMetaTileEntitySuperCondensor(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, aDescription, aTextures);
- onConfigLoad();
- }
+ public GregtechMetaTileEntitySuperCondensor(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) {
+ super(aName, aTier, aDescription, aTextures);
+ this.onConfigLoad();
+ }
- @Override
- public boolean isOutputFacing(byte aSide) {
- return aSide == getBaseMetaTileEntity().getFrontFacing();
- }
+ @Override
+ public boolean isOutputFacing(final byte aSide) {
+ return aSide == this.getBaseMetaTileEntity().getFrontFacing();
+ }
- @Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GregtechMetaTileEntitySuperCondensor(this.mName, this.mTier, this.mDescription, this.mTextures);
- }
+ @Override
+ public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntitySuperCondensor(this.mName, this.mTier, this.mDescription, this.mTextures);
+ }
- @Override
+ @Override
public GT_Recipe.GT_Recipe_Map getRecipes() {
- return GT_Recipe.GT_Recipe_Map.sDieselFuels;
- }
+ return GT_Recipe.GT_Recipe_Map.sDieselFuels;
+ }
- @Override
+ @Override
public int getCapacity() {
- return 64000;
- }
+ return 64000;
+ }
- public void onConfigLoad() {
- this.mEfficiency = 100;
- }
+ public void onConfigLoad() {
+ this.mEfficiency = 100;
+ }
- @Override
+ @Override
public int getEfficiency() {
- return this.mEfficiency;
- }
-
- @Override
- public ITexture[] getFront(byte aColor) {
- return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]};
- }
-
- @Override
- public ITexture[] getBack(byte aColor) {
- return new ITexture[]{super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR), Textures.BlockIcons.OVERLAYS_ENERGY_IN[this.mTier]};
- }
-
- @Override
- public ITexture[] getBottom(byte aColor) {
- return new ITexture[]{super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR), Textures.BlockIcons.OVERLAYS_ENERGY_IN[this.mTier]};
- }
-
- @Override
- public ITexture[] getTop(byte aColor) {
- return new ITexture[]{super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP)};
- }
-
- @Override
- public ITexture[] getSides(byte aColor) {
- return new ITexture[]{super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR), Textures.BlockIcons.OVERLAYS_ENERGY_IN[this.mTier]};
- }
-
- @Override
- public ITexture[] getFrontActive(byte aColor) {
- return new ITexture[]{super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]};
- }
-
- @Override
- public ITexture[] getBackActive(byte aColor) {
- return new ITexture[]{super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR), Textures.BlockIcons.OVERLAYS_ENERGY_IN[this.mTier]};
- }
-
- @Override
- public ITexture[] getBottomActive(byte aColor) {
- return new ITexture[]{super.getBottomActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR), Textures.BlockIcons.OVERLAYS_ENERGY_IN[this.mTier]};
- }
-
- @Override
- public ITexture[] getTopActive(byte aColor) {
- return new ITexture[]{super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP_ACTIVE)};
- }
-
- @Override
- public ITexture[] getSidesActive(byte aColor) {
- return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR), Textures.BlockIcons.OVERLAYS_ENERGY_IN[this.mTier]};
- }
+ return this.mEfficiency;
+ }
+
+ @Override
+ public ITexture[] getFront(final byte aColor) {
+ return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]};
+ }
+
+ @Override
+ public ITexture[] getBack(final byte aColor) {
+ return new ITexture[]{super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR), Textures.BlockIcons.OVERLAYS_ENERGY_IN[this.mTier]};
+ }
+
+ @Override
+ public ITexture[] getBottom(final byte aColor) {
+ return new ITexture[]{super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR), Textures.BlockIcons.OVERLAYS_ENERGY_IN[this.mTier]};
+ }
+
+ @Override
+ public ITexture[] getTop(final byte aColor) {
+ return new ITexture[]{super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP)};
+ }
+
+ @Override
+ public ITexture[] getSides(final byte aColor) {
+ return new ITexture[]{super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR), Textures.BlockIcons.OVERLAYS_ENERGY_IN[this.mTier]};
+ }
+
+ @Override
+ public ITexture[] getFrontActive(final byte aColor) {
+ return new ITexture[]{super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR), Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mTier]};
+ }
+
+ @Override
+ public ITexture[] getBackActive(final byte aColor) {
+ return new ITexture[]{super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR), Textures.BlockIcons.OVERLAYS_ENERGY_IN[this.mTier]};
+ }
+
+ @Override
+ public ITexture[] getBottomActive(final byte aColor) {
+ return new ITexture[]{super.getBottomActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR), Textures.BlockIcons.OVERLAYS_ENERGY_IN[this.mTier]};
+ }
+
+ @Override
+ public ITexture[] getTopActive(final byte aColor) {
+ return new ITexture[]{super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_TOP_ACTIVE)};
+ }
+
+ @Override
+ public ITexture[] getSidesActive(final byte aColor) {
+ return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR), Textures.BlockIcons.OVERLAYS_ENERGY_IN[this.mTier]};
+ }
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityChunkLoader.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityChunkLoader.java
index 0d9fadc6df..b68c49c48c 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityChunkLoader.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityChunkLoader.java
@@ -1,6 +1,7 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic;
import static gregtech.api.enums.GT_Values.V;
+
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -13,117 +14,118 @@ import net.minecraft.nbt.NBTTagCompound;
public class GregtechMetaTileEntityChunkLoader extends GT_MetaTileEntity_TieredMachineBlock {
- public int mRange = 16;
-
- public GregtechMetaTileEntityChunkLoader(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, 0, "Reprells nasty Creatures. Range: " + (4 + (12 * aTier)) + " unpowered / " + (16 + (48 * aTier)) + " powered");
- }
-
- public GregtechMetaTileEntityChunkLoader(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, aInvSlotCount, aDescription, aTextures);
- }
-
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GregtechMetaTileEntityChunkLoader(this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures);
- }
-
- @Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], (aSide != 1) ? null : aActive ? new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE) : new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TELEPORTER)};
- }
-
- @Override
- public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) {
- if (aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity.isServerSide()) {
- int[] tCoords = new int[]{aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord(), aBaseMetaTileEntity.getWorld().provider.dimensionId};
- if ((aTimer % 600 == 0) && !GT_SpawnEventHandler.mobReps.contains(tCoords)) {
- GT_SpawnEventHandler.mobReps.add(tCoords);
- }
- if (aBaseMetaTileEntity.isUniversalEnergyStored(getMinimumStoredEU()) && aBaseMetaTileEntity.decreaseStoredEnergyUnits(1 << (this.mTier * 2), false)) {
- mRange = 16 + (48 * mTier);
- } else {
- mRange = 4 + (12 * mTier);
- }
- }
- }
-
- @Override
- public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) {
- int[] tCoords = new int[]{aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord(), aBaseMetaTileEntity.getWorld().provider.dimensionId};
- GT_SpawnEventHandler.mobReps.add(tCoords);
- }
-
- @Override
- public void onRemoval() {
- int[] tCoords = new int[]{this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord(), this.getBaseMetaTileEntity().getWorld().provider.dimensionId};
- GT_SpawnEventHandler.mobReps.remove(tCoords);
- }
-
- @Override
- public boolean isSimpleMachine() {
- return false;
- }
-
- @Override
- public boolean isFacingValid(byte aFacing) {
- return true;
- }
-
- @Override
- public boolean isEnetInput() {
- return true;
- }
-
- @Override
- public boolean isInputFacing(byte aSide) {
- return true;
- }
-
- @Override
- public boolean isTeleporterCompatible() {
- return false;
- }
-
- @Override
- public long getMinimumStoredEU() {
- return 512;
- }
-
- @Override
- public long maxEUStore() {
- return 512 + V[mTier] * 50;
- }
-
- @Override
- public long maxEUInput() {
- return V[mTier];
- }
-
- @Override
- public long maxAmperesIn() {
- return 2;
- }
-
- @Override
- public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return false;
- }
-
- @Override
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return false;
- }
-
- @Override
- public ITexture[][][] getTextureSet(ITexture[] aTextures) {
- return null;
- }
-
- @Override
- public void saveNBTData(NBTTagCompound aNBT) {
- }
-
- @Override
- public void loadNBTData(NBTTagCompound aNBT) {
- }
+ public int mRange = 16;
+
+ public GregtechMetaTileEntityChunkLoader(final int aID, final String aName, final String aNameRegional, final int aTier) {
+ super(aID, aName, aNameRegional, aTier, 0, "Reprells nasty Creatures. Range: " + (4 + (12 * aTier)) + " unpowered / " + (16 + (48 * aTier)) + " powered");
+ }
+
+ public GregtechMetaTileEntityChunkLoader(final String aName, final int aTier, final int aInvSlotCount, final String aDescription, final ITexture[][][] aTextures) {
+ super(aName, aTier, aInvSlotCount, aDescription, aTextures);
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntityChunkLoader(this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures);
+ }
+
+ @Override
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1], (aSide != 1) ? null : aActive ? new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE) : new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TELEPORTER)};
+ }
+
+ @Override
+ public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTimer) {
+ if (aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity.isServerSide()) {
+ final int[] tCoords = new int[]{aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord(), aBaseMetaTileEntity.getWorld().provider.dimensionId};
+ if (((aTimer % 600) == 0) && !GT_SpawnEventHandler.mobReps.contains(tCoords)) {
+ GT_SpawnEventHandler.mobReps.add(tCoords);
+ }
+ if (aBaseMetaTileEntity.isUniversalEnergyStored(this.getMinimumStoredEU()) && aBaseMetaTileEntity.decreaseStoredEnergyUnits(1 << (this.mTier * 2), false)) {
+ this.mRange = 16 + (48 * this.mTier);
+ } else {
+ this.mRange = 4 + (12 * this.mTier);
+ }
+ }
+ }
+
+ @Override
+ public void onFirstTick(final IGregTechTileEntity aBaseMetaTileEntity) {
+ final int[] tCoords = new int[]{aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord(), aBaseMetaTileEntity.getWorld().provider.dimensionId};
+ GT_SpawnEventHandler.mobReps.add(tCoords);
+ }
+
+ @Override
+ public void onRemoval() {
+ final int[] tCoords = new int[]{this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord(), this.getBaseMetaTileEntity().getWorld().provider.dimensionId};
+ GT_SpawnEventHandler.mobReps.remove(tCoords);
+ }
+
+ @Override
+ public boolean isSimpleMachine() {
+ return false;
+ }
+
+ @Override
+ public boolean isFacingValid(final byte aFacing) {
+ return true;
+ }
+
+ @Override
+ public boolean isEnetInput() {
+ return true;
+ }
+
+ @Override
+ public boolean isInputFacing(final byte aSide) {
+ return true;
+ }
+
+ @Override
+ public boolean isTeleporterCompatible() {
+ return false;
+ }
+
+ @Override
+ public long getMinimumStoredEU() {
+ return 512;
+ }
+
+ @Override
+ public long maxEUStore() {
+ return 512 + (V[this.mTier] * 50);
+ }
+
+ @Override
+ public long maxEUInput() {
+ return V[this.mTier];
+ }
+
+ @Override
+ public long maxAmperesIn() {
+ return 2;
+ }
+
+ @Override
+ public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
+ return false;
+ }
+
+ @Override
+ public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
+ return false;
+ }
+
+ @Override
+ public ITexture[][][] getTextureSet(final ITexture[] aTextures) {
+ return null;
+ }
+
+ @Override
+ public void saveNBTData(final NBTTagCompound aNBT) {
+ }
+
+ @Override
+ public void loadNBTData(final NBTTagCompound aNBT) {
+ }
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java
index 9b11e82dbd..33bfbc2f1f 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java
@@ -1,5 +1,8 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi;
+import java.util.ArrayList;
+import java.util.Collection;
+
import gregtech.api.enums.Materials;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
@@ -19,10 +22,6 @@ import gtPlusPlus.core.material.nuclear.NUCLIDE;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
@@ -42,17 +41,17 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
//public FluidStack mFluidOut = Materials.UUMatter.getFluid(1L);
- public GregtechMTE_NuclearReactor(int aID, String aName, String aNameRegional) {
+ public GregtechMTE_NuclearReactor(final int aID, final String aName, final String aNameRegional) {
super(aID, aName, aNameRegional);
}
- public GregtechMTE_NuclearReactor(String aName) {
+ public GregtechMTE_NuclearReactor(final String aName) {
super(aName);
}
@Override
public long maxEUStore() {
- return 640000000L * (Math.min(16, this.mEnergyHatches.size())) / 16L;
+ return (640000000L * (Math.min(16, this.mEnergyHatches.size()))) / 16L;
}
@Override
@@ -74,20 +73,20 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
@Override
public String[] getInfoData() {
- String tRunning = (mMaxProgresstime>0 ? "Reactor running":"Reactor stopped");
- String tMaintainance = (getIdealStatus() == getRepairStatus() ? "No Maintainance issues" : "Needs Maintainance");
+ final String tRunning = (this.mMaxProgresstime>0 ? "Reactor running":"Reactor stopped");
+ final String tMaintainance = (this.getIdealStatus() == this.getRepairStatus() ? "No Maintainance issues" : "Needs Maintainance");
return new String[]{
"Liquid Fluoride Thorium Reactor",
tRunning,
tMaintainance,
- "Current Output: "+(mEUt*mEfficiency/10000)+" EU/t",
- "Fuel Consumption: "+fuelConsumption+"L/t",
- "Fuel Value: "+fuelValue+" EU/L",
- "Fuel Remaining: "+fuelRemaining+" Litres",
- "Current Efficiency: "+(mEfficiency/100)+"%",
- "Optimal Fuel Flow: "+(int)realOptFlow+" L/t",
- "Current Speed: "+(mEfficiency/100)+"%",};
+ "Current Output: "+((this.mEUt*this.mEfficiency)/10000)+" EU/t",
+ "Fuel Consumption: "+this.fuelConsumption+"L/t",
+ "Fuel Value: "+this.fuelValue+" EU/L",
+ "Fuel Remaining: "+this.fuelRemaining+" Litres",
+ "Current Efficiency: "+(this.mEfficiency/100)+"%",
+ "Optimal Fuel Flow: "+(int)this.realOptFlow+" L/t",
+ "Current Speed: "+(this.mEfficiency/100)+"%",};
}
@Override
@@ -96,12 +95,12 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
}
@Override
- public boolean allowCoverOnSide(byte aSide, GT_ItemStack aStack) {
- return aSide != getBaseMetaTileEntity().getFrontFacing();
+ public boolean allowCoverOnSide(final byte aSide, final GT_ItemStack aStack) {
+ return aSide != this.getBaseMetaTileEntity().getFrontFacing();
}
@Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
+ 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[70],
new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR)};
@@ -110,12 +109,12 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
}
@Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "MatterFabricator.png");
+ public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "MatterFabricator.png");
}
@Override
- public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
+ public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
// Life Lessons from Greg.
/**
@@ -135,22 +134,22 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
[23:46:06] <Alkalus> Noted, thanks :D
*/
- int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 3;
- int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 3;
+ final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 3;
+ final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 3;
for (int i = -3; i <= 3; i++) {
for (int j = -3; j <= 3; j++) {
for (int h = 0; h < 4; h++) {
- IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
+ final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
// Reactor Floor/Roof inner 5x5
- if ((i != -3 && i != 3) && (j != -3 && j != 3)) {
+ if (((i != -3) && (i != 3)) && ((j != -3) && (j != 3))) {
// Reactor Floor & Roof (Inner 5x5) + Mufflers, Dynamos and Fluid outputs.
- if (h == 0 || h == 3) {
+ if ((h == 0) || (h == 3)) {
//If not a hatch, continue, else add hatch and continue.
- if ((!addMufflerToMachineList(tTileEntity, 70)) && (!addOutputToMachineList(tTileEntity, 70)) && (!addDynamoToMachineList(tTileEntity, 70))) {
+ if ((!this.addMufflerToMachineList(tTileEntity, 70)) && (!this.addOutputToMachineList(tTileEntity, 70)) && (!this.addDynamoToMachineList(tTileEntity, 70))) {
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
Utils.LOG_INFO("LFTR Casing(s) Missing from one of the top layers inner 3x3.");
Utils.LOG_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
@@ -160,16 +159,16 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
Utils.LOG_INFO("LFTR Casing(s) Missing from one of the top layers inner 3x3. Wrong Meta for Casing.");
return false;
}
- }
- }
+ }
+ }
// Inside 2 layers, mostly air
- else {
+ else {
// Reactor Inner 5x5
//if ((i != -1 && i != 1) && (j != -1 && j != 1)) {
if (!aBaseMetaTileEntity.getAirOffset(xDir + i, h, zDir + j)) {
- Utils.LOG_INFO("Make sure the inner 3x3 of the Multiblock is Air.");
+ Utils.LOG_INFO("Make sure the inner 3x3 of the Multiblock is Air.");
return false;
}
@@ -187,7 +186,7 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
Utils.LOG_INFO("LFTR Casing(s) Missing from one of the top layers inner 3x3.");
return false;
}
- }*/
+ }*/
}
@@ -195,7 +194,7 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
else {
//Deal with all 4 sides (Reactor walls)
- if (h == 1 || h == 2) {
+ if ((h == 1) || (h == 2)) {
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
Utils.LOG_INFO("Glass Casings Missing from somewhere in the second layer.");
Utils.LOG_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
@@ -205,13 +204,13 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
Utils.LOG_INFO("Glass Casings Missing from somewhere in the second layer.");
Utils.LOG_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
return false;
- }
+ }
}
//Deal with top and Bottom edges (Inner 5x5)
- else if (h == 0 || h == 3) {
- if ((!addToMachineList(tTileEntity, 70)) && (!addInputToMachineList(tTileEntity, 70)) && (!addOutputToMachineList(tTileEntity, 70)) && (!addDynamoToMachineList(tTileEntity, 70))) {
- if ((xDir + i != 0) || (zDir + j != 0)) {//no controller
+ else if ((h == 0) || (h == 3)) {
+ if ((!this.addToMachineList(tTileEntity, 70)) && (!this.addInputToMachineList(tTileEntity, 70)) && (!this.addOutputToMachineList(tTileEntity, 70)) && (!this.addDynamoToMachineList(tTileEntity, 70))) {
+ if (((xDir + i) != 0) || ((zDir + j) != 0)) {//no controller
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
Utils.LOG_INFO("LFTR Casing(s) Missing from one of the edges on the top layer.");
@@ -254,7 +253,7 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
if (this.mOutputHatches != null) {
for (int i = 0; i < this.mOutputHatches.size(); i++) {
- if (this.mOutputHatches.get(i).mTier < 5 && (this.mOutputHatches.get(i).getBaseMetaTileEntity() instanceof GregtechMTE_NuclearReactor)){
+ if ((this.mOutputHatches.get(i).mTier < 5) && (this.mOutputHatches.get(i).getBaseMetaTileEntity() instanceof GregtechMTE_NuclearReactor)){
Utils.LOG_INFO("You require at LEAST V tier Output Hatches.");
Utils.LOG_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord());
Utils.LOG_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getInventoryName());
@@ -272,79 +271,79 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
}
}
}
- mWrench = true;
- mScrewdriver = true;
- mSoftHammer = true;
- mHardHammer = true;
- mSolderingTool = true;
- mCrowbar = true;
- turnCasingActive(true);
+ this.mWrench = true;
+ this.mScrewdriver = true;
+ this.mSoftHammer = true;
+ this.mHardHammer = true;
+ this.mSolderingTool = true;
+ this.mCrowbar = true;
+ this.turnCasingActive(true);
Utils.LOG_INFO("Multiblock Formed.");
return true;
}
@Override
- public boolean isCorrectMachinePart(ItemStack aStack) {
+ public boolean isCorrectMachinePart(final ItemStack aStack) {
return true;
}
@Override
- public int getMaxEfficiency(ItemStack aStack) {
- return boostEu ? 30000 : 10000;
+ public int getMaxEfficiency(final ItemStack aStack) {
+ return this.boostEu ? 30000 : 10000;
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
+ public int getPollutionPerTick(final ItemStack aStack) {
return 5;
}
@Override
- public int getDamageToComponent(ItemStack aStack) {
+ public int getDamageToComponent(final ItemStack aStack) {
return 0;
}
@Override
- public boolean explodesOnComponentBreak(ItemStack aStack) {
+ public boolean explodesOnComponentBreak(final ItemStack aStack) {
return true;
}
@Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
return new GregtechMTE_NuclearReactor(this.mName);
}
- public static int overclock(int mStartEnergy) {
+ public static int overclock(final int mStartEnergy) {
return mStartEnergy < 160000000 ? 4 : mStartEnergy < 320000000 ? 2 : 1;
}
- public boolean turnCasingActive(boolean status) {
+ public boolean turnCasingActive(final boolean status) {
if (this.mDynamoHatches != null) {
- for (GT_MetaTileEntity_Hatch_Dynamo hatch : this.mDynamoHatches) {
+ for (final GT_MetaTileEntity_Hatch_Dynamo hatch : this.mDynamoHatches) {
hatch.mMachineBlock = status ? (byte) 70 : (byte) 71;
}
}
if (this.mMufflerHatches != null) {
- for (GT_MetaTileEntity_Hatch_Muffler hatch : this.mMufflerHatches) {
+ for (final GT_MetaTileEntity_Hatch_Muffler hatch : this.mMufflerHatches) {
hatch.mMachineBlock = status ? (byte) 70 : (byte) 71;
}
}
if (this.mOutputHatches != null) {
- for (GT_MetaTileEntity_Hatch_Output hatch : this.mOutputHatches) {
+ for (final GT_MetaTileEntity_Hatch_Output hatch : this.mOutputHatches) {
hatch.mMachineBlock = status ? (byte) 70 : (byte) 71;
}
}
if (this.mInputHatches != null) {
- for (GT_MetaTileEntity_Hatch_Input hatch : this.mInputHatches) {
+ for (final GT_MetaTileEntity_Hatch_Input hatch : this.mInputHatches) {
hatch.mMachineBlock = status ? (byte) 70 : (byte) 71;
}
}
if (this.mOutputBusses != null) {
- for (GT_MetaTileEntity_Hatch_OutputBus hatch : this.mOutputBusses) {
+ for (final GT_MetaTileEntity_Hatch_OutputBus hatch : this.mOutputBusses) {
hatch.mMachineBlock = status ? (byte) 70 : (byte) 71;
}
}
if (this.mInputBusses != null) {
- for (GT_MetaTileEntity_Hatch_InputBus hatch : this.mInputBusses) {
+ for (final GT_MetaTileEntity_Hatch_InputBus hatch : this.mInputBusses) {
hatch.mMachineBlock = status ? (byte) 70 : (byte) 71;
}
}
@@ -354,107 +353,107 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
@Override
- public boolean checkRecipe(ItemStack aStack) {
- ArrayList<FluidStack> tFluids = getStoredFluids();
- Collection<GT_Recipe> tRecipeList = Recipe_GT.Gregtech_Recipe_Map.sLiquidFluorineThoriumReactorRecipes.mRecipeList;
- if(tFluids.size() > 0 && tRecipeList != null) { //Does input hatch have a LFTR fuel?
+ public boolean checkRecipe(final ItemStack aStack) {
+ final ArrayList<FluidStack> tFluids = this.getStoredFluids();
+ final Collection<GT_Recipe> tRecipeList = Recipe_GT.Gregtech_Recipe_Map.sLiquidFluorineThoriumReactorRecipes.mRecipeList;
+ if((tFluids.size() > 0) && (tRecipeList != null)) { //Does input hatch have a LFTR fuel?
Utils.LOG_INFO("Found more than one input fluid and a list of valid recipes.");
- boolean containsFLIBE = false;
- boolean containsPrimarySalt = false;
- for (FluidStack hatchFluid1 : tFluids) { //Loops through hatches
+ final boolean containsFLIBE = false;
+ final boolean containsPrimarySalt = false;
+ for (final FluidStack hatchFluid1 : tFluids) { //Loops through hatches
Utils.LOG_INFO("Looping through Input hatches - Found "+hatchFluid1.getLocalizedName());
- for(GT_Recipe aFuel : tRecipeList) { //Loops through LFTR fuel recipes
+ for(final GT_Recipe aFuel : tRecipeList) { //Loops through LFTR fuel recipes
Utils.LOG_INFO("Looping through Recipes. "+aFuel.mSpecialValue);
- FluidStack tLiquid;
- FluidStack testStack = aFuel.mFluidInputs[1];
+ FluidStack tLiquid;
+ final FluidStack testStack = aFuel.mFluidInputs[1];
if ((tLiquid = testStack) != null) { //Create fluidstack from current recipe
Utils.LOG_INFO("Creating a fluidstack from the current recipe");
if (hatchFluid1.isFluidEqual(tLiquid)) { //Has a LFTR fluid
- fuelConsumption = tLiquid.amount = boostEu ? (aFuel.mSpecialValue/4096) : (aFuel.mSpecialValue/2048); //Calc fuel consumption
- Utils.LOG_INFO("Input hatch contains some FLiBe Fuel, using "+fuelConsumption);
- if(depleteInput(tLiquid)) { //Deplete that amount
+ this.fuelConsumption = tLiquid.amount = this.boostEu ? (aFuel.mSpecialValue/4096) : (aFuel.mSpecialValue/2048); //Calc fuel consumption
+ Utils.LOG_INFO("Input hatch contains some FLiBe Fuel, using "+this.fuelConsumption);
+ if(this.depleteInput(tLiquid)) { //Deplete that amount
Utils.LOG_INFO("Depleted some FLiBe fluid");
this.mMaxProgresstime = 500;
-
+
if(tFluids.contains(NUCLIDE.LiFBeF2ThF4UF4.getFluid(1)) ||
tFluids.contains(NUCLIDE.LiFBeF2ZrF4UF4.getFluid(2)) ||
tFluids.contains(NUCLIDE.LiFBeF2ZrF4U235.getFluid(10))) { //Has a Primary fuel salt?
//Deplete Primary Salt. 1000L should = 1 hour of runtime (if baseEU = 2048) && using 1l each time
- if(mRuntime % 72 == 0 || mRuntime == 0){
+ if(((this.mRuntime % 72) == 0) || (this.mRuntime == 0)){
//U235 fuel is 10x less efficient than UF4 with Thorium, UF4 with Zirconium is only 2x less efficient than UF4 with Thorium.
//Most Efficient
if(tFluids.contains(NUCLIDE.LiFBeF2ThF4UF4.getFluid(2))){
- depleteInput(NUCLIDE.LiFBeF2ThF4UF4.getFluid(boostEu ? 2 : 1));
- Utils.LOG_INFO("Depleted "+(boostEu ? 2 : 1)+"L of LiFBeF2ThF4UF4 fluid");
+ this.depleteInput(NUCLIDE.LiFBeF2ThF4UF4.getFluid(this.boostEu ? 2 : 1));
+ Utils.LOG_INFO("Depleted "+(this.boostEu ? 2 : 1)+"L of LiFBeF2ThF4UF4 fluid");
}
//1/2 as Efficient
if (tFluids.contains(NUCLIDE.LiFBeF2ZrF4UF4.getFluid(4))){
- depleteInput(NUCLIDE.LiFBeF2ZrF4UF4.getFluid(boostEu ? 4 : 2));
- Utils.LOG_INFO("Depleted "+(boostEu ? 4 : 2)+"L of LiFBeF2ZrF4UF4 fluid");
+ this.depleteInput(NUCLIDE.LiFBeF2ZrF4UF4.getFluid(this.boostEu ? 4 : 2));
+ Utils.LOG_INFO("Depleted "+(this.boostEu ? 4 : 2)+"L of LiFBeF2ZrF4UF4 fluid");
}
//10x less Efficient.
- if (tFluids.contains(NUCLIDE.LiFBeF2ZrF4U235.getFluid(20))) {
- depleteInput(NUCLIDE.LiFBeF2ZrF4U235.getFluid(boostEu ? 20 : 10));
- Utils.LOG_INFO("Depleted "+(boostEu ? 20 : 10)+"L of LiFBeF2ZrF4U235 fluid");
+ if (tFluids.contains(NUCLIDE.LiFBeF2ZrF4U235.getFluid(20))) {
+ this.depleteInput(NUCLIDE.LiFBeF2ZrF4U235.getFluid(this.boostEu ? 20 : 10));
+ Utils.LOG_INFO("Depleted "+(this.boostEu ? 20 : 10)+"L of LiFBeF2ZrF4U235 fluid");
}
}
} else {
return false;
}
-
+
//Try Sparge Noble Gases
- if (depleteInput(Materials.Helium.getGas(1000L)) && heliumSparging){
+ if (this.depleteInput(Materials.Helium.getGas(1000L)) && this.heliumSparging){
//Make an empty fluid stack for possible sparging output
FluidStack[] spargeOutput = new FluidStack[]{};
Utils.LOG_INFO("Doing a Sparge with Helium");
- spargeOutput = getByproductsOfSparge(Materials.Helium.getGas(1000L));
- heliumSparging = false;
+ spargeOutput = this.getByproductsOfSparge(Materials.Helium.getGas(1000L));
+ this.heliumSparging = false;
//If Sparging occurred, try add the outputs to the output hatches.
try {
- if (spargeOutput.length >= 1){
- for (FluidStack F : spargeOutput){
- Utils.LOG_INFO("Adding Sparge Output - "+F.getLocalizedName());
- addOutput(F);
+ if (spargeOutput.length >= 1){
+ for (final FluidStack F : spargeOutput){
+ Utils.LOG_INFO("Adding Sparge Output - "+F.getLocalizedName());
+ this.addOutput(F);
+ }
}
- }
- } catch (Throwable T){}
+ } catch (final Throwable T){}
}
-
+
//Try Sparge Fluorides
- if (depleteInput(Materials.Fluorine.getGas(100L)) && !heliumSparging){
+ if (this.depleteInput(Materials.Fluorine.getGas(100L)) && !this.heliumSparging){
//Make an empty fluid stack for possible sparging output
FluidStack[] spargeOutput = new FluidStack[]{};
Utils.LOG_INFO("Doing a Sparge with Fluorine");
- spargeOutput = getByproductsOfSparge(Materials.Fluorine.getGas(100L));
- heliumSparging = true;
+ spargeOutput = this.getByproductsOfSparge(Materials.Fluorine.getGas(100L));
+ this.heliumSparging = true;
//If Sparging occurred, try add the outputs to the output hatches.
if (spargeOutput.length > 0){
- for (FluidStack F : spargeOutput){
+ for (final FluidStack F : spargeOutput){
Utils.LOG_INFO("Adding Sparge Output - "+F.getLocalizedName());
- addOutput(F);
+ this.addOutput(F);
}
}
}
-
+
if (aFuel != null){
Utils.LOG_INFO("Saving previous Recipe.");
- this.mLastRecipe = aFuel;
+ this.mLastRecipe = aFuel;
}
-
- fuelValue = aFuel.mSpecialValue;
- fuelRemaining = hatchFluid1.amount; //Record available fuel
-
+
+ this.fuelValue = aFuel.mSpecialValue;
+ this.fuelRemaining = hatchFluid1.amount; //Record available fuel
+
if (this.mEfficiency < 500){
this.mEfficiency++;
}
-
- this.mEUt = (mEfficiency < 500 ? 2048 : (8196*4)); //Output 0 if startup is less than 20%
+
+ this.mEUt = (this.mEfficiency < 500 ? 2048 : (8196*4)); //Output 0 if startup is less than 20%
Utils.LOG_INFO("Generating "+this.mEUt+"EU/t @ an efficiency level of "+this.mEfficiency);
-
+
this.mProgresstime = 1;
this.mMaxProgresstime = 1;
this.mEfficiencyIncrease = 15;
@@ -522,18 +521,18 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
}
- protected FluidStack[] getByproductsOfSparge(FluidStack spargeGas){
+ protected FluidStack[] getByproductsOfSparge(final FluidStack spargeGas){
FluidStack[] outputArrayOfGases = new FluidStack[]{};
if (spargeGas != null){
if (spargeGas.isFluidEqual(Materials.Helium.getGas(1000))){
- int outputChances[] = {
+ final int outputChances[] = {
MathUtils.roundToClosestInt(MathUtils.randInt(10, 1000)/10),
MathUtils.roundToClosestInt(MathUtils.randInt(10, 600)/10),
MathUtils.roundToClosestInt(MathUtils.randInt(10, 400)/10),
MathUtils.roundToClosestInt(MathUtils.randInt(10, 1000)/10),
- MathUtils.roundToClosestInt(MathUtils.randInt(10, 100)/10)
+ MathUtils.roundToClosestInt(MathUtils.randInt(10, 100)/10)
};
- int heliumContent = (1000-outputChances[0]-outputChances[1]-outputChances[2]-outputChances[3]-outputChances[4]);
+ final int heliumContent = (1000-outputChances[0]-outputChances[1]-outputChances[2]-outputChances[3]-outputChances[4]);
Utils.LOG_INFO("Helium remaining: "+heliumContent);
outputArrayOfGases = new FluidStack[]{
ELEMENT.getInstance().XENON.getFluid(outputChances[0]),
@@ -541,24 +540,24 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
ELEMENT.getInstance().ARGON.getFluid(outputChances[2]),
ELEMENT.getInstance().KRYPTON.getFluid(outputChances[3]),
ELEMENT.getInstance().RADON.getFluid(outputChances[4]),
- Materials.Helium.getGas(heliumContent)
+ Materials.Helium.getGas(heliumContent)
};
}
else if (spargeGas.isFluidEqual(Materials.Fluorine.getGas(100))){
- int outputChances[] = {
+ final int outputChances[] = {
MathUtils.roundToClosestInt(MathUtils.randDouble(10, 100)),
MathUtils.roundToClosestInt(MathUtils.randDouble(1, 50)/10),
MathUtils.roundToClosestInt(MathUtils.randDouble(1, 50)/10),
- MathUtils.roundToClosestInt(MathUtils.randDouble(1, 50)/10)
+ MathUtils.roundToClosestInt(MathUtils.randDouble(1, 50)/10)
};
- int fluorineContent = (100-outputChances[0]-outputChances[1]-outputChances[2]-outputChances[3]);
+ final int fluorineContent = (100-outputChances[0]-outputChances[1]-outputChances[2]-outputChances[3]);
Utils.LOG_INFO("Fluorine remaining: "+fluorineContent);
outputArrayOfGases = new FluidStack[]{
FLUORIDES.URANIUM_HEXAFLUORIDE.getFluid(outputChances[0]),
FLUORIDES.NEPTUNIUM_HEXAFLUORIDE.getFluid(outputChances[1]),
FLUORIDES.TECHNETIUM_HEXAFLUORIDE.getFluid(outputChances[2]),
FLUORIDES.SELENIUM_HEXAFLUORIDE.getFluid(outputChances[3]),
- Materials.Fluorine.getGas(fluorineContent)
+ Materials.Fluorine.getGas(fluorineContent)
};
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityAnimalFarm.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityAnimalFarm.java
index 5a165c4072..2114bd1af2 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityAnimalFarm.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityAnimalFarm.java
@@ -1,5 +1,7 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi;
+import java.lang.reflect.Field;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
@@ -15,9 +17,6 @@ import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.forestry.trees.TreefarmManager;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-
-import java.lang.reflect.Field;
-
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
@@ -33,20 +32,20 @@ public class GregtechMetaTileEntityAnimalFarm extends GT_MetaTileEntity_MultiBlo
//public ArrayList<GT_MetaTileEntity_TieredMachineBlock> mCasings = new ArrayList();
- private boolean running = false;
+ private final boolean running = false;
private boolean p1, p2, p3, p4, p5, p6;
public ItemStack mOutputItem1;
public ItemStack mOutputItem2;
private Block Humus;
- private boolean isForestryLoaded = TreefarmManager.isForestryValid();
+ private final boolean isForestryLoaded = TreefarmManager.isForestryValid();
- public GregtechMetaTileEntityAnimalFarm(int aID, String aName, String aNameRegional) {
+ public GregtechMetaTileEntityAnimalFarm(final int aID, final String aName, final String aNameRegional) {
super(aID, aName, aNameRegional);
}
- public GregtechMetaTileEntityAnimalFarm(String aName) {
+ public GregtechMetaTileEntityAnimalFarm(final String aName) {
super(aName);
- }
+ }
@Override
public String[] getDescription() {
@@ -55,11 +54,11 @@ public class GregtechMetaTileEntityAnimalFarm extends GT_MetaTileEntity_MultiBlo
"How to get your first logs without an axe.",
"Max Size(WxHxD): 9x1x9 (Controller, with upto 4 dirt out each direction on a flat plane.)",
"Dirt for the rest! [D = Dirt, X = Controller]"
- };
+ };
}
@Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
if (aSide == 1) {
return new ITexture[]{new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Acacia_Log), new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Vent_Fast : TexturesGtBlock.Overlay_Machine_Vent)};
}
@@ -77,39 +76,41 @@ public class GregtechMetaTileEntityAnimalFarm extends GT_MetaTileEntity_MultiBlo
}
@Override
- public boolean isFacingValid(byte aFacing) {
+ public boolean isFacingValid(final byte aFacing) {
return aFacing > 1;
}
@Override
- public boolean isAccessAllowed(EntityPlayer aPlayer) {
+ public boolean isAccessAllowed(final EntityPlayer aPlayer) {
return true;
}
@Override
- public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCoverID) {
+ public boolean allowCoverOnSide(final byte aSide, final GT_ItemStack aCoverID) {
return (GregTech_API.getCoverBehavior(aCoverID.toStack()).isSimpleCover()) && (super.allowCoverOnSide(aSide, aCoverID));
}
@Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
return new GregtechMetaTileEntityAnimalFarm(this.mName);
}
@Override
- public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
- if (aBaseMetaTileEntity.isClientSide()) return true;
+ public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) {
+ if (aBaseMetaTileEntity.isClientSide()) {
+ return true;
+ }
return true;
}
@Override
- public boolean isCorrectMachinePart(ItemStack aStack) {
+ public boolean isCorrectMachinePart(final ItemStack aStack) {
return true;
}
@Override
- public boolean checkRecipe(ItemStack aStack) {
+ public boolean checkRecipe(final ItemStack aStack) {
Utils.LOG_INFO("Working");
/*if (!checkRecursiveBlocks()) {
this.mEfficiency = 0;
@@ -137,16 +138,16 @@ public class GregtechMetaTileEntityAnimalFarm extends GT_MetaTileEntity_MultiBlo
if (!LoadedMods.Forestry){
return null;
}
- return TreefarmManager.getHumus();
+ return TreefarmManager.getHumus();
}
@Override
- public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
+ public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
//this.mCasings.clear();
Utils.LOG_INFO("Step 1");
- int xDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 7;
- int zDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 7;
+ final int xDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 7;
+ final int zDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 7;
for (int i = -7; i <= 7; i++) {
Utils.LOG_INFO("Step 2");
@@ -155,10 +156,10 @@ public class GregtechMetaTileEntityAnimalFarm extends GT_MetaTileEntity_MultiBlo
for (int h = 0; h <= 1; h++) {
Utils.LOG_INFO("Step 4");
- IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
+ final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
//Farm Floor inner 14x14
- if ((i != -7 && i != 7) && (j != -7 && j != 7)) {
+ if (((i != -7) && (i != 7)) && ((j != -7) && (j != 7))) {
Utils.LOG_INFO("Step 5 - H:"+h);
// Farm Dirt Floor and Inner Air/Log space.
if (h == 0) {
@@ -172,40 +173,40 @@ public class GregtechMetaTileEntityAnimalFarm extends GT_MetaTileEntity_MultiBlo
(aBaseMetaTileEntity.getZCoord()+(zDir+j)),
Blocks.melon_block);
return false;
- }
- }
+ }
+ }
// Inside fenced area, mostly air or trees or saplings
- else if (h == 1){
+ else if (h == 1){
//Farm Inner 14x14
/*if (!TreefarmManager.isWoodLog(aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j)) || !TreefarmManager.isAirBlock(aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j)) || !aBaseMetaTileEntity.getAirOffset(xDir+i, h, zDir+j)) {
Utils.LOG_INFO("Wood like block missing from inner 14x14, layer 2."); //TODO
- Utils.LOG_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
+ Utils.LOG_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
Utils.LOG_INFO("Found at x:"+(xDir+i)+" y:"+h+" z:"+(zDir+j));
//return false;
- }*/
- }
+ }*/
+ }
}
//Dealt with inner 5x5, now deal with the exterior.
else {
Utils.LOG_INFO("Step 6 - H:"+h);
//Deal with all 4 sides (Fenced area)
- if (h == 1) {
+ if (h == 1) {
if (!TreefarmManager.isFenceBlock(aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j))) {
Utils.LOG_INFO("Fence/Gate missing from outside the second layer.");
Utils.LOG_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
return false;
- }
+ }
}
//Deal with Bottom edges (Add Hatches/Busses first, othercheck make sure it's dirt) //TODO change the casings to not dirt~
else if (h == 0) {
try {
- addCasingToCasingList(tTileEntity);
- } catch (Throwable t){}
+ this.addCasingToCasingList(tTileEntity);
+ } catch (final Throwable t){}
- if ((!addMaintenanceToMachineList(tTileEntity, 77)) && (!addInputToMachineList(tTileEntity, 77)) && (!addOutputToMachineList(tTileEntity, 77)) && (!addEnergyInputToMachineList(tTileEntity, 77))) {
- if ((xDir + i != 0) || (zDir + j != 0)) {//no controller
+ if ((!this.addMaintenanceToMachineList(tTileEntity, 77)) && (!this.addInputToMachineList(tTileEntity, 77)) && (!this.addOutputToMachineList(tTileEntity, 77)) && (!this.addEnergyInputToMachineList(tTileEntity, 77))) {
+ if (((xDir + i) != 0) || ((zDir + j) != 0)) {//no controller
if (!(aBaseMetaTileEntity.getMetaTileID() != 752)) {
Utils.LOG_INFO("Fark Keeper Casings Missing from one of the edges on the bottom edge. x:"+(xDir+i)+" y:"+h+" z:"+(zDir+j)+" | "+aBaseMetaTileEntity.getClass());
@@ -241,7 +242,7 @@ public class GregtechMetaTileEntityAnimalFarm extends GT_MetaTileEntity_MultiBlo
if (this.mOutputHatches != null) {
for (int i = 0; i < this.mOutputHatches.size(); i++) {
- if (this.mOutputHatches.get(i).mTier < 2 && (this.mOutputHatches.get(i).getBaseMetaTileEntity() instanceof GregtechMTE_NuclearReactor)){
+ if ((this.mOutputHatches.get(i).mTier < 2) && (this.mOutputHatches.get(i).getBaseMetaTileEntity() instanceof GregtechMTE_NuclearReactor)){
Utils.LOG_INFO("You require at LEAST MV tier Output Hatches.");
Utils.LOG_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord());
Utils.LOG_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getInventoryName());
@@ -260,24 +261,24 @@ public class GregtechMetaTileEntityAnimalFarm extends GT_MetaTileEntity_MultiBlo
}
}
}
- mSolderingTool = true;
+ this.mSolderingTool = true;
//turnCasingActive(true);
Utils.LOG_INFO("Multiblock Formed.");
return true;
}
@Override
- public int getMaxEfficiency(ItemStack aStack) {
+ public int getMaxEfficiency(final ItemStack aStack) {
return 10000;
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
+ public int getPollutionPerTick(final ItemStack aStack) {
return 0;
}
@Override
- public int getDamageToComponent(ItemStack aStack) {
+ public int getDamageToComponent(final ItemStack aStack) {
return 0;
}
@@ -287,29 +288,31 @@ public class GregtechMetaTileEntityAnimalFarm extends GT_MetaTileEntity_MultiBlo
}
@Override
- public boolean explodesOnComponentBreak(ItemStack aStack) {
+ public boolean explodesOnComponentBreak(final ItemStack aStack) {
return false;
}
- public boolean addCasingToCasingList(IGregTechTileEntity aTileEntity) {
- if (aTileEntity == null)
+ public boolean addCasingToCasingList(final IGregTechTileEntity aTileEntity) {
+ if (aTileEntity == null) {
return false;
- IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null)
+ }
+ final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
+ if (aMetaTileEntity == null) {
return false;
+ }
if (aMetaTileEntity instanceof GT_MetaTileEntity_TieredMachineBlock) {
//return this.mCasings.add((GT_MetaTileEntity_TieredMachineBlock) aMetaTileEntity);
}
return false;
}
- private GT_MetaTileEntity_TieredMachineBlock changeTextureswithReflection(GT_MetaTileEntity_TieredMachineBlock casing, ITexture[][][] textureSet){
- GT_MetaTileEntity_TieredMachineBlock cv = casing;
+ private GT_MetaTileEntity_TieredMachineBlock changeTextureswithReflection(final GT_MetaTileEntity_TieredMachineBlock casing, final ITexture[][][] textureSet){
+ final GT_MetaTileEntity_TieredMachineBlock cv = casing;
//System.out.println("Before: "+cv.mTextures.hashCode());
//Get declared field from class
Field f;
try {
- Field[] x = cv.getClass().getFields();
+ final Field[] x = cv.getClass().getFields();
for (int i =0; i<x.length;i++){
//Utils.LOG_INFO(x[i].getName());
}
@@ -317,13 +320,13 @@ public class GregtechMetaTileEntityAnimalFarm extends GT_MetaTileEntity_MultiBlo
//Try get the field variable
f = cv.getClass().getField("mTextures");
// set the accessiblity of the field to true, this will enable you to change the value
- f.setAccessible(true);
+ f.setAccessible(true);
//change the field value
f.set(cv, textureSet);
//Verify change in texture set
//System.out.println("After: "+cv.mTextures.hashCode());
return cv;
- } catch (NoSuchFieldException e) {
+ } catch (final NoSuchFieldException e) {
Utils.LOG_INFO("Could not find mTextures.");
return casing;
}
@@ -336,60 +339,60 @@ public class GregtechMetaTileEntityAnimalFarm extends GT_MetaTileEntity_MultiBlo
public ITexture[][][] getTextureSet() {
- ITexture[][][] rTextures = new ITexture[10][17][];
+ final ITexture[][][] rTextures = new ITexture[10][17][];
for (byte i = -1; i < 16; i++) {
- rTextures[0][i + 1] = getFront(i);
- rTextures[1][i + 1] = getBack(i);
- rTextures[2][i + 1] = getBottom(i);
- rTextures[3][i + 1] = getTop(i);
- rTextures[4][i + 1] = getSides(i);
- rTextures[5][i + 1] = getFrontActive(i);
- rTextures[6][i + 1] = getBackActive(i);
- rTextures[7][i + 1] = getBottomActive(i);
- rTextures[8][i + 1] = getTopActive(i);
- rTextures[9][i + 1] = getSidesActive(i);
+ rTextures[0][i + 1] = this.getFront(i);
+ rTextures[1][i + 1] = this.getBack(i);
+ rTextures[2][i + 1] = this.getBottom(i);
+ rTextures[3][i + 1] = this.getTop(i);
+ rTextures[4][i + 1] = this.getSides(i);
+ rTextures[5][i + 1] = this.getFrontActive(i);
+ rTextures[6][i + 1] = this.getBackActive(i);
+ rTextures[7][i + 1] = this.getBottomActive(i);
+ rTextures[8][i + 1] = this.getTopActive(i);
+ rTextures[9][i + 1] = this.getSidesActive(i);
}
return rTextures;
}
- public ITexture[] getFront(byte aColor) {
+ public ITexture[] getFront(final byte aColor) {
return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][aColor + 1]};
}
- public ITexture[] getBack(byte aColor) {
+ public ITexture[] getBack(final byte aColor) {
return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][aColor + 1]};
}
- public ITexture[] getBottom(byte aColor) {
+ public ITexture[] getBottom(final byte aColor) {
return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][aColor + 1]};
}
- public ITexture[] getTop(byte aColor) {
+ public ITexture[] getTop(final byte aColor) {
return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][aColor + 1]};
}
- public ITexture[] getSides(byte aColor) {
+ public ITexture[] getSides(final byte aColor) {
return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][aColor + 1]};
}
- public ITexture[] getFrontActive(byte aColor) {
- return getFront(aColor);
+ public ITexture[] getFrontActive(final byte aColor) {
+ return this.getFront(aColor);
}
- public ITexture[] getBackActive(byte aColor) {
- return getBack(aColor);
+ public ITexture[] getBackActive(final byte aColor) {
+ return this.getBack(aColor);
}
- public ITexture[] getBottomActive(byte aColor) {
- return getBottom(aColor);
+ public ITexture[] getBottomActive(final byte aColor) {
+ return this.getBottom(aColor);
}
- public ITexture[] getTopActive(byte aColor) {
- return getTop(aColor);
+ public ITexture[] getTopActive(final byte aColor) {
+ return this.getTop(aColor);
}
- public ITexture[] getSidesActive(byte aColor) {
- return getSides(aColor);
+ public ITexture[] getSidesActive(final byte aColor) {
+ return this.getSides(aColor);
}
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityTreeFarm.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityTreeFarm.java
index aa5580858b..ac3f5622b1 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityTreeFarm.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityTreeFarm.java
@@ -1,5 +1,8 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi;
+import java.util.ArrayList;
+
+import cpw.mods.fml.common.Optional;
import forestry.api.arboriculture.ITree;
import forestry.api.arboriculture.TreeManager;
import forestry.api.genetics.IIndividual;
@@ -28,9 +31,6 @@ import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_TreeFarmer;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_TreeFarmer;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import gtPlusPlus.xmod.gregtech.common.helpers.TreeFarmHelper;
-
-import java.util.ArrayList;
-
import net.minecraft.block.Block;
import net.minecraft.entity.player.*;
import net.minecraft.item.ItemStack;
@@ -38,30 +38,29 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.server.MinecraftServer;
import net.minecraft.world.World;
import net.minecraftforge.fluids.FluidStack;
-import cpw.mods.fml.common.Optional;
public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlockBase {
/* private */ private int treeCheckTicks = 0;
/* private */ private int plantSaplingTicks = 0;
/* private */ private int cleanupTicks = 0;
- /* private */ public long mInternalPower = 0;
+ /* private */ public long mInternalPower = 0;
/* private */ private static int powerDrain = 32;
private short energyHatchRetryCount = 0;
//Too Many logs, lag breaker
- private boolean takingBreak = false;
- private int logsToBreakAfter = 500;
+ private final boolean takingBreak = false;
+ private final int logsToBreakAfter = 500;
private EntityPlayerMP farmerAI;
private SAWTOOL mCurrentMachineTool = SAWTOOL.NONE;
private boolean canChop = false;
- private int cuttingNumber = 0;
- private int cuttingNumber2 = 0;
- private int cuttingNumber3 = 0;
+ private final int cuttingNumber = 0;
+ private final int cuttingNumber2 = 0;
+ private final int cuttingNumber3 = 0;
public GregtechMetaTileEntityTreeFarm(final int aID, final String aName, final String aNameRegional) {
super(aID, aName, aNameRegional);
@@ -69,7 +68,7 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
public GregtechMetaTileEntityTreeFarm(final String aName) {
super(aName);
- }
+ }
@Override
public String[] getDescription() {
@@ -91,34 +90,34 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
@Override
- public void saveNBTData(NBTTagCompound aNBT) {
+ public void saveNBTData(final NBTTagCompound aNBT) {
aNBT.setLong("mInternalPower", this.mInternalPower);
super.saveNBTData(aNBT);
}
@Override
- public void loadNBTData(NBTTagCompound aNBT) {
+ public void loadNBTData(final NBTTagCompound aNBT) {
this.mInternalPower = aNBT.getLong("mInternalPower");
super.loadNBTData(aNBT);
}
@Override
- public boolean drainEnergyInput(long aEU) {
+ public boolean drainEnergyInput(final long aEU) {
this.mInternalPower = (this.mInternalPower-32);
- Utils.LOG_MACHINE_INFO("Draining internal power storage by 32EU. Stored:"+this.mInternalPower);
+ Utils.LOG_MACHINE_INFO("Draining internal power storage by 32EU. Stored:"+this.mInternalPower);
return true;
}
- public boolean addPowerToInternalStorage(IGregTechTileEntity aBaseMetaTileEntity){
+ public boolean addPowerToInternalStorage(final IGregTechTileEntity aBaseMetaTileEntity){
if (this.mEnergyHatches.size() > 0) {
- for (final GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches){
+ for (final GT_MetaTileEntity_Hatch_Energy tHatch : this.mEnergyHatches){
if (isValidMetaTileEntity(tHatch)) {
- if (tHatch.getEUVar() >= 128) {
+ if (tHatch.getEUVar() >= 128) {
for (int o=0;o<(tHatch.getEUVar()/128);o++){
- if (this.mInternalPower<(maxEUStore()-128)){
- tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(128, false);
- this.mInternalPower = (this.mInternalPower+128);
- //Utils.LOG_MACHINE_INFO("Increasing internal power storage by 128EU. Stored:"+this.mInternalPower);
+ if (this.mInternalPower<(this.maxEUStore()-128)){
+ tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(128, false);
+ this.mInternalPower = (this.mInternalPower+128);
+ //Utils.LOG_MACHINE_INFO("Increasing internal power storage by 128EU. Stored:"+this.mInternalPower);
}
}
}
@@ -127,18 +126,18 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
Utils.LOG_INFO("Bad Power hatch to obtain energy from.");
}
}
- }
- else {
- if (energyHatchRetryCount <= 10){
- energyHatchRetryCount++;
+ }
+ else {
+ if (this.energyHatchRetryCount <= 10){
+ this.energyHatchRetryCount++;
Utils.LOG_INFO("No energy hatches found.");
}
else {
Utils.LOG_MACHINE_INFO("Rechecking for Energy hatches.");
- energyHatchRetryCount = 0;
- this.mEnergyHatches = new ArrayList<GT_MetaTileEntity_Hatch_Energy>();
- checkMachine(aBaseMetaTileEntity, mInventory[1]);
- }
+ this.energyHatchRetryCount = 0;
+ this.mEnergyHatches = new ArrayList<>();
+ this.checkMachine(aBaseMetaTileEntity, this.mInventory[1]);
+ }
}
return true;
}
@@ -151,7 +150,7 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
@Override
public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
if (aSide == 1) {
- return new ITexture[]{new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Acacia_Log), new GT_RenderedTexture(canChop ? TexturesGtBlock.Overlay_Machine_Vent_Fast : TexturesGtBlock.Overlay_Machine_Vent)};
+ return new ITexture[]{new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Acacia_Log), new GT_RenderedTexture(this.canChop ? TexturesGtBlock.Overlay_Machine_Vent_Fast : TexturesGtBlock.Overlay_Machine_Vent)};
}
return new ITexture[]{new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Farm_Manager)};
}
@@ -187,17 +186,17 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
}
@Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GUI_TreeFarmer(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "TreeFarmer.png");
- }
+ public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GUI_TreeFarmer(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "TreeFarmer.png");
+ }
@Override
- public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
+ public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) {
return new CONTAINER_TreeFarmer(aPlayerInventory, aBaseMetaTileEntity);
}
@Override
- public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
+ public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) {
if (aBaseMetaTileEntity.isClientSide()) {
return true;
}
@@ -208,13 +207,13 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
@Override
public boolean isCorrectMachinePart(final ItemStack aStack) {
boolean isValid = false;
- SAWTOOL currentInputItem = TreeFarmHelper.isCorrectMachinePart(aStack);
+ final SAWTOOL currentInputItem = TreeFarmHelper.isCorrectMachinePart(aStack);
if (currentInputItem != SAWTOOL.NONE){
if (currentInputItem == SAWTOOL.SAW){
- mCurrentMachineTool = SAWTOOL.SAW;
+ this.mCurrentMachineTool = SAWTOOL.SAW;
}
else {
- mCurrentMachineTool = SAWTOOL.BUZZSAW;
+ this.mCurrentMachineTool = SAWTOOL.BUZZSAW;
}
isValid = true;
}
@@ -226,7 +225,7 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
@Override
public boolean checkRecipe(final ItemStack aStack) {
- Utils.LOG_MACHINE_INFO("Working");
+ Utils.LOG_MACHINE_INFO("Working");
this.mEfficiency = 0;
this.mEfficiencyIncrease = 0;
this.mMaxProgresstime = 0;
@@ -236,7 +235,7 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
@Override
public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
Utils.LOG_WARNING("Step 1");
- final int xDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 7;
+ final int xDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 7;
final int zDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 7;
for (int i = -7; i <= 7; i++) {
@@ -247,7 +246,7 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
Utils.LOG_WARNING("Step 4");
final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
//Farm Floor inner 14x14
- if ((i != -7 && i != 7) && (j != -7 && j != 7)) {
+ if (((i != -7) && (i != 7)) && ((j != -7) && (j != 7))) {
Utils.LOG_WARNING("Step 5 - H:"+h);
// Farm Dirt Floor and Inner Air/Log space.
if (h == 0) {
@@ -256,24 +255,24 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
Utils.LOG_MACHINE_INFO("Dirt like block missing from inner 14x14.");
Utils.LOG_MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
return false;
- }
+ }
}
}
//Dealt with inner 5x5, now deal with the exterior.
else {
Utils.LOG_WARNING("Step 6 - H:"+h);
//Deal with all 4 sides (Fenced area)
- if (h == 1) {
+ if (h == 1) {
if (!TreefarmManager.isFenceBlock(aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j))) {
Utils.LOG_MACHINE_INFO("Fence/Gate missing from outside the second layer.");
Utils.LOG_MACHINE_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName());
return false;
- }
+ }
}
//Deal with Bottom edges (Add Hatches/Busses first, othercheck make sure it's dirt) //TODO change the casings to not dirt~
else if (h == 0) {
- if ((!addMaintenanceToMachineList(tTileEntity, 77)) && (!addInputToMachineList(tTileEntity, 77)) && (!addOutputToMachineList(tTileEntity, 77)) && (!addEnergyInputToMachineList(tTileEntity, 77))) {
- if ((xDir + i != 0) || (zDir + j != 0)) {//no controller
+ if ((!this.addMaintenanceToMachineList(tTileEntity, 77)) && (!this.addInputToMachineList(tTileEntity, 77)) && (!this.addOutputToMachineList(tTileEntity, 77)) && (!this.addEnergyInputToMachineList(tTileEntity, 77))) {
+ if (((xDir + i) != 0) || ((zDir + j) != 0)) {//no controller
if (tTileEntity.getMetaTileID() != 752) {
Utils.LOG_MACHINE_INFO("Farm Keeper Casings Missing from one of the edges on the bottom edge. x:"+(xDir+i)+" y:"+h+" z:"+(zDir+j)+" | "+aBaseMetaTileEntity.getClass());
@@ -303,7 +302,7 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
if (this.mOutputHatches != null) {
for (int i = 0; i < this.mOutputHatches.size(); i++) {
- if (this.mOutputHatches.get(i).mTier < 2 && (this.mOutputHatches.get(i).getBaseMetaTileEntity() instanceof GregtechMTE_NuclearReactor)){
+ if ((this.mOutputHatches.get(i).mTier < 2) && (this.mOutputHatches.get(i).getBaseMetaTileEntity() instanceof GregtechMTE_NuclearReactor)){
Utils.LOG_INFO("You require at LEAST MV tier Output Hatches.");
Utils.LOG_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord());
Utils.LOG_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getInventoryName());
@@ -357,7 +356,7 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
private boolean isMachineRepaired(){
if (this.mSolderingTool || this.mCrowbar || this.mHardHammer || this.mScrewdriver || this.mSoftHammer || this.mWrench){
return true;
- }
+ }
return false;
}
@@ -368,12 +367,12 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
Utils.LOG_MACHINE_INFO("called findLogs()");
int logsCut = 0;
boolean stopCheck = false;
- final int xDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 7;
+ final int xDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 7;
final int zDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 7;
final World world = aBaseMetaTileEntity.getWorld();
int posX, posY, posZ;
- if (mInternalPower >= 128) {
+ if (this.mInternalPower >= 128) {
OUTER : for (int h=0;h<150;h++){
for (int i = -7; i <= 7; i++) {
@@ -382,88 +381,88 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
//Cut too many logs, do this to prevent lag.
- if (logsCut >= logsToBreakAfter){
+ if (logsCut >= this.logsToBreakAfter){
stopCheck = true;
- }
+ }
//Already Breaking but first two layers are empty, let's do a full check.
- else if (logsCut == 0 && h == 2 && takingBreak){
+ else if ((logsCut == 0) && (h == 2) && this.takingBreak){
stopCheck = false;
}
//No Trees Grown and not breaking, take a break, reduce lag.
- else if (logsCut == 0 && h == 3 && !takingBreak){
+ else if ((logsCut == 0) && (h == 3) && !this.takingBreak){
stopCheck = true;
- }
+ }
else {
stopCheck = false;
}
if (stopCheck){
Utils.LOG_MACHINE_INFO("Either found too many logs, so taking a break mid cut for lag conservation, or found no trees to cut, so stopping");
- Utils.LOG_MACHINE_INFO("found: "+logsCut +" and check up to h:"+h+" - Taking Break:"+takingBreak);
+ Utils.LOG_MACHINE_INFO("found: "+logsCut +" and check up to h:"+h+" - Taking Break:"+this.takingBreak);
stopCheck = false;
break OUTER;
}
- if ((i != -7 && i != 7) && (j != -7 && j != 7)) {
- Block loopBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j);
- if (TreefarmManager.isWoodLog(loopBlock) || TreefarmManager.isLeaves(loopBlock)){
- long tempStoredEU = mInternalPower;
- if (tempStoredEU >= powerDrain){
- Utils.LOG_MACHINE_INFO("Cutting a "+loopBlock.getLocalizedName()+", currently stored:"+tempStoredEU+" | max:"+maxEUStore());
- drainEnergyInput(powerDrain);
+ if (((i != -7) && (i != 7)) && ((j != -7) && (j != 7))) {
+ final Block loopBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j);
+ if (TreefarmManager.isWoodLog(loopBlock) || TreefarmManager.isLeaves(loopBlock)){
+ final long tempStoredEU = this.mInternalPower;
+ if (tempStoredEU >= powerDrain){
+ Utils.LOG_MACHINE_INFO("Cutting a "+loopBlock.getLocalizedName()+", currently stored:"+tempStoredEU+" | max:"+this.maxEUStore());
+ this.drainEnergyInput(powerDrain);
- long tempStoredEU2 = mInternalPower;
+ final long tempStoredEU2 = this.mInternalPower;
if (tempStoredEU != tempStoredEU2){
if (tempStoredEU == (tempStoredEU2+powerDrain)){
- Utils.LOG_MACHINE_INFO(powerDrain+"EU was drained.");
+ Utils.LOG_MACHINE_INFO(powerDrain+"EU was drained.");
}
else {
Utils.LOG_MACHINE_INFO(""+(tempStoredEU-tempStoredEU2)+"EU was drained.");
}
}
else {
- Utils.LOG_MACHINE_INFO("Stored EU did not change.");
+ Utils.LOG_MACHINE_INFO("Stored EU did not change.");
}
posX = aBaseMetaTileEntity.getXCoord()+xDir+i;
posY = aBaseMetaTileEntity.getYCoord()+h;
posZ = aBaseMetaTileEntity.getZCoord()+zDir+j;
- cutLog(world, posX, posY, posZ);
+ this.cutLog(world, posX, posY, posZ);
if (TreefarmManager.isWoodLog(loopBlock)){
- logsCut++;
- }
+ logsCut++;
+ }
}
else {
Utils.LOG_MACHINE_INFO("Not enough power to cut.");
- }
+ }
}
}
}
}
- }
+ }
}
else {
- Utils.LOG_MACHINE_INFO("Not enough Power | can hold:"+maxEUStore()+" | holding:"+aBaseMetaTileEntity.getStoredEU());
+ Utils.LOG_MACHINE_INFO("Not enough Power | can hold:"+this.maxEUStore()+" | holding:"+aBaseMetaTileEntity.getStoredEU());
}
- canChop = false;
- if (logsCut >= logsToBreakAfter){
+ this.canChop = false;
+ if (logsCut >= this.logsToBreakAfter){
TreeFarmHelper.cleanUp(aBaseMetaTileEntity);
}
- return false;
+ return false;
}
private boolean growSaplingsWithBonemeal(final IGregTechTileEntity aBaseMetaTileEntity){
Utils.LOG_MACHINE_INFO("called growSaplingsWithBonemeal()");
int saplings = 0;
- final int xDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 7;
+ final int xDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 7;
final int zDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 7;
for (int i = -7; i <= 7; i++) {
for (int j = -7; j <= 7; j++) {
- int h = 1;
+ final int h = 1;
//Utils.LOG_MACHINE_INFO("Looking for saplings.");
if (TreefarmManager.isSapling(aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j))){
int posiX, posiY, posiZ;
@@ -473,10 +472,10 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
//Utils.LOG_MACHINE_INFO("Found a sapling to grow.");
saplings++;
- if (depleteFertiliser()){
- if (drainEnergyInput(powerDrain)){
- short fertTier = getFertiliserTier(getCurrentFertiliserStack());
- TreeFarmHelper.applyBonemeal(getFakePlayer(), aBaseMetaTileEntity.getWorld(), posiX, posiY, posiZ, fertTier);
+ if (this.depleteFertiliser()){
+ if (this.drainEnergyInput(powerDrain)){
+ final short fertTier = this.getFertiliserTier(this.getCurrentFertiliserStack());
+ TreeFarmHelper.applyBonemeal(this.getFakePlayer(), aBaseMetaTileEntity.getWorld(), posiX, posiY, posiZ, fertTier);
}
else {
Utils.LOG_MACHINE_INFO("x3");
@@ -486,40 +485,40 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
else {
Utils.LOG_MACHINE_INFO("x2");
break;
- }
- }
+ }
+ }
}
}
Utils.LOG_MACHINE_INFO("Tried to grow saplings: | "+saplings );
- return true;
+ return true;
}
private boolean plantSaplings(final IGregTechTileEntity aBaseMetaTileEntity){
Utils.LOG_MACHINE_INFO("called plantSaplings()");
- World world = aBaseMetaTileEntity.getWorld();
- ArrayList<ItemStack> r = getStoredInputs();
- int saplings = 0;
- final int xDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 7;
+ final World world = aBaseMetaTileEntity.getWorld();
+ ArrayList<ItemStack> r = this.getStoredInputs();
+ final int saplings = 0;
+ final int xDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 7;
final int zDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 7;
int counter = 0;
if (r.size() > 0){
Utils.LOG_MACHINE_INFO("| r was not null. "+r.size()+" |");
- OUTER : for (ItemStack n : r){
+ OUTER : for (final ItemStack n : r){
Utils.LOG_MACHINE_INFO("found "+n.getDisplayName());
if (OrePrefixes.sapling.contains(n) || n.getDisplayName().toLowerCase().contains("sapling")){
Utils.LOG_MACHINE_INFO(""+n.getDisplayName());
counter = n.stackSize;
- Block saplingToPlace = Block.getBlockFromItem(n.getItem());
+ final Block saplingToPlace = Block.getBlockFromItem(n.getItem());
//Find Gaps for Saplings after scanning Item Busses
for (int i = -7; i <= 7; i++) {
INNER : for (int j = -7; j <= 7; j++) {
- int h = 1;
- if (counter > 0){
- if ((i != -7 && i != 7) && (j != -7 && j != 7)) {
- if (TreefarmManager.isAirBlock(aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j))){
+ final int h = 1;
+ if (counter > 0){
+ if (((i != -7) && (i != 7)) && ((j != -7) && (j != 7))) {
+ if (TreefarmManager.isAirBlock(aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j))){
//Get block location to place sapling block
int posX, posY, posZ;
@@ -528,7 +527,7 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
posZ = aBaseMetaTileEntity.getZCoord()+zDir+j;
//If sapling block is not null || Ignore if forestry is loaded.
- if ((saplingToPlace != null && !LoadedMods.Forestry) || LoadedMods.Forestry){
+ if (((saplingToPlace != null) && !LoadedMods.Forestry) || LoadedMods.Forestry){
//Plant Sapling
if (!LoadedMods.Forestry){
@@ -536,33 +535,33 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
world.setBlockMetadataWithNotify(posX, posY, posZ, n.getItemDamage(), 4);
}
else {
- plantSaplingAt(n, this.getBaseMetaTileEntity().getWorld(), posX, posY, posZ);
- }
+ this.plantSaplingAt(n, this.getBaseMetaTileEntity().getWorld(), posX, posY, posZ);
+ }
//Deplete Input stack
- depleteInputEx(n);
- drainEnergyInput(powerDrain);
+ this.depleteInputEx(n);
+ this.drainEnergyInput(powerDrain);
counter--;
//Update slot contents?
- updateSlots();
+ this.updateSlots();
//Test If Inputs Changed
- ArrayList<ItemStack> temp = getStoredInputs();
+ final ArrayList<ItemStack> temp = this.getStoredInputs();
if (r != temp){
Utils.LOG_MACHINE_INFO("Inputs changed, updating.");
- for (ItemStack xr : r){
+ for (final ItemStack xr : r){
Utils.LOG_MACHINE_INFO("xr:"+xr.getDisplayName()+"x"+xr.stackSize);
}
- for (ItemStack xc : temp){
+ for (final ItemStack xc : temp){
Utils.LOG_MACHINE_INFO("xc:"+xc.getDisplayName()+"x"+xc.stackSize);
}
- r = temp;
+ r = temp;
}
}
else {
- Utils.LOG_MACHINE_INFO(n.getDisplayName()+" did not have a valid block.");
+ Utils.LOG_MACHINE_INFO(n.getDisplayName()+" did not have a valid block.");
}
- }
+ }
else {
//Utils.LOG_MACHINE_INFO("No space for sapling, no air.");
continue INNER;
@@ -590,63 +589,64 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
}*/
}
Utils.LOG_MACHINE_INFO("Tried to plant saplings: | "+saplings );
- return true;
+ return true;
}
@Optional.Method(modid = "Forestry")
- public boolean plantSaplingAt(ItemStack germling, World world, int x, int y, int z) {
+ public boolean plantSaplingAt(final ItemStack germling, final World world, final int x, final int y, final int z) {
Utils.LOG_MACHINE_INFO("Planting Sapling with Forestry method, since it's installed.");
if (PluginManager.Module.ARBORICULTURE.isEnabled()) {
- IIndividual tree = GeneticsUtil.getGeneticEquivalent(germling);
+ final IIndividual tree = GeneticsUtil.getGeneticEquivalent(germling);
if (!(tree instanceof ITree)) {
return false;
}
- return TreeManager.treeRoot.plantSapling(world, (ITree) tree, getFakePlayer().getGameProfile(), x, y, z);
+ return TreeManager.treeRoot.plantSapling(world, (ITree) tree, this.getFakePlayer().getGameProfile(), x, y, z);
}
- return germling.copy().tryPlaceItemIntoWorld(getFakePlayer(), world, x, y - 1, z, 1, 0.0F, 0.0F, 0.0F);
+ return germling.copy().tryPlaceItemIntoWorld(this.getFakePlayer(), world, x, y - 1, z, 1, 0.0F, 0.0F, 0.0F);
}
private boolean cutLog(final World world, final int x, final int y, final int z){
//Utils.LOG_MACHINE_INFO("Cutting Log");
try {
- final Block block = world.getBlock(x, y, z);
+ final Block block = world.getBlock(x, y, z);
int chanceForLeaves = 1000;
//is it leaves or a log? if leaves, heavily reduce chance to obtain rubber
if (block.getUnlocalizedName().toLowerCase().contains("leaves")){
chanceForLeaves = MathUtils.randInt(1, 1000);
- if (chanceForLeaves > 990)
+ if (chanceForLeaves > 990) {
Utils.LOG_MACHINE_INFO("Found some leaves that will drop, chance to drop item "+chanceForLeaves+", needed 990-1000.");
+ }
}
//IC2 Sticky Rubber handling
if (block.getUnlocalizedName().toLowerCase().contains("blockrubwood") || block.getUnlocalizedName().toLowerCase().contains("blockrubleaves")){
- ItemStack rubberResin = ItemUtils.getCorrectStacktype("IC2:itemHarz", 1);
- int chanceForRubber = MathUtils.randInt(1, 10);
- int multiplier = MathUtils.randInt(1, 3);
- if (chanceForRubber > 7 && chanceForLeaves > 990){
+ final ItemStack rubberResin = ItemUtils.getCorrectStacktype("IC2:itemHarz", 1);
+ final int chanceForRubber = MathUtils.randInt(1, 10);
+ final int multiplier = MathUtils.randInt(1, 3);
+ if ((chanceForRubber > 7) && (chanceForLeaves > 990)){
rubberResin.stackSize = multiplier;
Utils.LOG_MACHINE_INFO("Adding "+rubberResin.getDisplayName()+" x"+rubberResin.stackSize);
- addOutput(rubberResin);
- updateSlots();
- }
+ this.addOutput(rubberResin);
+ this.updateSlots();
+ }
}
- int dropMeta = world.getBlockMetadata(x, y, z);
- ArrayList<ItemStack> blockDrops = block.getDrops(world, x, y, z, dropMeta, 0);
- ItemStack[] drops = ItemUtils.getBlockDrops(blockDrops);
+ final int dropMeta = world.getBlockMetadata(x, y, z);
+ final ArrayList<ItemStack> blockDrops = block.getDrops(world, x, y, z, dropMeta, 0);
+ final ItemStack[] drops = ItemUtils.getBlockDrops(blockDrops);
//Add Drops
- if (drops != null){
- for (ItemStack outputs : drops){
+ if (drops != null){
+ for (final ItemStack outputs : drops){
if (chanceForLeaves > 990){
Utils.LOG_MACHINE_INFO("Adding 1x "+outputs.getDisplayName());
- addOutput(outputs);
+ this.addOutput(outputs);
//Update bus contents.
- updateSlots();
+ this.updateSlots();
}
- }
+ }
- }
+ }
//Remove drop that was added to the bus.
world.setBlockToAir(x, y, z);
@@ -654,31 +654,31 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
return true;
- } catch (NullPointerException e){}
+ } catch (final NullPointerException e){}
return false;
}
public FluidStack[] getStoredInputFluids(){
- ArrayList<FluidStack> fluidArray = this.getStoredFluids();
+ final ArrayList<FluidStack> fluidArray = this.getStoredFluids();
if (fluidArray.size() < 1){
return new FluidStack[] {};
}
- FluidStack storedInputFluids[] = new FluidStack[fluidArray.size()];
+ final FluidStack storedInputFluids[] = new FluidStack[fluidArray.size()];
if (storedInputFluids.length >= 1){
int counter = 0;
- for (FluidStack inputPuddle : fluidArray){
+ for (final FluidStack inputPuddle : fluidArray){
storedInputFluids[counter] = inputPuddle;
counter++;
}
- return storedInputFluids;
+ return storedInputFluids;
}
return new FluidStack[] {};
}
public boolean doesInputHatchContainAnyFertiliser(){
- FluidStack[] tempFluids = getStoredInputFluids();
+ final FluidStack[] tempFluids = this.getStoredInputFluids();
if (tempFluids.length >= 1){
- for (FluidStack f : tempFluids){
+ for (final FluidStack f : tempFluids){
if (f.isFluidEqual(TreeFarmHelper.fertT1) || f.isFluidEqual(TreeFarmHelper.fertT2) || f.isFluidEqual(TreeFarmHelper.fertT3)){
return true;
}
@@ -691,7 +691,7 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
return false;
}
- public short getFertiliserTier(FluidStack f){
+ public short getFertiliserTier(final FluidStack f){
if (f.isFluidEqual(TreeFarmHelper.fertT1)){
return 1;
}
@@ -707,12 +707,12 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
}
public FluidStack getCurrentFertiliserStack(){
- if (!doesInputHatchContainAnyFertiliser()){
+ if (!this.doesInputHatchContainAnyFertiliser()){
return null;
- }
- FluidStack[] tempFluids = getStoredInputFluids();
+ }
+ final FluidStack[] tempFluids = this.getStoredInputFluids();
if (tempFluids.length >= 1){
- for (FluidStack f : tempFluids){
+ for (final FluidStack f : tempFluids){
if (f.isFluidEqual(TreeFarmHelper.fertT1)){
return TreeFarmHelper.fertT1;
}
@@ -729,10 +729,10 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
public boolean doesInputHatchContainEnoughFertiliser(){
- FluidStack[] tempFluids = getStoredInputFluids();
+ final FluidStack[] tempFluids = this.getStoredInputFluids();
if (tempFluids.length >= 1){
- for (FluidStack f : tempFluids){
- if (f.amount >= TreeFarmHelper.fertT1.amount || f.amount >= TreeFarmHelper.fertT2.amount || f.amount >= TreeFarmHelper.fertT3.amount){
+ for (final FluidStack f : tempFluids){
+ if ((f.amount >= TreeFarmHelper.fertT1.amount) || (f.amount >= TreeFarmHelper.fertT2.amount) || (f.amount >= TreeFarmHelper.fertT3.amount)){
return true;
}
}
@@ -742,22 +742,22 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
}
public boolean depleteFertiliser(){
- if (!doesInputHatchContainEnoughFertiliser()){
+ if (!this.doesInputHatchContainEnoughFertiliser()){
return false;
- }
- FluidStack[] tempFluids = getStoredInputFluids();
+ }
+ final FluidStack[] tempFluids = this.getStoredInputFluids();
if (tempFluids.length >= 1){
- for (FluidStack f : tempFluids){
- if (f.isFluidEqual(TreeFarmHelper.fertT1) || f.isFluidEqual(TreeFarmHelper.fertT2) || f.isFluidEqual(TreeFarmHelper.fertT3)){
- if (f.isFluidEqual(TreeFarmHelper.fertT1) && f.amount >= TreeFarmHelper.fertT1.amount){
+ for (final FluidStack f : tempFluids){
+ if (f.isFluidEqual(TreeFarmHelper.fertT1) || f.isFluidEqual(TreeFarmHelper.fertT2) || f.isFluidEqual(TreeFarmHelper.fertT3)){
+ if (f.isFluidEqual(TreeFarmHelper.fertT1) && (f.amount >= TreeFarmHelper.fertT1.amount)){
this.depleteInput(TreeFarmHelper.fertT1);
return true;
}
- else if(f.isFluidEqual(TreeFarmHelper.fertT2) && f.amount >= TreeFarmHelper.fertT2.amount){
+ else if(f.isFluidEqual(TreeFarmHelper.fertT2) && (f.amount >= TreeFarmHelper.fertT2.amount)){
this.depleteInput(TreeFarmHelper.fertT2);
return true;
}
- else if(f.isFluidEqual(TreeFarmHelper.fertT3) && f.amount >= TreeFarmHelper.fertT3.amount){
+ else if(f.isFluidEqual(TreeFarmHelper.fertT3) && (f.amount >= TreeFarmHelper.fertT3.amount)){
this.depleteInput(TreeFarmHelper.fertT3);
return true;
}
@@ -769,13 +769,15 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
- public boolean depleteInputEx(ItemStack aStack) {
- if (GT_Utility.isStackInvalid(aStack)) return false;
+ public boolean depleteInputEx(final ItemStack aStack) {
+ if (GT_Utility.isStackInvalid(aStack)) {
+ return false;
+ }
Utils.LOG_MACHINE_INFO("Taking one sapling away from in input bus.");
- for (GT_MetaTileEntity_Hatch_InputBus tHatch : this.mInputBusses) {
- tHatch.mRecipeMap = getRecipeMap();
+ for (final GT_MetaTileEntity_Hatch_InputBus tHatch : this.mInputBusses) {
+ tHatch.mRecipeMap = this.getRecipeMap();
if (isValidMetaTileEntity(tHatch)) {
for (int i = tHatch.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; --i) {
if ((!(GT_Utility.areStacksEqual(aStack, tHatch.getBaseMetaTileEntity().getStackInSlot(i)))) || (tHatch.getBaseMetaTileEntity().getStackInSlot(0).stackSize < aStack.stackSize)){
@@ -793,39 +795,39 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
//Tree Manager
private void tickTrees(){
- if (treeCheckTicks > 200){
- treeCheckTicks = 0;
+ if (this.treeCheckTicks > 200){
+ this.treeCheckTicks = 0;
}
else {
- treeCheckTicks++;
+ this.treeCheckTicks++;
}
}
private void tickSaplings(){
- if (plantSaplingTicks > 200){
- plantSaplingTicks = 0;
+ if (this.plantSaplingTicks > 200){
+ this.plantSaplingTicks = 0;
}
else {
- plantSaplingTicks++;
+ this.plantSaplingTicks++;
}
}
private void tickCleanup(){
- if (cleanupTicks > 600){
- cleanupTicks = 0;
+ if (this.cleanupTicks > 600){
+ this.cleanupTicks = 0;
}
else {
- cleanupTicks++;
+ this.cleanupTicks++;
}
}
private void tickHandler(){
//Count Sapling Timer
- tickSaplings();
+ this.tickSaplings();
//Count Tree Cutting Timer
- tickTrees();
+ this.tickTrees();
//Tick Cleanup script Timer.
- tickCleanup();
+ this.tickCleanup();
}
public EntityPlayerMP getFakePlayer() {
@@ -833,7 +835,7 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
}
@Override
- public boolean onRunningTick(ItemStack aStack) {
+ public boolean onRunningTick(final ItemStack aStack) {
return super.onRunningTick(aStack);
}
@@ -844,82 +846,82 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock
//Does it have a tool this cycle to cut?
boolean validCuttingTool = false;
- boolean isRepaired = isMachineRepaired();
+ final boolean isRepaired = this.isMachineRepaired();
//Add some Power
- addPowerToInternalStorage(aBaseMetaTileEntity);
+ this.addPowerToInternalStorage(aBaseMetaTileEntity);
//Set Forestry Fake player Sapling Planter
if (this.farmerAI == null) {
this.farmerAI = new FakeFarmer(MinecraftServer.getServer().worldServerForDimension(this.getBaseMetaTileEntity().getWorld().provider.dimensionId));
- }
+ }
//Check Inventory slots [1] - Find a valid Buzzsaw Blade or a Saw
try {
- validCuttingTool = isCorrectMachinePart(mInventory[1]);
+ validCuttingTool = this.isCorrectMachinePart(this.mInventory[1]);
if (validCuttingTool){
this.mMaxProgresstime = 600;
- String materialName = GT_MetaGenerated_Tool.getPrimaryMaterial(mInventory[1]).mDefaultLocalName;
+ final String materialName = GT_MetaGenerated_Tool.getPrimaryMaterial(this.mInventory[1]).mDefaultLocalName;
if (materialName.toLowerCase().contains("null")){
}
else {
}
- }
+ }
else {
this.mMaxProgresstime = 0;
}
- } catch (NullPointerException t){}
+ } catch (final NullPointerException t){}
if (isRepaired){
//Utils.LOG_INFO("Ticking3");
//If Machine can work and it's only once every 5 seconds this will tick.
- if (canChop){
+ if (this.canChop){
//Set Machine State
- if (treeCheckTicks == 200){
- Utils.LOG_MACHINE_INFO("Looking For Trees - Serverside | "+treeCheckTicks);
+ if (this.treeCheckTicks == 200){
+ Utils.LOG_MACHINE_INFO("Looking For Trees - Serverside | "+this.treeCheckTicks);
//Find wood to Cut
if (validCuttingTool){
- findLogs(aBaseMetaTileEntity);
+ this.findLogs(aBaseMetaTileEntity);
}
else {
Utils.LOG_MACHINE_INFO("Did not find a valid saw or Buzzsaw blade.");
}
}
- }
+ }
else {
- if (plantSaplingTicks == 100){
- Utils.LOG_MACHINE_INFO("Looking For space to plant saplings - Serverside | "+plantSaplingTicks);
+ if (this.plantSaplingTicks == 100){
+ Utils.LOG_MACHINE_INFO("Looking For space to plant saplings - Serverside | "+this.plantSaplingTicks);
//Plant Some Saplings
- plantSaplings(aBaseMetaTileEntity);
- }
- else if (plantSaplingTicks == 200){
- Utils.LOG_MACHINE_INFO("Looking For Saplings to grow - Serverside | "+plantSaplingTicks);
+ this.plantSaplings(aBaseMetaTileEntity);
+ }
+ else if (this.plantSaplingTicks == 200){
+ Utils.LOG_MACHINE_INFO("Looking For Saplings to grow - Serverside | "+this.plantSaplingTicks);
//Try Grow some Saplings
- if (doesInputHatchContainAnyFertiliser()){
- growSaplingsWithBonemeal(aBaseMetaTileEntity);
- }
+ if (this.doesInputHatchContainAnyFertiliser()){
+ this.growSaplingsWithBonemeal(aBaseMetaTileEntity);
+ }
//Set can work state
- this.mInputBusses = new ArrayList<GT_MetaTileEntity_Hatch_InputBus>();
- this.mEnergyHatches = new ArrayList<GT_MetaTileEntity_Hatch_Energy>();
- canChop = checkMachine(aBaseMetaTileEntity, mInventory[1]);
+ this.mInputBusses = new ArrayList<>();
+ this.mEnergyHatches = new ArrayList<>();
+ this.canChop = this.checkMachine(aBaseMetaTileEntity, this.mInventory[1]);
}
- }
+ }
//Tick TE
- tickHandler();
+ this.tickHandler();
}
else {
- if (treeCheckTicks == 200 || plantSaplingTicks == 100 || plantSaplingTicks == 200){
- Utils.LOG_MACHINE_INFO("Machine is not fully repaired, not ticking.");
+ if ((this.treeCheckTicks == 200) || (this.plantSaplingTicks == 100) || (this.plantSaplingTicks == 200)){
+ Utils.LOG_MACHINE_INFO("Machine is not fully repaired, not ticking.");
}
}
-
+
//Call Cleanup Task last, before ticking.
- if (cleanupTicks == 600){
- Utils.LOG_MACHINE_INFO("Looking For rubbish to cleanup - Serverside | "+cleanupTicks);
+ if (this.cleanupTicks == 600){
+ Utils.LOG_MACHINE_INFO("Looking For rubbish to cleanup - Serverside | "+this.cleanupTicks);
TreeFarmHelper.cleanUp(aBaseMetaTileEntity);
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_AlloyBlastSmelter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_AlloyBlastSmelter.java
index 4de7048ffd..b4f3254e2c 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_AlloyBlastSmelter.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_AlloyBlastSmelter.java
@@ -1,5 +1,8 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi;
+import java.util.ArrayList;
+import java.util.Arrays;
+
import gregtech.api.enums.Textures;
import gregtech.api.gui.GT_GUIContainer_MultiMachine;
import gregtech.api.interfaces.ITexture;
@@ -10,221 +13,217 @@ import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.*;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.util.Utils;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;
public class GregtechMetaTileEntity_AlloyBlastSmelter
- extends GT_MetaTileEntity_MultiBlockBase {
- private int mHeatingCapacity = 0;
+extends GT_MetaTileEntity_MultiBlockBase {
+ private int mHeatingCapacity = 0;
- public GregtechMetaTileEntity_AlloyBlastSmelter(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional);
- }
+ public GregtechMetaTileEntity_AlloyBlastSmelter(final int aID, final String aName, final String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
- public GregtechMetaTileEntity_AlloyBlastSmelter(String aName) {
- super(aName);
- }
+ public GregtechMetaTileEntity_AlloyBlastSmelter(final String aName) {
+ super(aName);
+ }
- @Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GregtechMetaTileEntity_AlloyBlastSmelter(this.mName);
- }
+ @Override
+ public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntity_AlloyBlastSmelter(this.mName);
+ }
- @Override
+ @Override
public String[] getDescription() {
- return new String[]{
- "Controller Block for the Alloy Blast Smelter", //Outputs 144mb fluid for every inputStack.stackSize; Time to use those hot metals.
- "Size: 3x3x4 (Hollow)",
- "Controller (front middle at bottom)",
- "16x Blast Smelter Heat Containment Coils (two middle Layers, hollow)",
- "1x Input bus (one of bottom)",
- "1x Output Hatch (one of bottom)",
- "1x Energy Hatch (one of bottom)",
- "1x Maintenance Hatch (one of bottom)",
- "1x Muffler Hatch (top middle)",
- "Blast Smelter Casings for the rest"};
- }
-
- @Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- if (aSide == aFacing) {
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[72], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE)};
- }
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[72]};
- }
-
- @Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "ElectricBlastFurnace.png");
- }
-
- @Override
+ return new String[]{
+ "Controller Block for the Alloy Blast Smelter", //Outputs 144mb fluid for every inputStack.stackSize; Time to use those hot metals.
+ "Size: 3x3x4 (Hollow)",
+ "Controller (front middle at bottom)",
+ "16x Blast Smelter Heat Containment Coils (two middle Layers, hollow)",
+ "1x Input bus (one of bottom)",
+ "1x Output Hatch (one of bottom)",
+ "1x Energy Hatch (one of bottom)",
+ "1x Maintenance Hatch (one of bottom)",
+ "1x Muffler Hatch (top middle)",
+ "Blast Smelter Casings for the rest"};
+ }
+
+ @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[72], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE)};
+ }
+ return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[72]};
+ }
+
+ @Override
+ public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "ElectricBlastFurnace.png");
+ }
+
+ @Override
public GT_Recipe.GT_Recipe_Map getRecipeMap() {
- return Recipe_GT.Gregtech_Recipe_Map.sAlloyBlastSmelterRecipes;
- }
-
- @Override
- public boolean isCorrectMachinePart(ItemStack aStack) {
- return true;
- }
-
- @Override
- public boolean isFacingValid(byte aFacing) {
- return aFacing > 1;
- }
-
- @Override
- public boolean checkRecipe(ItemStack aStack) {
- ArrayList<ItemStack> tInputList = getStoredInputs();
- for (int i = 0; i < tInputList.size() - 1; i++) {
- for (int j = i + 1; j < tInputList.size(); j++) {
- if (GT_Utility.areStacksEqual((ItemStack) tInputList.get(i), (ItemStack) tInputList.get(j))) {
- if (((ItemStack) tInputList.get(i)).stackSize >= ((ItemStack) tInputList.get(j)).stackSize) {
- tInputList.remove(j--);
- } else {
- tInputList.remove(i--);
- break;
- }
- }
- }
- }
- ItemStack[] tInputs = (ItemStack[]) Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, tInputList.size());
-
- ArrayList<FluidStack> tFluidList = getStoredFluids();
- for (int i = 0; i < tFluidList.size() - 1; i++) {
- for (int j = i + 1; j < tFluidList.size(); j++) {
- if (GT_Utility.areFluidsEqual((FluidStack) tFluidList.get(i), (FluidStack) tFluidList.get(j))) {
- if (((FluidStack) tFluidList.get(i)).amount >= ((FluidStack) tFluidList.get(j)).amount) {
- tFluidList.remove(j--);
- } else {
- tFluidList.remove(i--);
- break;
- }
- }
- }
- }
- FluidStack[] tFluids = (FluidStack[]) Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tInputList.size()]), 0, 1);
- if (tInputList.size() > 1) {
- long tVoltage = getMaxInputVoltage();
- byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
- GT_Recipe tRecipe = Recipe_GT.Gregtech_Recipe_Map.sAlloyBlastSmelterRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs);
- if ((tRecipe != null) && (this.mHeatingCapacity >= tRecipe.mSpecialValue) && (tRecipe.isRecipeInputEqual(true, tFluids, tInputs))) {
- Utils.LOG_WARNING("Found some Valid Inputs.");
- this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
- this.mEfficiencyIncrease = 10000;
- if (tRecipe.mEUt <= 16) {
- this.mEUt = (tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1));
- this.mMaxProgresstime = (tRecipe.mDuration / (1 << tTier - 1));
- } else {
- this.mEUt = tRecipe.mEUt;
- this.mMaxProgresstime = tRecipe.mDuration;
- while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
- this.mEUt *= 4;
- this.mMaxProgresstime /= 2;
- }
- }
- if (this.mEUt > 0) {
- this.mEUt = (-this.mEUt);
- }
- this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
- this.mOutputFluids = new FluidStack[]{tRecipe.getFluidOutput(0)};
- updateSlots();
- return true;
- }
- }
- Utils.LOG_WARNING("Failed to find some Valid Inputs.");
- return false;
- }
-
- @Override
- public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
- int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
- int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
-
- //this.mHeatingCapacity = 0;
- if (!aBaseMetaTileEntity.getAirOffset(xDir, 1, zDir)) {
- return false;
- }
- if (!aBaseMetaTileEntity.getAirOffset(xDir, 2, zDir)) {
- return false;
- }
- addMufflerToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, 3, zDir), 72);
-
- byte tUsedMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + 1, 2, zDir);
-
- this.mHeatingCapacity = 20000;
-
- for (int i = -1; i < 2; i++) {
- for (int j = -1; j < 2; j++) {
- if ((i != 0) || (j != 0)) {
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 2, zDir + j) != ModBlocks.blockCasingsMisc) {
- return false;
- }
- if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 2, zDir + j) != 14) {
- return false;
- }
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 1, zDir + j) != ModBlocks.blockCasingsMisc) {
- return false;
- }
- if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 1, zDir + j) != 14) {
- return false;
- }
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 3, zDir + j) != ModBlocks.blockCasingsMisc) {
- return false;
- }
- if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 3, zDir + j) != 15) {
- return false;
- }
- }
- }
- }
- for (int i = -1; i < 2; i++) {
- for (int j = -1; j < 2; j++) {
- if ((xDir + i != 0) || (zDir + j != 0)) {
- IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 0, zDir + j);
- if ((!addMaintenanceToMachineList(tTileEntity, 72)) && (!addInputToMachineList(tTileEntity, 72)) && (!addOutputToMachineList(tTileEntity, 72)) && (!addEnergyInputToMachineList(tTileEntity, 72))) {
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 0, zDir + j) != ModBlocks.blockCasingsMisc) {
- return false;
- }
- if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 0, zDir + j) != 15) {
- return false;
- }
- }
- }
- }
- }
- this.mHeatingCapacity += 100 * (GT_Utility.getTier(getMaxInputVoltage()) - 2);
- return true;
- }
-
- @Override
- public int getMaxEfficiency(ItemStack aStack) {
- return 10000;
- }
-
- @Override
- public int getPollutionPerTick(ItemStack aStack) {
- return 10;
- }
-
- @Override
- public int getDamageToComponent(ItemStack aStack) {
- return 0;
- }
-
- @Override
+ return Recipe_GT.Gregtech_Recipe_Map.sAlloyBlastSmelterRecipes;
+ }
+
+ @Override
+ public boolean isCorrectMachinePart(final ItemStack aStack) {
+ return true;
+ }
+
+ @Override
+ public boolean isFacingValid(final byte aFacing) {
+ return aFacing > 1;
+ }
+
+ @Override
+ public boolean checkRecipe(final ItemStack aStack) {
+ final ArrayList<ItemStack> tInputList = this.getStoredInputs();
+ for (int i = 0; i < (tInputList.size() - 1); i++) {
+ for (int j = i + 1; j < tInputList.size(); j++) {
+ if (GT_Utility.areStacksEqual(tInputList.get(i), tInputList.get(j))) {
+ if (tInputList.get(i).stackSize >= tInputList.get(j).stackSize) {
+ tInputList.remove(j--);
+ } else {
+ tInputList.remove(i--);
+ break;
+ }
+ }
+ }
+ }
+ final ItemStack[] tInputs = Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, tInputList.size());
+
+ final ArrayList<FluidStack> tFluidList = this.getStoredFluids();
+ for (int i = 0; i < (tFluidList.size() - 1); i++) {
+ for (int j = i + 1; j < tFluidList.size(); j++) {
+ if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) {
+ if (tFluidList.get(i).amount >= tFluidList.get(j).amount) {
+ tFluidList.remove(j--);
+ } else {
+ tFluidList.remove(i--);
+ break;
+ }
+ }
+ }
+ }
+ final FluidStack[] tFluids = Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tInputList.size()]), 0, 1);
+ if (tInputList.size() > 1) {
+ final long tVoltage = this.getMaxInputVoltage();
+ final byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
+ final GT_Recipe tRecipe = Recipe_GT.Gregtech_Recipe_Map.sAlloyBlastSmelterRecipes.findRecipe(this.getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs);
+ if ((tRecipe != null) && (this.mHeatingCapacity >= tRecipe.mSpecialValue) && (tRecipe.isRecipeInputEqual(true, tFluids, tInputs))) {
+ Utils.LOG_WARNING("Found some Valid Inputs.");
+ this.mEfficiency = (10000 - ((this.getIdealStatus() - this.getRepairStatus()) * 1000));
+ this.mEfficiencyIncrease = 10000;
+ if (tRecipe.mEUt <= 16) {
+ this.mEUt = (tRecipe.mEUt * (1 << (tTier - 1)) * (1 << (tTier - 1)));
+ this.mMaxProgresstime = (tRecipe.mDuration / (1 << (tTier - 1)));
+ } else {
+ this.mEUt = tRecipe.mEUt;
+ this.mMaxProgresstime = tRecipe.mDuration;
+ while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
+ this.mEUt *= 4;
+ this.mMaxProgresstime /= 2;
+ }
+ }
+ if (this.mEUt > 0) {
+ this.mEUt = (-this.mEUt);
+ }
+ this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
+ this.mOutputFluids = new FluidStack[]{tRecipe.getFluidOutput(0)};
+ this.updateSlots();
+ return true;
+ }
+ }
+ Utils.LOG_WARNING("Failed to find some Valid Inputs.");
+ return false;
+ }
+
+ @Override
+ public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
+ final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
+ final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
+
+ //this.mHeatingCapacity = 0;
+ if (!aBaseMetaTileEntity.getAirOffset(xDir, 1, zDir)) {
+ return false;
+ }
+ if (!aBaseMetaTileEntity.getAirOffset(xDir, 2, zDir)) {
+ return false;
+ }
+ this.addMufflerToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, 3, zDir), 72);
+
+ final byte tUsedMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + 1, 2, zDir);
+
+ this.mHeatingCapacity = 20000;
+
+ for (int i = -1; i < 2; i++) {
+ for (int j = -1; j < 2; j++) {
+ if ((i != 0) || (j != 0)) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 2, zDir + j) != ModBlocks.blockCasingsMisc) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 2, zDir + j) != 14) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 1, zDir + j) != ModBlocks.blockCasingsMisc) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 1, zDir + j) != 14) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 3, zDir + j) != ModBlocks.blockCasingsMisc) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 3, zDir + j) != 15) {
+ return false;
+ }
+ }
+ }
+ }
+ for (int i = -1; i < 2; i++) {
+ for (int j = -1; j < 2; j++) {
+ if (((xDir + i) != 0) || ((zDir + j) != 0)) {
+ final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 0, zDir + j);
+ if ((!this.addMaintenanceToMachineList(tTileEntity, 72)) && (!this.addInputToMachineList(tTileEntity, 72)) && (!this.addOutputToMachineList(tTileEntity, 72)) && (!this.addEnergyInputToMachineList(tTileEntity, 72))) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 0, zDir + j) != ModBlocks.blockCasingsMisc) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 0, zDir + j) != 15) {
+ return false;
+ }
+ }
+ }
+ }
+ }
+ this.mHeatingCapacity += 100 * (GT_Utility.getTier(this.getMaxInputVoltage()) - 2);
+ return true;
+ }
+
+ @Override
+ public int getMaxEfficiency(final ItemStack aStack) {
+ return 10000;
+ }
+
+ @Override
+ public int getPollutionPerTick(final ItemStack aStack) {
+ return 10;
+ }
+
+ @Override
+ public int getDamageToComponent(final ItemStack aStack) {
+ return 0;
+ }
+
+ @Override
public int getAmountOfOutputs() {
- return 2;
- }
+ return 2;
+ }
- @Override
- public boolean explodesOnComponentBreak(ItemStack aStack) {
- return false;
- }
+ @Override
+ public boolean explodesOnComponentBreak(final ItemStack aStack) {
+ return false;
+ }
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCentrifuge.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCentrifuge.java
index 0838bdefbd..87aa5582f9 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCentrifuge.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCentrifuge.java
@@ -1,5 +1,10 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.lang3.ArrayUtils;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
@@ -16,18 +21,12 @@ import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon;
-
-import java.util.ArrayList;
-import java.util.List;
-
import net.minecraft.block.Block;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;
-import org.apache.commons.lang3.ArrayUtils;
-
public class GregtechMetaTileEntity_IndustrialCentrifuge
extends GregtechMeta_MultiBlockBase {
private static boolean controller;
@@ -38,18 +37,18 @@ extends GregtechMeta_MultiBlockBase {
private static CustomIcon GT9_5 = new CustomIcon("iconsets/LARGECENTRIFUGE5");
//public static double recipesComplete = 0;
- public GregtechMetaTileEntity_IndustrialCentrifuge(int aID, String aName, String aNameRegional) {
+ public GregtechMetaTileEntity_IndustrialCentrifuge(final int aID, final String aName, final String aNameRegional) {
super(aID, aName, aNameRegional);
- frontFaceActive = new GT_RenderedTexture(GT9_5_Active);
- frontFace = new GT_RenderedTexture(GT9_5);
+ frontFaceActive = new GT_RenderedTexture(GT9_5_Active);
+ frontFace = new GT_RenderedTexture(GT9_5);
}
- public GregtechMetaTileEntity_IndustrialCentrifuge(String aName) {
+ public GregtechMetaTileEntity_IndustrialCentrifuge(final String aName) {
super(aName);
}
@Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
return new GregtechMetaTileEntity_IndustrialCentrifuge(this.mName);
}
@@ -57,7 +56,7 @@ extends GregtechMeta_MultiBlockBase {
public String[] getDescription() {
return new String[]{
"Controller Block for the Industrial Centrifuge",
- "Size: 3x3x3 (Hollow)",
+ "Size: 3x3x3 (Hollow)",
"Controller (Front Center) [Orange]",
"1x Maintenance Hatch (Rear Center) [Green]",
"The rest can be placed anywhere except the Front [Red]",
@@ -73,14 +72,14 @@ extends GregtechMeta_MultiBlockBase {
@Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? frontFaceActive : frontFace : Textures.BlockIcons.CASING_BLOCKS[57]};
}
@Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "IndustrialCentrifuge.png");
+ public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "IndustrialCentrifuge.png");
}
@Override
@@ -89,38 +88,38 @@ extends GregtechMeta_MultiBlockBase {
}
@Override
- public boolean isFacingValid(byte aFacing) {
+ public boolean isFacingValid(final byte aFacing) {
return aFacing > 1;
}
- ArrayList<ItemStack> tInputList = getStoredInputs();
+ ArrayList<ItemStack> tInputList = this.getStoredInputs();
GT_Recipe mLastRecipe;
@Override
- public boolean checkRecipe(ItemStack aStack) {
+ public boolean checkRecipe(final ItemStack aStack) {
/*if (!isCorrectMachinePart(mInventory[1])) {
return false;
}*/
Utils.LOG_WARNING("Centrifuge Debug - 1");
- GT_Recipe.GT_Recipe_Map map = getRecipeMap();
+ final GT_Recipe.GT_Recipe_Map map = this.getRecipeMap();
if (map == null) {
Utils.LOG_WARNING("Centrifuge Debug - False - No recipe map");
return false;
}
Utils.LOG_WARNING("Centrifuge Debug - 2");
- ArrayList<ItemStack> tInputList = getStoredInputs();
- long tVoltage = getMaxInputVoltage();
- byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
+ final ArrayList<ItemStack> tInputList = this.getStoredInputs();
+ final long tVoltage = this.getMaxInputVoltage();
+ final byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
Utils.LOG_WARNING("Centrifuge Debug - Tier variable: "+tTier);
- ItemStack[] tInputs = (ItemStack[]) tInputList.toArray(new ItemStack[tInputList.size()]);
- ArrayList<FluidStack> tFluidList = getStoredFluids();
- FluidStack[] tFluids = (FluidStack[]) tFluidList.toArray(new FluidStack[tFluidList.size()]);
- if (tInputList.size() > 0 || tFluids.length > 0) {
- GT_Recipe tRecipe = map.findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs);
+ final ItemStack[] tInputs = tInputList.toArray(new ItemStack[tInputList.size()]);
+ final ArrayList<FluidStack> tFluidList = this.getStoredFluids();
+ final FluidStack[] tFluids = tFluidList.toArray(new FluidStack[tFluidList.size()]);
+ if ((tInputList.size() > 0) || (tFluids.length > 0)) {
+ final GT_Recipe tRecipe = map.findRecipe(this.getBaseMetaTileEntity(), this.mLastRecipe, false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs);
if (tRecipe != null) {
Utils.LOG_WARNING("Recipe was not invalid");
- mLastRecipe = tRecipe;
+ this.mLastRecipe = tRecipe;
this.mEUt = 0;
this.mOutputItems = null;
this.mOutputFluids = null;
@@ -131,13 +130,13 @@ extends GregtechMeta_MultiBlockBase {
}
this.mMaxProgresstime = tRecipe.mDuration;
- this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
+ this.mEfficiency = (10000 - ((this.getIdealStatus() - this.getRepairStatus()) * 1000));
this.mEfficiencyIncrease = 10000;
Utils.LOG_WARNING("Centrifuge Debug - 2 - Max Progress Time: "+this.mMaxProgresstime);
if (tRecipe.mEUt <= 16) {
Utils.LOG_WARNING("Centrifuge Debug - Using < 16eu/t");
- this.mEUt = (tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1));
- this.mMaxProgresstime = (tRecipe.mDuration / (1 << tTier - 1));
+ this.mEUt = (tRecipe.mEUt * (1 << (tTier - 1)) * (1 << (tTier - 1)));
+ this.mMaxProgresstime = (tRecipe.mDuration / (1 << (tTier - 1)));
Utils.LOG_WARNING("Centrifuge Debug - 3.1 - Max Progress Time: "+this.mMaxProgresstime+" EU/t"+this.mEUt + " Obscure GT Value "+gregtech.api.enums.GT_Values.V[(tTier - 1)]);
} else {
Utils.LOG_WARNING("Centrifuge Debug - using > 16eu/t");
@@ -161,17 +160,20 @@ extends GregtechMeta_MultiBlockBase {
tOut[h].stackSize = 0;
}
FluidStack tFOut = null;
- if (tRecipe.getFluidOutput(0) != null) tFOut = tRecipe.getFluidOutput(0).copy();
+ if (tRecipe.getFluidOutput(0) != null) {
+ tFOut = tRecipe.getFluidOutput(0).copy();
+ }
for (int f = 0; f < tOut.length; f++) {
- if (tRecipe.mOutputs[f] != null && tOut[f] != null) {
+ if ((tRecipe.mOutputs[f] != null) && (tOut[f] != null)) {
for (int g = 0; g < 1; g++) {
- if (getBaseMetaTileEntity().getRandomNumber(10000) < tRecipe.getOutputChance(f))
+ if (this.getBaseMetaTileEntity().getRandomNumber(10000) < tRecipe.getOutputChance(f)) {
tOut[f].stackSize += tRecipe.mOutputs[f].stackSize;
+ }
}
}
}
if (tFOut != null) {
- int tSize = tFOut.amount;
+ final int tSize = tFOut.amount;
tFOut.amount = tSize * 6;
}
this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
@@ -180,11 +182,11 @@ extends GregtechMeta_MultiBlockBase {
this.mMaxProgresstime++;
}
Utils.LOG_WARNING("Centrifuge Debug - 6 - Max Progress Time: "+this.mMaxProgresstime+" EU/t"+this.mEUt);
- List<ItemStack> overStacks = new ArrayList<ItemStack>();
+ final List<ItemStack> overStacks = new ArrayList<>();
for (int f = 0; f < tOut.length; f++) {
if (tOut[f].getMaxStackSize() < tOut[f].stackSize) {
while (tOut[f].getMaxStackSize() < tOut[f].stackSize) {
- ItemStack tmp = tOut[f].copy();
+ final ItemStack tmp = tOut[f].copy();
tmp.stackSize = tmp.getMaxStackSize();
tOut[f].stackSize = tOut[f].stackSize - tOut[f].getMaxStackSize();
overStacks.add(tmp);
@@ -196,14 +198,16 @@ extends GregtechMeta_MultiBlockBase {
tmp = overStacks.toArray(tmp);
tOut = ArrayUtils.addAll(tOut, tmp);
}
- List<ItemStack> tSList = new ArrayList<ItemStack>();
- for (ItemStack tS : tOut) {
- if (tS.stackSize > 0) tSList.add(tS);
+ final List<ItemStack> tSList = new ArrayList<>();
+ for (final ItemStack tS : tOut) {
+ if (tS.stackSize > 0) {
+ tSList.add(tS);
+ }
}
tOut = tSList.toArray(new ItemStack[tSList.size()]);
this.mOutputItems = tOut;
this.mOutputFluids = new FluidStack[]{tFOut};
- updateSlots();
+ this.updateSlots();
Utils.LOG_WARNING("Centrifuge: True");
return true;
}
@@ -228,7 +232,7 @@ extends GregtechMeta_MultiBlockBase {
}
@Override
- public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
+ public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
/*if (configSwitches.disableCentrifugeFormation){
EntityPlayerMP player = MinecraftServer.getServer().getConfigurationManager().func_152612_a(this.getBaseMetaTileEntity().getOwnerName());
if (!player.getEntityWorld().isRemote && isDisabled == false)
@@ -236,9 +240,9 @@ extends GregtechMeta_MultiBlockBase {
isDisabled = true;
return false;
}*/
- int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
- int yDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetY;
- int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
+ final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
+ final int yDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetY;
+ final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
//Utils.LOG_WARNING("X:"+xDir+" Y:"+yDir+" Z:"+zDir);
if (!aBaseMetaTileEntity.getAirOffset(xDir, 0, zDir)) {
return false;
@@ -247,23 +251,23 @@ extends GregtechMeta_MultiBlockBase {
for (int i = -1; i < 2; i++) { //X-Dir
for (int j = -1; j < 2; j++) { //Z-Dir
for (int h = -1; h < 2; h++) { //Y-Dir
- if ((h != 0) || (((xDir + i != 0) || (zDir + j != 0)) && ((i != 0) || (j != 0)))) {
+ if ((h != 0) || ((((xDir + i) != 0) || ((zDir + j) != 0)) && ((i != 0) || (j != 0)))) {
- IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
+ final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
//Utils.LOG_WARNING("X:"+tTileEntity.getXCoord()+" Y:"+tTileEntity.getYCoord()+" Z:"+tTileEntity.getZCoord());
- if ((!addMaintenanceToMachineList(tTileEntity, 57)) && (!addInputToMachineList(tTileEntity, 57)) && (!addOutputToMachineList(tTileEntity, 57)) && (!addEnergyInputToMachineList(tTileEntity, 57))) {
+ if ((!this.addMaintenanceToMachineList(tTileEntity, 57)) && (!this.addInputToMachineList(tTileEntity, 57)) && (!this.addOutputToMachineList(tTileEntity, 57)) && (!this.addEnergyInputToMachineList(tTileEntity, 57))) {
//Maintenance Hatch
if ((tTileEntity != null) && (tTileEntity.getMetaTileEntity() != null)) {
- if (tTileEntity.getXCoord() == aBaseMetaTileEntity.getXCoord() && tTileEntity.getYCoord() == aBaseMetaTileEntity.getYCoord() && tTileEntity.getZCoord() == (aBaseMetaTileEntity.getZCoord()+2)) {
+ if ((tTileEntity.getXCoord() == aBaseMetaTileEntity.getXCoord()) && (tTileEntity.getYCoord() == aBaseMetaTileEntity.getYCoord()) && (tTileEntity.getZCoord() == (aBaseMetaTileEntity.getZCoord()+2))) {
if ((tTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Maintenance)) {
Utils.LOG_WARNING("MAINT HATCH IN CORRECT PLACE");
this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) tTileEntity.getMetaTileEntity());
- ((GT_MetaTileEntity_Hatch) tTileEntity.getMetaTileEntity()).mMachineBlock = getCasingTextureIndex();
+ ((GT_MetaTileEntity_Hatch) tTileEntity.getMetaTileEntity()).mMachineBlock = this.getCasingTextureIndex();
} else {
return false;
}
- }
+ }
else {
Utils.LOG_WARNING("MAINT HATCH IN WRONG PLACE");
}
@@ -281,25 +285,25 @@ extends GregtechMeta_MultiBlockBase {
}
}
}
- }
+ }
return tAmount >= 16;
}
@SuppressWarnings("static-method")
- public boolean ignoreController(Block tTileEntity) {
- if (!controller && tTileEntity == GregTech_API.sBlockMachines) {
+ public boolean ignoreController(final Block tTileEntity) {
+ if (!controller && (tTileEntity == GregTech_API.sBlockMachines)) {
return true;
}
return false;
}
@Override
- public int getMaxEfficiency(ItemStack aStack) {
+ public int getMaxEfficiency(final ItemStack aStack) {
return 10000;
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
+ public int getPollutionPerTick(final ItemStack aStack) {
return 0;
}
@@ -309,7 +313,7 @@ extends GregtechMeta_MultiBlockBase {
}
@Override
- public boolean explodesOnComponentBreak(ItemStack aStack) {
+ public boolean explodesOnComponentBreak(final ItemStack aStack) {
return false;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCokeOven.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCokeOven.java
index 5aa49c8395..08f186b992 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCokeOven.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCokeOven.java
@@ -1,6 +1,10 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi;
import static gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks.GTID;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -12,145 +16,143 @@ import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;
public class GregtechMetaTileEntity_IndustrialCokeOven
- extends GregtechMeta_MultiBlockBase {
- private int mLevel = 0;
+extends GregtechMeta_MultiBlockBase {
+ private int mLevel = 0;
- public GregtechMetaTileEntity_IndustrialCokeOven(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional);
- }
+ public GregtechMetaTileEntity_IndustrialCokeOven(final int aID, final String aName, final String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
- public GregtechMetaTileEntity_IndustrialCokeOven(String aName) {
- super(aName);
- }
+ public GregtechMetaTileEntity_IndustrialCokeOven(final String aName) {
+ super(aName);
+ }
- @Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GregtechMetaTileEntity_IndustrialCokeOven(this.mName);
- }
+ @Override
+ public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntity_IndustrialCokeOven(this.mName);
+ }
- @Override
+ @Override
public String[] getDescription() {
- return new String[]{"Processes Logs and Coal into Charcoal and Coal Coke.",
- "Controller Block for the Industrial Coke Oven",
- "Size: 3x3x3 (Hollow)",
- "Controller (front middle at bottom)",
- "8x Heat Resistant/Proof Coils (middle Layer, hollow)",
- "1x Input (one of bottom)",
- "1x Output (one of bottom)",
- "1x Energy Hatch (one of bottom)",
- "1x Maintenance Hatch (one of bottom)",
- "1x Muffler Hatch (top middle)",
- "Structural Coke Oven Casings for the rest",
- CORE.GT_Tooltip};
- }
+ return new String[]{"Processes Logs and Coal into Charcoal and Coal Coke.",
+ "Controller Block for the Industrial Coke Oven",
+ "Size: 3x3x3 (Hollow)",
+ "Controller (front middle at bottom)",
+ "8x Heat Resistant/Proof Coils (middle Layer, hollow)",
+ "1x Input Hatch (one of bottom)",
+ "1x Output Hatch (one of bottom)",
+ "1x Input Bus (one of bottom)",
+ "1x Output Bus (one of bottom)",
+ "1x Energy Hatch (one of bottom)",
+ "1x Maintenance Hatch (one of bottom)",
+ "1x Muffler Hatch (top middle)",
+ "Structural Coke Oven Casings for the rest",
+ CORE.GT_Tooltip};
+ }
- @Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- if (aSide == aFacing) {
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[GTID+1], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER)};
- }
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[GTID+1]};
- }
+ @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[GTID+1], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER)};
+ }
+ return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[GTID+1]};
+ }
- @Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "CokeOven.png");
- }
+ @Override
+ public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "CokeOven.png");
+ }
- @Override
+ @Override
public GT_Recipe.GT_Recipe_Map getRecipeMap() {
- return Recipe_GT.Gregtech_Recipe_Map.sCokeOvenRecipes;
-
- }
+ return Recipe_GT.Gregtech_Recipe_Map.sCokeOvenRecipes;
+
+ }
- /* @Override
+ /* @Override
public boolean isCorrectMachinePart(ItemStack aStack) {
return true;
}*/
- @Override
- public boolean isFacingValid(byte aFacing) {
- return aFacing > 1;
- }
+ @Override
+ public boolean isFacingValid(final byte aFacing) {
+ return aFacing > 1;
+ }
- @Override
- public boolean checkRecipe(ItemStack aStack) {
- ArrayList<ItemStack> tInputList = getStoredInputs();
- for (int i = 0; i < tInputList.size() - 1; i++) {
- for (int j = i + 1; j < tInputList.size(); j++) {
- if (GT_Utility.areStacksEqual((ItemStack) tInputList.get(i), (ItemStack) tInputList.get(j))) {
- if (((ItemStack) tInputList.get(i)).stackSize >= ((ItemStack) tInputList.get(j)).stackSize) {
- tInputList.remove(j--);
- } else {
- tInputList.remove(i--);
- break;
- }
- }
- }
- }
- ItemStack[] tInputs = (ItemStack[]) Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2);
+ @Override
+ public boolean checkRecipe(final ItemStack aStack) {
+ final ArrayList<ItemStack> tInputList = this.getStoredInputs();
+ for (int i = 0; i < (tInputList.size() - 1); i++) {
+ for (int j = i + 1; j < tInputList.size(); j++) {
+ if (GT_Utility.areStacksEqual(tInputList.get(i), tInputList.get(j))) {
+ if (tInputList.get(i).stackSize >= tInputList.get(j).stackSize) {
+ tInputList.remove(j--);
+ } else {
+ tInputList.remove(i--);
+ break;
+ }
+ }
+ }
+ }
+ final ItemStack[] tInputs = Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2);
- ArrayList<FluidStack> tFluidList = getStoredFluids();
- for (int i = 0; i < tFluidList.size() - 1; i++) {
- for (int j = i + 1; j < tFluidList.size(); j++) {
- if (GT_Utility.areFluidsEqual((FluidStack) tFluidList.get(i), (FluidStack) tFluidList.get(j))) {
- if (((FluidStack) tFluidList.get(i)).amount >= ((FluidStack) tFluidList.get(j)).amount) {
- tFluidList.remove(j--);
- } else {
- tFluidList.remove(i--);
- break;
- }
- }
- }
- }
- FluidStack[] tFluids = (FluidStack[]) Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tInputList.size()]), 0, 1);
-
- int tValidOutputSlots = this.getValidOutputSlots(getRecipeMap(), tInputs);
+ final ArrayList<FluidStack> tFluidList = this.getStoredFluids();
+ for (int i = 0; i < (tFluidList.size() - 1); i++) {
+ for (int j = i + 1; j < tFluidList.size(); j++) {
+ if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) {
+ if (tFluidList.get(i).amount >= tFluidList.get(j).amount) {
+ tFluidList.remove(j--);
+ } else {
+ tFluidList.remove(i--);
+ break;
+ }
+ }
+ }
+ }
+ final FluidStack[] tFluids = Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tInputList.size()]), 0, 1);
+
+ final int tValidOutputSlots = this.getValidOutputSlots(this.getRecipeMap(), tInputs);
Utils.LOG_WARNING("Valid Output Slots: "+tValidOutputSlots);
-
+
//More than or one input
- if (tInputList.size() > 0 && tValidOutputSlots >= 1) {
- long tVoltage = getMaxInputVoltage();
- byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
- GT_Recipe tRecipe = Recipe_GT.Gregtech_Recipe_Map.sCokeOvenRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs);
- if ((tRecipe != null) && (this.mLevel >= tRecipe.mSpecialValue) && (tRecipe.isRecipeInputEqual(true, tFluids, tInputs))) {
- this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
- this.mEfficiencyIncrease = 10000;
- if (tRecipe.mEUt <= 16) {
- this.mEUt = (tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1));
- this.mMaxProgresstime = (tRecipe.mDuration / (1 << tTier - 1));
- } else {
- this.mEUt = tRecipe.mEUt;
- this.mMaxProgresstime = tRecipe.mDuration;
- while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
- this.mEUt *= 4;
- this.mMaxProgresstime /= 2;
- }
- }
- if (this.mEUt > 0) {
- this.mEUt = (-this.mEUt);
- }
- this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
- this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0)};
- this.mOutputFluids = new FluidStack[]{tRecipe.getFluidOutput(0)};
- updateSlots();
- //Utils.LOG_INFO("Coke oven: True");
- return true;
- }
- }
- //Utils.LOG_INFO("Coke oven: False");
- return false;
- }
+ if ((tInputList.size() > 0) && (tValidOutputSlots >= 1)) {
+ final long tVoltage = this.getMaxInputVoltage();
+ final byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
+ final GT_Recipe tRecipe = Recipe_GT.Gregtech_Recipe_Map.sCokeOvenRecipes.findRecipe(this.getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs);
+ if ((tRecipe != null) && (this.mLevel >= tRecipe.mSpecialValue) && (tRecipe.isRecipeInputEqual(true, tFluids, tInputs))) {
+ this.mEfficiency = (10000 - ((this.getIdealStatus() - this.getRepairStatus()) * 1000));
+ this.mEfficiencyIncrease = 10000;
+ if (tRecipe.mEUt <= 16) {
+ this.mEUt = (tRecipe.mEUt * (1 << (tTier - 1)) * (1 << (tTier - 1)));
+ this.mMaxProgresstime = (tRecipe.mDuration / (1 << (tTier - 1)));
+ } else {
+ this.mEUt = tRecipe.mEUt;
+ this.mMaxProgresstime = tRecipe.mDuration;
+ while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
+ this.mEUt *= 4;
+ this.mMaxProgresstime /= 2;
+ }
+ }
+ if (this.mEUt > 0) {
+ this.mEUt = (-this.mEUt);
+ }
+ this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
+ this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0)};
+ this.mOutputFluids = new FluidStack[]{tRecipe.getFluidOutput(0)};
+ this.updateSlots();
+ //Utils.LOG_INFO("Coke oven: True");
+ return true;
+ }
+ }
+ //Utils.LOG_INFO("Coke oven: False");
+ return false;
+ }
/*public boolean checkRecipe(ItemStack aStack) {
ArrayList<ItemStack> tInputList = getStoredInputs();
if (!tInputList.isEmpty()) {
@@ -176,101 +178,101 @@ public class GregtechMetaTileEntity_IndustrialCokeOven
return false;
}*/
- @Override
- public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
- int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
- int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
- int xr = aBaseMetaTileEntity.getXCoord();
- int yr = aBaseMetaTileEntity.getYCoord();
- int zr = aBaseMetaTileEntity.getZCoord();
- this.mLevel = 0;
- if (!aBaseMetaTileEntity.getAirOffset(xDir, 1, zDir)) {
- return false;
- }
- addMufflerToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, 2, zDir), GTID+1);
+ @Override
+ public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
+ final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
+ final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
+ int xr = aBaseMetaTileEntity.getXCoord();
+ int yr = aBaseMetaTileEntity.getYCoord();
+ int zr = aBaseMetaTileEntity.getZCoord();
+ this.mLevel = 0;
+ if (!aBaseMetaTileEntity.getAirOffset(xDir, 1, zDir)) {
+ return false;
+ }
+ this.addMufflerToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, 2, zDir), GTID+1);
- byte tUsedMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + 1, 1, zDir);
- switch (tUsedMeta) {
- case 2:
- this.mLevel = 1;
- break;
- case 3:
- this.mLevel = 2;
- break;
- default:
- return false;
- }
- this.mOutputItems = new ItemStack[12 * this.mLevel];
- for (int i = -1; i < 2; i++) {
- for (int j = -1; j < 2; j++) {
- if ((i != 0) || (j != 0)) {
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 1, zDir + j) != ModBlocks.blockCasingsMisc) {
- return false;
- }
- if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 1, zDir + j) != tUsedMeta) {
- return false;
- }
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 2, zDir + j) != ModBlocks.blockCasingsMisc) {
- return false;
- }
- if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 2, zDir + j) != 1) {
- return false;
- }
- }
- }
- }
- for (int i = -1; i < 2; i++) {
- xr = aBaseMetaTileEntity.getXCoord();
- yr = aBaseMetaTileEntity.getYCoord();
- zr = aBaseMetaTileEntity.getZCoord();
- //Utils.LOG_WARNING("STEP 1 - x ["+xr+"] y ["+yr+"] z ["+zr+"]");
- for (int j = -1; j < 2; j++) {
- xr = aBaseMetaTileEntity.getXCoord();
- yr = aBaseMetaTileEntity.getYCoord();
- zr = aBaseMetaTileEntity.getZCoord();
- //Utils.LOG_WARNING("STEP 2 - x ["+xr+"] y ["+yr+"] z ["+zr+"]");
- if ((xDir + i != 0) || (zDir + j != 0)) {
- xr = aBaseMetaTileEntity.getXCoord();
- yr = aBaseMetaTileEntity.getYCoord();
- zr = aBaseMetaTileEntity.getZCoord();
- //Utils.LOG_WARNING("STEP 3 - x ["+xr+"] y ["+yr+"] z ["+zr+"]");
- IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 0, zDir + j);
- if ((!addMaintenanceToMachineList(tTileEntity, GTID+1)) && (!addInputToMachineList(tTileEntity, GTID+1)) && (!addOutputToMachineList(tTileEntity, GTID+1)) && (!addEnergyInputToMachineList(tTileEntity, GTID+1))) {
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 0, zDir + j) != ModBlocks.blockCasingsMisc) {
- return false;
- }
- if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 0, zDir + j) != 1) {
- return false;
- }
- }
- }
- }
- }
- return true;
- }
+ final byte tUsedMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + 1, 1, zDir);
+ switch (tUsedMeta) {
+ case 2:
+ this.mLevel = 1;
+ break;
+ case 3:
+ this.mLevel = 2;
+ break;
+ default:
+ return false;
+ }
+ this.mOutputItems = new ItemStack[12 * this.mLevel];
+ for (int i = -1; i < 2; i++) {
+ for (int j = -1; j < 2; j++) {
+ if ((i != 0) || (j != 0)) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 1, zDir + j) != ModBlocks.blockCasingsMisc) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 1, zDir + j) != tUsedMeta) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 2, zDir + j) != ModBlocks.blockCasingsMisc) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 2, zDir + j) != 1) {
+ return false;
+ }
+ }
+ }
+ }
+ for (int i = -1; i < 2; i++) {
+ xr = aBaseMetaTileEntity.getXCoord();
+ yr = aBaseMetaTileEntity.getYCoord();
+ zr = aBaseMetaTileEntity.getZCoord();
+ //Utils.LOG_WARNING("STEP 1 - x ["+xr+"] y ["+yr+"] z ["+zr+"]");
+ for (int j = -1; j < 2; j++) {
+ xr = aBaseMetaTileEntity.getXCoord();
+ yr = aBaseMetaTileEntity.getYCoord();
+ zr = aBaseMetaTileEntity.getZCoord();
+ //Utils.LOG_WARNING("STEP 2 - x ["+xr+"] y ["+yr+"] z ["+zr+"]");
+ if (((xDir + i) != 0) || ((zDir + j) != 0)) {
+ xr = aBaseMetaTileEntity.getXCoord();
+ yr = aBaseMetaTileEntity.getYCoord();
+ zr = aBaseMetaTileEntity.getZCoord();
+ //Utils.LOG_WARNING("STEP 3 - x ["+xr+"] y ["+yr+"] z ["+zr+"]");
+ final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 0, zDir + j);
+ if ((!this.addMaintenanceToMachineList(tTileEntity, GTID+1)) && (!this.addInputToMachineList(tTileEntity, GTID+1)) && (!this.addOutputToMachineList(tTileEntity, GTID+1)) && (!this.addEnergyInputToMachineList(tTileEntity, GTID+1))) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 0, zDir + j) != ModBlocks.blockCasingsMisc) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 0, zDir + j) != 1) {
+ return false;
+ }
+ }
+ }
+ }
+ }
+ return true;
+ }
- @Override
- public int getMaxEfficiency(ItemStack aStack) {
- return 10000;
- }
+ @Override
+ public int getMaxEfficiency(final ItemStack aStack) {
+ return 10000;
+ }
- @Override
- public int getPollutionPerTick(ItemStack aStack) {
- return 0;
- }
+ @Override
+ public int getPollutionPerTick(final ItemStack aStack) {
+ return 0;
+ }
- /* @Override
+ /* @Override
public int getDamageToComponent(ItemStack aStack) {
return 0;
}*/
- @Override
+ @Override
public int getAmountOfOutputs() {
- return 24;
- }
+ return 24;
+ }
- @Override
- public boolean explodesOnComponentBreak(ItemStack aStack) {
- return false;
- }
+ @Override
+ public boolean explodesOnComponentBreak(final ItemStack aStack) {
+ return false;
+ }
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialElectrolyzer.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialElectrolyzer.java
index 81e2feea5c..70e0e9546e 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialElectrolyzer.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialElectrolyzer.java
@@ -1,6 +1,11 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi;
import static gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks.GTID;
+
+import java.util.*;
+
+import org.apache.commons.lang3.ArrayUtils;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
@@ -14,29 +19,24 @@ import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
-
-import java.util.*;
-
import net.minecraft.block.Block;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;
-import org.apache.commons.lang3.ArrayUtils;
-
public class GregtechMetaTileEntity_IndustrialElectrolyzer
extends GregtechMeta_MultiBlockBase {
- public GregtechMetaTileEntity_IndustrialElectrolyzer(int aID, String aName, String aNameRegional) {
+ public GregtechMetaTileEntity_IndustrialElectrolyzer(final int aID, final String aName, final String aNameRegional) {
super(aID, aName, aNameRegional);
}
- public GregtechMetaTileEntity_IndustrialElectrolyzer(String aName) {
+ public GregtechMetaTileEntity_IndustrialElectrolyzer(final String aName) {
super(aName);
}
@Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
return new GregtechMetaTileEntity_IndustrialElectrolyzer(this.mName);
}
@@ -57,7 +57,7 @@ extends GregtechMeta_MultiBlockBase {
}
@Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
+ 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[GTID+5], new GT_RenderedTexture(aActive ? Textures.BlockIcons.STEAM_TURBINE_SIDE_ACTIVE : Textures.BlockIcons.STEAM_TURBINE_SIDE)};
}
@@ -65,8 +65,8 @@ extends GregtechMeta_MultiBlockBase {
}
@Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "IndustrialElectrolyzer.png");
+ public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "IndustrialElectrolyzer.png");
}
@Override
@@ -75,97 +75,100 @@ extends GregtechMeta_MultiBlockBase {
}
@Override
- public boolean isFacingValid(byte aFacing) {
+ public boolean isFacingValid(final byte aFacing) {
return aFacing > 1;
}
-
- ArrayList<ItemStack> tInputList = getStoredInputs();
+
+ ArrayList<ItemStack> tInputList = this.getStoredInputs();
GT_Recipe mLastRecipe;
@Override
- public boolean checkRecipe(ItemStack aStack) { //TODO - Add Check to make sure Fluid output isn't full
- ArrayList<ItemStack> tInputList = getStoredInputs();
- for (int i = 0; i < tInputList.size() - 1; i++) {
- for (int j = i + 1; j < tInputList.size(); j++) {
- if (GT_Utility.areStacksEqual((ItemStack) tInputList.get(i), (ItemStack) tInputList.get(j))) {
- if (((ItemStack) tInputList.get(i)).stackSize >= ((ItemStack) tInputList.get(j)).stackSize) {
- tInputList.remove(j--);
- } else {
- tInputList.remove(i--);
- break;
- }
- }
- }
- }
- ItemStack[] tInputs = (ItemStack[]) Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2);
-
- ArrayList<FluidStack> tFluidList = getStoredFluids();
- for (int i = 0; i < tFluidList.size() - 1; i++) {
- for (int j = i + 1; j < tFluidList.size(); j++) {
- if (GT_Utility.areFluidsEqual((FluidStack) tFluidList.get(i), (FluidStack) tFluidList.get(j))) {
- if (((FluidStack) tFluidList.get(i)).amount >= ((FluidStack) tFluidList.get(j)).amount) {
- tFluidList.remove(j--);
- } else {
- tFluidList.remove(i--);
- break;
- }
- }
- }
- }
- FluidStack[] tFluids = (FluidStack[]) Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tInputList.size()]), 0, 1);
-
- int tValidOutputSlots = this.getValidOutputSlots(getRecipeMap(), tInputs);
+ public boolean checkRecipe(final ItemStack aStack) { //TODO - Add Check to make sure Fluid output isn't full
+ final ArrayList<ItemStack> tInputList = this.getStoredInputs();
+ for (int i = 0; i < (tInputList.size() - 1); i++) {
+ for (int j = i + 1; j < tInputList.size(); j++) {
+ if (GT_Utility.areStacksEqual(tInputList.get(i), tInputList.get(j))) {
+ if (tInputList.get(i).stackSize >= tInputList.get(j).stackSize) {
+ tInputList.remove(j--);
+ } else {
+ tInputList.remove(i--);
+ break;
+ }
+ }
+ }
+ }
+ final ItemStack[] tInputs = Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2);
+
+ final ArrayList<FluidStack> tFluidList = this.getStoredFluids();
+ for (int i = 0; i < (tFluidList.size() - 1); i++) {
+ for (int j = i + 1; j < tFluidList.size(); j++) {
+ if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) {
+ if (tFluidList.get(i).amount >= tFluidList.get(j).amount) {
+ tFluidList.remove(j--);
+ } else {
+ tFluidList.remove(i--);
+ break;
+ }
+ }
+ }
+ }
+ final FluidStack[] tFluids = Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tInputList.size()]), 0, 1);
+
+ final int tValidOutputSlots = this.getValidOutputSlots(this.getRecipeMap(), tInputs);
Utils.LOG_WARNING("Valid Output Slots: "+tValidOutputSlots);
-
+
//More than or one input
- if (tInputList.size() > 0 && tValidOutputSlots >= 1) {
- long tVoltage = getMaxInputVoltage();
- byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs);
- if ((tRecipe != null) && (7500 >= tRecipe.mSpecialValue) && (tRecipe.isRecipeInputEqual(true, tFluids, tInputs))) {
- this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
- this.mEfficiencyIncrease = 10000;
- if (tRecipe.mEUt <= 16) {
- this.mEUt = (tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1));
- this.mMaxProgresstime = (tRecipe.mDuration / (1 << tTier - 1));
- } else {
- this.mEUt = tRecipe.mEUt;
- this.mMaxProgresstime = tRecipe.mDuration;
- while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
- this.mEUt *= 4;
- this.mMaxProgresstime /= 2;
- }
- }
- if (this.mEUt > 0) {
- this.mEUt = (-this.mEUt);
- }
- this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
-
- ItemStack[] tOut = new ItemStack[tRecipe.mOutputs.length];
+ if ((tInputList.size() > 0) && (tValidOutputSlots >= 1)) {
+ final long tVoltage = this.getMaxInputVoltage();
+ final byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
+ final GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes.findRecipe(this.getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs);
+ if ((tRecipe != null) && (7500 >= tRecipe.mSpecialValue) && (tRecipe.isRecipeInputEqual(true, tFluids, tInputs))) {
+ this.mEfficiency = (10000 - ((this.getIdealStatus() - this.getRepairStatus()) * 1000));
+ this.mEfficiencyIncrease = 10000;
+ if (tRecipe.mEUt <= 16) {
+ this.mEUt = (tRecipe.mEUt * (1 << (tTier - 1)) * (1 << (tTier - 1)));
+ this.mMaxProgresstime = (tRecipe.mDuration / (1 << (tTier - 1)));
+ } else {
+ this.mEUt = tRecipe.mEUt;
+ this.mMaxProgresstime = tRecipe.mDuration;
+ while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
+ this.mEUt *= 4;
+ this.mMaxProgresstime /= 2;
+ }
+ }
+ if (this.mEUt > 0) {
+ this.mEUt = (-this.mEUt);
+ }
+ this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
+
+ ItemStack[] tOut = new ItemStack[tRecipe.mOutputs.length];
for (int h = 0; h < tRecipe.mOutputs.length; h++) {
tOut[h] = tRecipe.getOutput(h).copy();
tOut[h].stackSize = 0;
}
- FluidStack tFOut = null;
- if (tRecipe.getFluidOutput(0) != null) tFOut = tRecipe.getFluidOutput(0).copy();
+ FluidStack tFOut = null;
+ if (tRecipe.getFluidOutput(0) != null) {
+ tFOut = tRecipe.getFluidOutput(0).copy();
+ }
for (int f = 0; f < tOut.length; f++) {
- if (tRecipe.mOutputs[f] != null && tOut[f] != null) {
+ if ((tRecipe.mOutputs[f] != null) && (tOut[f] != null)) {
for (int g = 0; g < 1; g++) {
- if (getBaseMetaTileEntity().getRandomNumber(10000) < tRecipe.getOutputChance(f))
+ if (this.getBaseMetaTileEntity().getRandomNumber(10000) < tRecipe.getOutputChance(f)) {
tOut[f].stackSize += tRecipe.mOutputs[f].stackSize;
+ }
}
}
}
if (tFOut != null) {
- int tSize = tFOut.amount;
+ final int tSize = tFOut.amount;
tFOut.amount = tSize * 1;
}
-
- List<ItemStack> overStacks = new ArrayList<ItemStack>();
+
+ final List<ItemStack> overStacks = new ArrayList<>();
for (int f = 0; f < tOut.length; f++) {
if (tOut[f].getMaxStackSize() < tOut[f].stackSize) {
while (tOut[f].getMaxStackSize() < tOut[f].stackSize) {
- ItemStack tmp = tOut[f].copy();
+ final ItemStack tmp = tOut[f].copy();
tmp.stackSize = tmp.getMaxStackSize();
tOut[f].stackSize = tOut[f].stackSize - tOut[f].getMaxStackSize();
overStacks.add(tmp);
@@ -177,66 +180,68 @@ extends GregtechMeta_MultiBlockBase {
tmp = overStacks.toArray(tmp);
tOut = ArrayUtils.addAll(tOut, tmp);
}
- List<ItemStack> tSList = new ArrayList<ItemStack>();
- for (ItemStack tS : tOut) {
- if (tS.stackSize > 0) tSList.add(tS);
+ final List<ItemStack> tSList = new ArrayList<>();
+ for (final ItemStack tS : tOut) {
+ if (tS.stackSize > 0) {
+ tSList.add(tS);
+ }
}
tOut = tSList.toArray(new ItemStack[tSList.size()]);
this.mOutputItems = tOut;
this.mOutputFluids = new FluidStack[]{tFOut};
- updateSlots();
-
- /* this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0), tRecipe.getOutput(1)};
+ this.updateSlots();
+
+ /* this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0), tRecipe.getOutput(1)};
updateSlots();*/
- return true;
- }
- }
- return false;
- }
+ return true;
+ }
+ }
+ return false;
+ }
@Override
- public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {
- super.startSoundLoop(aIndex, aX, aY, aZ);
- if (aIndex == 20) {
- GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(5)), 10, 1.0F, aX, aY, aZ);
- }
- }
+ public void startSoundLoop(final byte aIndex, final double aX, final double aY, final double aZ) {
+ super.startSoundLoop(aIndex, aX, aY, aZ);
+ if (aIndex == 20) {
+ GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(Integer.valueOf(5)), 10, 1.0F, aX, aY, aZ);
+ }
+ }
@Override
- public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
- int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
- int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
- if (!aBaseMetaTileEntity.getAirOffset(xDir, 0, zDir)) {
- return false;
- }
- int tAmount = 0;
- for (int i = -1; i < 2; i++) {
- for (int j = -1; j < 2; 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 ((!addMaintenanceToMachineList(tTileEntity, 62)) && (!addMufflerToMachineList(tTileEntity, 62)) && (!addInputToMachineList(tTileEntity, 62)) && (!addOutputToMachineList(tTileEntity, 62)) && (!addEnergyInputToMachineList(tTileEntity, 62))) {
- Block tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j);
- byte tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j);
- if (((tBlock != ModBlocks.blockCasingsMisc) || (tMeta != 5))) {
- return false;
- }
- tAmount++;
- }
- }
- }
- }
- }
- return tAmount >= 16;
- }
+ public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
+ final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
+ final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
+ if (!aBaseMetaTileEntity.getAirOffset(xDir, 0, zDir)) {
+ return false;
+ }
+ int tAmount = 0;
+ for (int i = -1; i < 2; i++) {
+ for (int j = -1; j < 2; j++) {
+ for (int h = -1; h < 2; h++) {
+ if ((h != 0) || ((((xDir + i) != 0) || ((zDir + j) != 0)) && ((i != 0) || (j != 0)))) {
+ final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
+ if ((!this.addMaintenanceToMachineList(tTileEntity, 62)) && (!this.addMufflerToMachineList(tTileEntity, 62)) && (!this.addInputToMachineList(tTileEntity, 62)) && (!this.addOutputToMachineList(tTileEntity, 62)) && (!this.addEnergyInputToMachineList(tTileEntity, 62))) {
+ final Block tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j);
+ final byte tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j);
+ if (((tBlock != ModBlocks.blockCasingsMisc) || (tMeta != 5))) {
+ return false;
+ }
+ tAmount++;
+ }
+ }
+ }
+ }
+ }
+ return tAmount >= 16;
+ }
@Override
- public int getMaxEfficiency(ItemStack aStack) {
+ public int getMaxEfficiency(final ItemStack aStack) {
return 10000;
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
+ public int getPollutionPerTick(final ItemStack aStack) {
return 0;
}
@@ -246,7 +251,7 @@ extends GregtechMeta_MultiBlockBase {
}
@Override
- public boolean explodesOnComponentBreak(ItemStack aStack) {
+ public boolean explodesOnComponentBreak(final ItemStack aStack) {
return false;
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialMacerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialMacerator.java
index 34832d0bc5..497e2979f8 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialMacerator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialMacerator.java
@@ -1,5 +1,7 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi;
+import java.util.*;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
@@ -15,9 +17,6 @@ import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-
-import java.util.*;
-
import net.minecraft.block.Block;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
@@ -27,16 +26,16 @@ public class GregtechMetaTileEntity_IndustrialMacerator
extends GregtechMeta_MultiBlockBase {
private static boolean controller;
- public GregtechMetaTileEntity_IndustrialMacerator(int aID, String aName, String aNameRegional) {
+ public GregtechMetaTileEntity_IndustrialMacerator(final int aID, final String aName, final String aNameRegional) {
super(aID, aName, aNameRegional);
}
- public GregtechMetaTileEntity_IndustrialMacerator(String aName) {
+ public GregtechMetaTileEntity_IndustrialMacerator(final String aName) {
super(aName);
}
@Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
return new GregtechMetaTileEntity_IndustrialMacerator(this.mName);
}
@@ -44,7 +43,7 @@ extends GregtechMeta_MultiBlockBase {
public String[] getDescription() {
return new String[]{
"Controller Block for the Industrial Maceration Stack",
- "Size[WxHxL]: 3x6x3 (Hollow)",
+ "Size[WxHxL]: 3x6x3 (Hollow)",
"Controller (Center Bottom)",
"1x Input Bus (Any bottom layer casing)",
"5x Output Bus (Any casing besides bottom layer)",
@@ -55,7 +54,7 @@ extends GregtechMeta_MultiBlockBase {
}
@Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
+ 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[64], new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_MatterFab_Active : TexturesGtBlock.Overlay_MatterFab)};
}
@@ -63,8 +62,8 @@ extends GregtechMeta_MultiBlockBase {
}
@Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "MacerationStack.png");
+ public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "MacerationStack.png");
}
@Override
@@ -78,41 +77,41 @@ extends GregtechMeta_MultiBlockBase {
}*/
@Override
- public boolean isFacingValid(byte aFacing) {
+ public boolean isFacingValid(final byte aFacing) {
return aFacing > 1;
}
@Override
- public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ public void onPreTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) {
super.onPreTick(aBaseMetaTileEntity, aTick);
if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive()) && (aBaseMetaTileEntity.getFrontFacing() != 1) && (aBaseMetaTileEntity.getCoverIDAtSide((byte) 1) == 0) && (!aBaseMetaTileEntity.getOpacityAtSide((byte) 1))) {
- Random tRandom = aBaseMetaTileEntity.getWorld().rand;
- aBaseMetaTileEntity.getWorld().spawnParticle("smoke", aBaseMetaTileEntity.getXCoord() + 0.8F - tRandom.nextFloat() * 0.6F, aBaseMetaTileEntity.getYCoord() + 0.3f + tRandom.nextFloat() * 0.2F, aBaseMetaTileEntity.getZCoord() + 1.2F - tRandom.nextFloat() * 1.6F, 0.0D, 0.0D, 0.0D);
+ final Random tRandom = aBaseMetaTileEntity.getWorld().rand;
+ aBaseMetaTileEntity.getWorld().spawnParticle("smoke", (aBaseMetaTileEntity.getXCoord() + 0.8F) - (tRandom.nextFloat() * 0.6F), aBaseMetaTileEntity.getYCoord() + 0.3f + (tRandom.nextFloat() * 0.2F), (aBaseMetaTileEntity.getZCoord() + 1.2F) - (tRandom.nextFloat() * 1.6F), 0.0D, 0.0D, 0.0D);
}
}
@Override
- public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {
+ public void startSoundLoop(final byte aIndex, final double aX, final double aY, final double aZ) {
super.startSoundLoop(aIndex, aX, aY, aZ);
if (aIndex == 1) {
- GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(201)), 10, 1.0F, aX, aY, aZ);
+ GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(Integer.valueOf(201)), 10, 1.0F, aX, aY, aZ);
}
}
@Override
public void startProcess() {
- sendLoopStart((byte) 1);
+ this.sendLoopStart((byte) 1);
}
@Override
- public boolean checkRecipe(ItemStack aStack) {
-
+ public boolean checkRecipe(final ItemStack aStack) {
+
//Get inputs.
- ArrayList<ItemStack> tInputList = getStoredInputs();
- for (int i = 0; i < tInputList.size() - 1; i++) {
+ final ArrayList<ItemStack> tInputList = this.getStoredInputs();
+ for (int i = 0; i < (tInputList.size() - 1); i++) {
for (int j = i + 1; j < tInputList.size(); j++) {
- if (GT_Utility.areStacksEqual((ItemStack) tInputList.get(i), (ItemStack) tInputList.get(j))) {
- if (((ItemStack) tInputList.get(i)).stackSize >= ((ItemStack) tInputList.get(j)).stackSize) {
+ if (GT_Utility.areStacksEqual(tInputList.get(i), tInputList.get(j))) {
+ if (tInputList.get(i).stackSize >= tInputList.get(j).stackSize) {
tInputList.remove(j--);
} else {
tInputList.remove(i--);
@@ -121,41 +120,41 @@ extends GregtechMeta_MultiBlockBase {
}
}
}
-
+
//Temp var
- ItemStack[] tInputs = (ItemStack[]) Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2);
+ final ItemStack[] tInputs = Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2);
//Don't check the recipe if someone got around the output bus size check.
if (this.mOutputBusses.size() != 5){
return false;
}
-
+
//Make a recipe instance for the rest of the method.
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sMaceratorRecipes.findRecipe(getBaseMetaTileEntity(), false, 9223372036854775807L, null, tInputs);
-
-
- int tValidOutputSlots = this.getValidOutputSlots(getRecipeMap(), tInputs);
+ final GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sMaceratorRecipes.findRecipe(this.getBaseMetaTileEntity(), false, 9223372036854775807L, null, tInputs);
+
+
+ final int tValidOutputSlots = this.getValidOutputSlots(this.getRecipeMap(), tInputs);
Utils.LOG_WARNING("Valid Output Slots: "+tValidOutputSlots);
-
+
//More than or one input
- if (tInputList.size() > 0 && tValidOutputSlots >= 1) {
+ if ((tInputList.size() > 0) && (tValidOutputSlots >= 1)) {
if ((tRecipe != null) && (tRecipe.isRecipeInputEqual(true, null, tInputs))) {
Utils.LOG_WARNING("Valid Recipe found - size "+tRecipe.mOutputs.length);
- this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
+ this.mEfficiency = (10000 - ((this.getIdealStatus() - this.getRepairStatus()) * 1000));
this.mEfficiencyIncrease = 10000;
this.mEUt = (-tRecipe.mEUt);
this.mMaxProgresstime = Math.max(1, (tRecipe.mDuration/5));
- ItemStack[] outputs = new ItemStack[tRecipe.mOutputs.length];
+ final ItemStack[] outputs = new ItemStack[tRecipe.mOutputs.length];
for (int i = 0; i < tRecipe.mOutputs.length; i++){
if (i==0) {
Utils.LOG_WARNING("Adding the default output");
outputs[0] = tRecipe.getOutput(i);
}
- else if (getBaseMetaTileEntity().getRandomNumber(7500) < tRecipe.getOutputChance(i)){
+ else if (this.getBaseMetaTileEntity().getRandomNumber(7500) < tRecipe.getOutputChance(i)){
Utils.LOG_WARNING("Adding a bonus output");
- outputs[i] = tRecipe.getOutput(i);
+ outputs[i] = tRecipe.getOutput(i);
}
else {
Utils.LOG_WARNING("Adding null output");
@@ -164,8 +163,8 @@ extends GregtechMeta_MultiBlockBase {
}
this.mOutputItems = outputs;
- sendLoopStart((byte) 20);
- updateSlots();
+ this.sendLoopStart((byte) 20);
+ this.updateSlots();
return true;
}
}
@@ -173,9 +172,9 @@ extends GregtechMeta_MultiBlockBase {
}
@Override
- public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
- int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
- int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
+ public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
+ final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
+ final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
if (!aBaseMetaTileEntity.getAirOffset(xDir, 1, zDir)) {
return false;
}
@@ -184,10 +183,10 @@ extends GregtechMeta_MultiBlockBase {
for (int i = -1; i < 2; i++) {
for (int j = -1; j < 2; j++) {
for (int h = 0; h < 6; h++) {
- if (!(i == 0 && j == 0 && (h > 0 && h < 5)))//((h > 0)&&(h<5)) || (((xDir + i != 0) || (zDir + j != 0)) && ((i != 0) || (j != 0)))
+ if (!((i == 0) && (j == 0) && ((h > 0) && (h < 5))))//((h > 0)&&(h<5)) || (((xDir + i != 0) || (zDir + j != 0)) && ((i != 0) || (j != 0)))
{
- IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
- if ((!addMaintenanceToMachineList(tTileEntity, 64)) && (!addInputToMachineList(tTileEntity, 64)) && (!addOutputToMachineList(tTileEntity, 64)) && (!addEnergyInputToMachineList(tTileEntity, 64)) && (!ignoreController(aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j)))) {
+ final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
+ if ((!this.addMaintenanceToMachineList(tTileEntity, 64)) && (!this.addInputToMachineList(tTileEntity, 64)) && (!this.addOutputToMachineList(tTileEntity, 64)) && (!this.addEnergyInputToMachineList(tTileEntity, 64)) && (!this.ignoreController(aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j)))) {
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
Utils.LOG_INFO("Returned False 1");
return false;
@@ -202,18 +201,18 @@ extends GregtechMeta_MultiBlockBase {
}
}
}
- if (this.mOutputHatches.size() != 0 || this.mInputBusses.size() != 1 || this.mOutputBusses.size() != 5) {
+ if ((this.mOutputHatches.size() != 0) || (this.mInputBusses.size() != 1) || (this.mOutputBusses.size() != 5)) {
Utils.LOG_INFO("Returned False 3");
return false;
}
- int height = this.getBaseMetaTileEntity().getYCoord();
+ final int height = this.getBaseMetaTileEntity().getYCoord();
if (this.mInputBusses.get(0).getBaseMetaTileEntity().getYCoord() != height) {
Utils.LOG_INFO("height: "+height+" | Returned False 4");
return false;
}
- GT_MetaTileEntity_Hatch_OutputBus[] tmpHatches = new GT_MetaTileEntity_Hatch_OutputBus[5];
+ final GT_MetaTileEntity_Hatch_OutputBus[] tmpHatches = new GT_MetaTileEntity_Hatch_OutputBus[5];
for (int i = 0; i < this.mOutputBusses.size(); i++) {
- int hatchNumber = this.mOutputBusses.get(i).getBaseMetaTileEntity().getYCoord() - 1 - height;
+ final int hatchNumber = this.mOutputBusses.get(i).getBaseMetaTileEntity().getYCoord() - 1 - height;
if (tmpHatches[hatchNumber] == null) {
tmpHatches[hatchNumber] = this.mOutputBusses.get(i);
} else {
@@ -228,20 +227,20 @@ extends GregtechMeta_MultiBlockBase {
return tAmount >= 26;
}
- public boolean ignoreController(Block tTileEntity) {
- if (!controller && tTileEntity == GregTech_API.sBlockMachines) {
+ public boolean ignoreController(final Block tTileEntity) {
+ if (!controller && (tTileEntity == GregTech_API.sBlockMachines)) {
return true;
}
return false;
}
@Override
- public int getMaxEfficiency(ItemStack aStack) {
+ public int getMaxEfficiency(final ItemStack aStack) {
return 10000;
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
+ public int getPollutionPerTick(final ItemStack aStack) {
return 0;
}
@@ -251,7 +250,7 @@ extends GregtechMeta_MultiBlockBase {
}
@Override
- public boolean explodesOnComponentBreak(ItemStack aStack) {
+ public boolean explodesOnComponentBreak(final ItemStack aStack) {
return false;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialPlatePress.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialPlatePress.java
index 96095698fa..5b56a4357c 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialPlatePress.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialPlatePress.java
@@ -1,6 +1,10 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi;
import static gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks.GTID;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
@@ -14,10 +18,6 @@ import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-
import net.minecraft.block.Block;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
@@ -26,16 +26,16 @@ import net.minecraftforge.fluids.FluidStack;
public class GregtechMetaTileEntity_IndustrialPlatePress
extends GregtechMeta_MultiBlockBase {
- public GregtechMetaTileEntity_IndustrialPlatePress(int aID, String aName, String aNameRegional) {
+ public GregtechMetaTileEntity_IndustrialPlatePress(final int aID, final String aName, final String aNameRegional) {
super(aID, aName, aNameRegional);
}
- public GregtechMetaTileEntity_IndustrialPlatePress(String aName) {
+ public GregtechMetaTileEntity_IndustrialPlatePress(final String aName) {
super(aName);
}
@Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
return new GregtechMetaTileEntity_IndustrialPlatePress(this.mName);
}
@@ -54,7 +54,7 @@ extends GregtechMeta_MultiBlockBase {
}
@Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
+ 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[GTID+4], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER)};
}
@@ -62,8 +62,8 @@ extends GregtechMeta_MultiBlockBase {
}
@Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "MaterialPress.png");
+ public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "MaterialPress.png");
}
@Override
@@ -72,118 +72,118 @@ extends GregtechMeta_MultiBlockBase {
}
@Override
- public boolean isFacingValid(byte aFacing) {
+ public boolean isFacingValid(final byte aFacing) {
return aFacing > 1;
}
- @Override
- public boolean checkRecipe(ItemStack aStack) { //TODO - Add Check to make sure Fluid output isn't full
- ArrayList<ItemStack> tInputList = getStoredInputs();
- for (int i = 0; i < tInputList.size() - 1; i++) {
- for (int j = i + 1; j < tInputList.size(); j++) {
- if (GT_Utility.areStacksEqual((ItemStack) tInputList.get(i), (ItemStack) tInputList.get(j))) {
- if (((ItemStack) tInputList.get(i)).stackSize >= ((ItemStack) tInputList.get(j)).stackSize) {
- tInputList.remove(j--);
- } else {
- tInputList.remove(i--);
- break;
- }
- }
- }
- }
- ItemStack[] tInputs = (ItemStack[]) Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2);
-
- ArrayList<FluidStack> tFluidList = getStoredFluids();
- for (int i = 0; i < tFluidList.size() - 1; i++) {
- for (int j = i + 1; j < tFluidList.size(); j++) {
- if (GT_Utility.areFluidsEqual((FluidStack) tFluidList.get(i), (FluidStack) tFluidList.get(j))) {
- if (((FluidStack) tFluidList.get(i)).amount >= ((FluidStack) tFluidList.get(j)).amount) {
- tFluidList.remove(j--);
- } else {
- tFluidList.remove(i--);
- break;
- }
- }
- }
- }
- FluidStack[] tFluids = (FluidStack[]) Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tInputList.size()]), 0, 1);
-
- int tValidOutputSlots = this.getValidOutputSlots(getRecipeMap(), tInputs);
- Utils.LOG_WARNING("Valid Output Slots: "+tValidOutputSlots);
+ @Override
+ public boolean checkRecipe(final ItemStack aStack) { //TODO - Add Check to make sure Fluid output isn't full
+ final ArrayList<ItemStack> tInputList = this.getStoredInputs();
+ for (int i = 0; i < (tInputList.size() - 1); i++) {
+ for (int j = i + 1; j < tInputList.size(); j++) {
+ if (GT_Utility.areStacksEqual(tInputList.get(i), tInputList.get(j))) {
+ if (tInputList.get(i).stackSize >= tInputList.get(j).stackSize) {
+ tInputList.remove(j--);
+ } else {
+ tInputList.remove(i--);
+ break;
+ }
+ }
+ }
+ }
+ final ItemStack[] tInputs = Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2);
+
+ final ArrayList<FluidStack> tFluidList = this.getStoredFluids();
+ for (int i = 0; i < (tFluidList.size() - 1); i++) {
+ for (int j = i + 1; j < tFluidList.size(); j++) {
+ if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) {
+ if (tFluidList.get(i).amount >= tFluidList.get(j).amount) {
+ tFluidList.remove(j--);
+ } else {
+ tFluidList.remove(i--);
+ break;
+ }
+ }
+ }
+ }
+ final FluidStack[] tFluids = Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tInputList.size()]), 0, 1);
+
+ final int tValidOutputSlots = this.getValidOutputSlots(this.getRecipeMap(), tInputs);
+ Utils.LOG_WARNING("Valid Output Slots: "+tValidOutputSlots);
//More than or one input
- if (tInputList.size() > 0 && tValidOutputSlots >= 1) {
- long tVoltage = getMaxInputVoltage();
- byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sBenderRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs);
- if ((tRecipe != null) && (2500 >= tRecipe.mSpecialValue) && (tRecipe.isRecipeInputEqual(true, tFluids, tInputs))) {
- this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
- this.mEfficiencyIncrease = 10000;
- if (tRecipe.mEUt <= 16) {
- this.mEUt = (tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1));
- this.mMaxProgresstime = (tRecipe.mDuration / (1 << tTier - 1));
- } else {
- this.mEUt = tRecipe.mEUt;
- this.mMaxProgresstime = tRecipe.mDuration;
- while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
- this.mEUt *= 4;
- this.mMaxProgresstime /= 2;
- }
- }
- if (this.mEUt > 0) {
- this.mEUt = (-this.mEUt);
- }
- this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
- this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0), tRecipe.getOutput(1)};
- updateSlots();
- return true;
- }
- }
- return false;
- }
+ if ((tInputList.size() > 0) && (tValidOutputSlots >= 1)) {
+ final long tVoltage = this.getMaxInputVoltage();
+ final byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
+ final GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sBenderRecipes.findRecipe(this.getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs);
+ if ((tRecipe != null) && (2500 >= tRecipe.mSpecialValue) && (tRecipe.isRecipeInputEqual(true, tFluids, tInputs))) {
+ this.mEfficiency = (10000 - ((this.getIdealStatus() - this.getRepairStatus()) * 1000));
+ this.mEfficiencyIncrease = 10000;
+ if (tRecipe.mEUt <= 16) {
+ this.mEUt = (tRecipe.mEUt * (1 << (tTier - 1)) * (1 << (tTier - 1)));
+ this.mMaxProgresstime = (tRecipe.mDuration / (1 << (tTier - 1)));
+ } else {
+ this.mEUt = tRecipe.mEUt;
+ this.mMaxProgresstime = tRecipe.mDuration;
+ while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
+ this.mEUt *= 4;
+ this.mMaxProgresstime /= 2;
+ }
+ }
+ if (this.mEUt > 0) {
+ this.mEUt = (-this.mEUt);
+ }
+ this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
+ this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0), tRecipe.getOutput(1)};
+ this.updateSlots();
+ return true;
+ }
+ }
+ return false;
+ }
@Override
- public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {
- super.startSoundLoop(aIndex, aX, aY, aZ);
- if (aIndex == 20) {
- GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(5)), 10, 1.0F, aX, aY, aZ);
- }
- }
+ public void startSoundLoop(final byte aIndex, final double aX, final double aY, final double aZ) {
+ super.startSoundLoop(aIndex, aX, aY, aZ);
+ if (aIndex == 20) {
+ GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(Integer.valueOf(5)), 10, 1.0F, aX, aY, aZ);
+ }
+ }
@Override
- public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
- int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
- int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
- if (!aBaseMetaTileEntity.getAirOffset(xDir, 0, zDir)) {
- return false;
- }
- int tAmount = 0;
- for (int i = -1; i < 2; i++) {
- for (int j = -1; j < 2; 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 ((!addMaintenanceToMachineList(tTileEntity, 61)) && (!addMufflerToMachineList(tTileEntity, 61)) && (!addInputToMachineList(tTileEntity, 61)) && (!addOutputToMachineList(tTileEntity, 61)) && (!addEnergyInputToMachineList(tTileEntity, 61))) {
- Block tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j);
- byte tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j);
- if (((tBlock != ModBlocks.blockCasingsMisc) || (tMeta != 4))) {
- return false;
- }
- tAmount++;
- }
- }
- }
- }
- }
- return tAmount >= 16;
- }
+ public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
+ final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
+ final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
+ if (!aBaseMetaTileEntity.getAirOffset(xDir, 0, zDir)) {
+ return false;
+ }
+ int tAmount = 0;
+ for (int i = -1; i < 2; i++) {
+ for (int j = -1; j < 2; j++) {
+ for (int h = -1; h < 2; h++) {
+ if ((h != 0) || ((((xDir + i) != 0) || ((zDir + j) != 0)) && ((i != 0) || (j != 0)))) {
+ final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
+ if ((!this.addMaintenanceToMachineList(tTileEntity, 61)) && (!this.addMufflerToMachineList(tTileEntity, 61)) && (!this.addInputToMachineList(tTileEntity, 61)) && (!this.addOutputToMachineList(tTileEntity, 61)) && (!this.addEnergyInputToMachineList(tTileEntity, 61))) {
+ final Block tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j);
+ final byte tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j);
+ if (((tBlock != ModBlocks.blockCasingsMisc) || (tMeta != 4))) {
+ return false;
+ }
+ tAmount++;
+ }
+ }
+ }
+ }
+ }
+ return tAmount >= 16;
+ }
@Override
- public int getMaxEfficiency(ItemStack aStack) {
+ public int getMaxEfficiency(final ItemStack aStack) {
return 10000;
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
+ public int getPollutionPerTick(final ItemStack aStack) {
return 0;
}
@@ -193,7 +193,7 @@ extends GregtechMeta_MultiBlockBase {
}
@Override
- public boolean explodesOnComponentBreak(ItemStack aStack) {
+ public boolean explodesOnComponentBreak(final ItemStack aStack) {
return false;
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialSinter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialSinter.java
index 8f928a9590..4e80445dcc 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialSinter.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialSinter.java
@@ -1,5 +1,7 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi;
+import java.util.ArrayList;
+
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -12,9 +14,6 @@ import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine;
-
-import java.util.ArrayList;
-
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.entity.player.InventoryPlayer;
@@ -22,26 +21,26 @@ import net.minecraft.item.ItemStack;
public class GregtechMetaTileEntity_IndustrialSinter
extends GT_MetaTileEntity_MultiBlockBase {
-
+
RenderBlocks asdasd = RenderBlocks.getInstance();
-
- public GregtechMetaTileEntity_IndustrialSinter(int aID, String aName, String aNameRegional) {
+
+ public GregtechMetaTileEntity_IndustrialSinter(final int aID, final String aName, final String aNameRegional) {
super(aID, aName, aNameRegional);
}
- public GregtechMetaTileEntity_IndustrialSinter(String aName) {
+ public GregtechMetaTileEntity_IndustrialSinter(final String aName) {
super(aName);
}
@Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
return new GregtechMetaTileEntity_IndustrialSinter(this.mName);
}
@Override
public String[] getDescription() {
- return new String[]{
+ return new String[]{
"Controller Block for the Industrial Sinter Furnace",
"Size: 3x5x3 [WxLxH] (Hollow)", "Controller (front centered)",
"2x Input Bus (side centered)",
@@ -54,7 +53,7 @@ extends GT_MetaTileEntity_MultiBlockBase {
}
@Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
+ 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[63], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER)};
}
@@ -62,8 +61,8 @@ extends GT_MetaTileEntity_MultiBlockBase {
}
@Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "WireFactory.png");
+ public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "WireFactory.png");
}
@Override
@@ -72,30 +71,30 @@ extends GT_MetaTileEntity_MultiBlockBase {
}
@Override
- public boolean isCorrectMachinePart(ItemStack aStack) {
+ public boolean isCorrectMachinePart(final ItemStack aStack) {
return true;
}
@Override
- public boolean isFacingValid(byte aFacing) {
+ public boolean isFacingValid(final byte aFacing) {
return aFacing > 1;
}
@Override
- public boolean checkRecipe(ItemStack aStack) {
- ArrayList<ItemStack> tInputList = getStoredInputs();
- for (ItemStack tInput : tInputList) {
- long tVoltage = getMaxInputVoltage();
- byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
+ public boolean checkRecipe(final ItemStack aStack) {
+ final ArrayList<ItemStack> tInputList = this.getStoredInputs();
+ for (final ItemStack tInput : tInputList) {
+ final long tVoltage = this.getMaxInputVoltage();
+ final byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sWiremillRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], null, new ItemStack[]{tInput});
+ final GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sWiremillRecipes.findRecipe(this.getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], null, new ItemStack[]{tInput});
if (tRecipe != null) {
if (tRecipe.isRecipeInputEqual(true, null, new ItemStack[]{tInput})) {
- this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
+ this.mEfficiency = (10000 - ((this.getIdealStatus() - this.getRepairStatus()) * 1000));
this.mEfficiencyIncrease = 10000;
if (tRecipe.mEUt <= 16) {
- this.mEUt = (tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1));
- this.mMaxProgresstime = (tRecipe.mDuration / (1 << tTier - 1));
+ this.mEUt = (tRecipe.mEUt * (1 << (tTier - 1)) * (1 << (tTier - 1)));
+ this.mMaxProgresstime = (tRecipe.mDuration / (1 << (tTier - 1)));
} else {
this.mEUt = tRecipe.mEUt;
this.mMaxProgresstime = tRecipe.mDuration;
@@ -109,7 +108,7 @@ extends GT_MetaTileEntity_MultiBlockBase {
}
this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0)};
- updateSlots();
+ this.updateSlots();
return true;
}
}
@@ -118,22 +117,22 @@ extends GT_MetaTileEntity_MultiBlockBase {
}
@Override
- public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
- int controllerX = aBaseMetaTileEntity.getXCoord();
- int controllerY = aBaseMetaTileEntity.getYCoord();
- int controllerZ = aBaseMetaTileEntity.getZCoord();
+ public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
+ final int controllerX = aBaseMetaTileEntity.getXCoord();
+ final int controllerY = aBaseMetaTileEntity.getYCoord();
+ final int controllerZ = aBaseMetaTileEntity.getZCoord();
- byte tSide = getBaseMetaTileEntity().getBackFacing();
- if ((getBaseMetaTileEntity().getAirAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), 1)) && (getBaseMetaTileEntity().getAirAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), 2) && (getBaseMetaTileEntity().getAirAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), 3)))) {
+ final byte tSide = this.getBaseMetaTileEntity().getBackFacing();
+ if ((this.getBaseMetaTileEntity().getAirAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 1)) && (this.getBaseMetaTileEntity().getAirAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 2) && (this.getBaseMetaTileEntity().getAirAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 3)))) {
int tAirCount = 0;
for (byte i = -1; i < 2; i = (byte) (i + 1)) {
for (byte j = -1; j < 2; j = (byte) (j + 1)) {
for (byte k = -1; k < 2; k = (byte) (k + 1)) {
- if (getBaseMetaTileEntity().getAirOffset(i, j, k)) {
+ if (this.getBaseMetaTileEntity().getAirOffset(i, j, k)) {
Utils.LOG_INFO("Found Air at: "+(controllerX+i)+" "+(controllerY+k)+" "+(controllerZ+k));
//if (aBaseMetaTileEntity.getWorld().isRemote){
- //asdasd.renderStandardBlock(ModBlocks.MatterFabricatorEffectBlock, (controllerX+i), (controllerY+k), (controllerZ+k));
- //UtilsRendering.drawBlockInWorld((controllerX+i), (controllerY+k), (controllerZ+k), Color.YELLOW_GREEN);
+ //asdasd.renderStandardBlock(ModBlocks.MatterFabricatorEffectBlock, (controllerX+i), (controllerY+k), (controllerZ+k));
+ //UtilsRendering.drawBlockInWorld((controllerX+i), (controllerY+k), (controllerZ+k), Color.YELLOW_GREEN);
//}
tAirCount++;
}
@@ -147,16 +146,16 @@ extends GT_MetaTileEntity_MultiBlockBase {
for (byte i = 2; i < 6; i = (byte) (i + 1)) {
//UtilsRendering.drawBlockInWorld((controllerX+i), (controllerY), (controllerZ), Color.LIME_GREEN);
IGregTechTileEntity tTileEntity;
- if ((null != (tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance(i, 2))) &&
- (tTileEntity.getFrontFacing() == getBaseMetaTileEntity().getFrontFacing()) && (tTileEntity.getMetaTileEntity() != null) &&
+ if ((null != (tTileEntity = this.getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance(i, 2))) &&
+ (tTileEntity.getFrontFacing() == this.getBaseMetaTileEntity().getFrontFacing()) && (tTileEntity.getMetaTileEntity() != null) &&
((tTileEntity.getMetaTileEntity() instanceof GregtechMetaTileEntity_IndustrialSinter))) {
//Utils.LOG_INFO("False 1");
return false;
}
}
- int tX = getBaseMetaTileEntity().getXCoord();
- int tY = getBaseMetaTileEntity().getYCoord();
- int tZ = getBaseMetaTileEntity().getZCoord();
+ final int tX = this.getBaseMetaTileEntity().getXCoord();
+ final int tY = this.getBaseMetaTileEntity().getYCoord();
+ final int tZ = this.getBaseMetaTileEntity().getZCoord();
for (byte i = -1; i < 2; i = (byte) (i + 1)) {
for (byte j = -1; j < 2; j = (byte) (j + 1)) {
if ((i != 0) || (j != 0)) {
@@ -164,15 +163,15 @@ extends GT_MetaTileEntity_MultiBlockBase {
//UtilsRendering.drawBlockInWorld((controllerX+i), (controllerY+k), (controllerZ+k), Color.ORANGE);
if (((i == 0) || (j == 0)) && ((k == 1) || (k == 2) || (k == 3))) {
//UtilsRendering.drawBlockInWorld((controllerX+i), (controllerY+k), (controllerZ+k), Color.TOMATO);
- if (getBaseMetaTileEntity().getBlock(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == getCasingBlock() && getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == getCasingMeta()) {
- }
- else if (!addToMachineList(getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i))) && (!addEnergyInputToMachineList(getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i))))) {
+ if ((this.getBaseMetaTileEntity().getBlock(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingBlock()) && (this.getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingMeta())) {
+ }
+ else if (!this.addToMachineList(this.getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i))) && (!this.addEnergyInputToMachineList(this.getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i))))) {
Utils.LOG_INFO("False 2");
return false;
}
- }
- else if (getBaseMetaTileEntity().getBlock(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == getCasingBlock() && getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == getCasingMeta()) {
- }
+ }
+ else if ((this.getBaseMetaTileEntity().getBlock(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingBlock()) && (this.getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingMeta())) {
+ }
else {
Utils.LOG_INFO("False 3");
return false;
@@ -181,26 +180,26 @@ extends GT_MetaTileEntity_MultiBlockBase {
}
}
}
- if (this.mOutputHatches.size() != 0 || this.mInputHatches.size() != 0) {
+ if ((this.mOutputHatches.size() != 0) || (this.mInputHatches.size() != 0)) {
Utils.LOG_INFO("Use Busses, Not Hatches for Input/Output.");
return false;
}
- if (this.mInputBusses.size() != 2 || this.mOutputBusses.size() != 2) {
+ if ((this.mInputBusses.size() != 2) || (this.mOutputBusses.size() != 2)) {
Utils.LOG_INFO("Incorrect amount of Input & Output busses.");
return false;
- }
+ }
this.mMaintenanceHatches.clear();
- IGregTechTileEntity tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), 4);
+ final IGregTechTileEntity tTileEntity = this.getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 4);
if ((tTileEntity != null) && (tTileEntity.getMetaTileEntity() != null)) {
if ((tTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Maintenance)) {
this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) tTileEntity.getMetaTileEntity());
- ((GT_MetaTileEntity_Hatch) tTileEntity.getMetaTileEntity()).mMachineBlock = getCasingTextureIndex();
+ ((GT_MetaTileEntity_Hatch) tTileEntity.getMetaTileEntity()).mMachineBlock = this.getCasingTextureIndex();
} else {
Utils.LOG_INFO("Maintenance hatch must be in the middle block on the back.");
return false;
}
}
- if (this.mMaintenanceHatches.size() != 1 || this.mEnergyHatches.size() != 1) {
+ if ((this.mMaintenanceHatches.size() != 1) || (this.mEnergyHatches.size() != 1)) {
Utils.LOG_INFO("Incorrect amount of Maintenance or Energy hatches.");
return false;
}
@@ -213,17 +212,17 @@ extends GT_MetaTileEntity_MultiBlockBase {
}
@Override
- public int getMaxEfficiency(ItemStack aStack) {
+ public int getMaxEfficiency(final ItemStack aStack) {
return 10000;
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
+ public int getPollutionPerTick(final ItemStack aStack) {
return 0;
}
@Override
- public int getDamageToComponent(ItemStack aStack) {
+ public int getDamageToComponent(final ItemStack aStack) {
return 0;
}
@@ -233,7 +232,7 @@ extends GT_MetaTileEntity_MultiBlockBase {
}
@Override
- public boolean explodesOnComponentBreak(ItemStack aStack) {
+ public boolean explodesOnComponentBreak(final ItemStack aStack) {
return false;
}
@@ -251,11 +250,11 @@ extends GT_MetaTileEntity_MultiBlockBase {
return 63;
}
- private boolean addToMachineList(IGregTechTileEntity tTileEntity) {
- return ((addMaintenanceToMachineList(tTileEntity, getCasingTextureIndex())) || (addInputToMachineList(tTileEntity, getCasingTextureIndex())) || (addOutputToMachineList(tTileEntity, getCasingTextureIndex())) || (addMufflerToMachineList(tTileEntity, getCasingTextureIndex())));
+ 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())));
}
- private boolean addEnergyInputToMachineList(IGregTechTileEntity tTileEntity) {
- return ((addEnergyInputToMachineList(tTileEntity, getCasingTextureIndex())));
+ private boolean addEnergyInputToMachineList(final IGregTechTileEntity tTileEntity) {
+ return ((this.addEnergyInputToMachineList(tTileEntity, this.getCasingTextureIndex())));
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialWireMill.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialWireMill.java
index ca300ba277..15dbb35dd3 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialWireMill.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialWireMill.java
@@ -1,5 +1,7 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi;
+import java.util.ArrayList;
+
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -14,31 +16,28 @@ import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
-
-import java.util.ArrayList;
-
import net.minecraft.block.Block;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
public class GregtechMetaTileEntity_IndustrialWireMill
extends GregtechMeta_MultiBlockBase {
- public GregtechMetaTileEntity_IndustrialWireMill(int aID, String aName, String aNameRegional) {
+ public GregtechMetaTileEntity_IndustrialWireMill(final int aID, final String aName, final String aNameRegional) {
super(aID, aName, aNameRegional);
}
- public GregtechMetaTileEntity_IndustrialWireMill(String aName) {
+ public GregtechMetaTileEntity_IndustrialWireMill(final String aName) {
super(aName);
}
@Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
return new GregtechMetaTileEntity_IndustrialWireMill(this.mName);
}
@Override
public String[] getDescription() {
- return new String[]{
+ return new String[]{
"Controller Block for the Industrial Wire Factory",
"Size: 3x5x3 [WxLxH] (Hollow)", "Controller (front centered)",
"2x Input Bus (side centered)",
@@ -51,7 +50,7 @@ extends GregtechMeta_MultiBlockBase {
}
@Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
+ 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[63], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER)};
}
@@ -59,8 +58,8 @@ extends GregtechMeta_MultiBlockBase {
}
@Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "WireFactory.png");
+ public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "WireFactory.png");
}
@Override
@@ -69,47 +68,47 @@ extends GregtechMeta_MultiBlockBase {
}
@Override
- public boolean isFacingValid(byte aFacing) {
+ public boolean isFacingValid(final byte aFacing) {
return aFacing > 1;
}
@Override
- public boolean checkRecipe(ItemStack aStack) {
- ArrayList<ItemStack> tInputList = getStoredInputs();
- for (ItemStack tInput : tInputList) {
- long tVoltage = getMaxInputVoltage();
- byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
+ public boolean checkRecipe(final ItemStack aStack) {
+ final ArrayList<ItemStack> tInputList = this.getStoredInputs();
+ for (final ItemStack tInput : tInputList) {
+ final long tVoltage = this.getMaxInputVoltage();
+ final byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sWiremillRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], null, new ItemStack[]{tInput});
+ final GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sWiremillRecipes.findRecipe(this.getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], null, new ItemStack[]{tInput});
if (tRecipe != null) {
-
- int tValidOutputSlots = this.getValidOutputSlots(getRecipeMap(), new ItemStack[]{tInput});
+
+ final int tValidOutputSlots = this.getValidOutputSlots(this.getRecipeMap(), new ItemStack[]{tInput});
Utils.LOG_WARNING("Valid Output Slots: "+tValidOutputSlots);
//More than or one input
- if (tInputList.size() > 0 && tValidOutputSlots >= 1) {
-
- if (tRecipe.isRecipeInputEqual(true, null, new ItemStack[]{tInput})) {
- this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
- this.mEfficiencyIncrease = 10000;
- if (tRecipe.mEUt <= 16) {
- this.mEUt = (tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1));
- this.mMaxProgresstime = (tRecipe.mDuration / (1 << tTier - 1));
- } else {
- this.mEUt = tRecipe.mEUt;
- this.mMaxProgresstime = tRecipe.mDuration;
- while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
- this.mEUt *= 4;
- this.mMaxProgresstime /= 2;
+ if ((tInputList.size() > 0) && (tValidOutputSlots >= 1)) {
+
+ if (tRecipe.isRecipeInputEqual(true, null, new ItemStack[]{tInput})) {
+ this.mEfficiency = (10000 - ((this.getIdealStatus() - this.getRepairStatus()) * 1000));
+ this.mEfficiencyIncrease = 10000;
+ if (tRecipe.mEUt <= 16) {
+ this.mEUt = (tRecipe.mEUt * (1 << (tTier - 1)) * (1 << (tTier - 1)));
+ this.mMaxProgresstime = (tRecipe.mDuration / (1 << (tTier - 1)));
+ } else {
+ this.mEUt = tRecipe.mEUt;
+ this.mMaxProgresstime = tRecipe.mDuration;
+ while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
+ this.mEUt *= 4;
+ this.mMaxProgresstime /= 2;
+ }
}
+ if (this.mEUt > 0) {
+ this.mEUt = (-this.mEUt);
+ }
+ this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
+ this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0)};
+ this.updateSlots();
+ return true;
}
- if (this.mEUt > 0) {
- this.mEUt = (-this.mEUt);
- }
- this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
- this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0)};
- updateSlots();
- return true;
- }
}
}
}
@@ -117,14 +116,14 @@ extends GregtechMeta_MultiBlockBase {
}
@Override
- public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
- byte tSide = getBaseMetaTileEntity().getBackFacing();
- if ((getBaseMetaTileEntity().getAirAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), 1)) && (getBaseMetaTileEntity().getAirAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), 2) && (getBaseMetaTileEntity().getAirAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), 3)))) {
+ public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
+ final byte tSide = this.getBaseMetaTileEntity().getBackFacing();
+ if ((this.getBaseMetaTileEntity().getAirAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 1)) && (this.getBaseMetaTileEntity().getAirAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 2) && (this.getBaseMetaTileEntity().getAirAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 3)))) {
int tAirCount = 0;
for (byte i = -1; i < 2; i = (byte) (i + 1)) {
for (byte j = -1; j < 2; j = (byte) (j + 1)) {
for (byte k = -1; k < 2; k = (byte) (k + 1)) {
- if (getBaseMetaTileEntity().getAirOffset(i, j, k)) {
+ if (this.getBaseMetaTileEntity().getAirOffset(i, j, k)) {
tAirCount++;
}
}
@@ -136,30 +135,30 @@ extends GregtechMeta_MultiBlockBase {
}
for (byte i = 2; i < 6; i = (byte) (i + 1)) {
IGregTechTileEntity tTileEntity;
- if ((null != (tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance(i, 2))) &&
- (tTileEntity.getFrontFacing() == getBaseMetaTileEntity().getFrontFacing()) && (tTileEntity.getMetaTileEntity() != null) &&
+ if ((null != (tTileEntity = this.getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance(i, 2))) &&
+ (tTileEntity.getFrontFacing() == this.getBaseMetaTileEntity().getFrontFacing()) && (tTileEntity.getMetaTileEntity() != null) &&
((tTileEntity.getMetaTileEntity() instanceof GregtechMetaTileEntity_IndustrialWireMill))) {
//Utils.LOG_INFO("False 1");
return false;
}
}
- int tX = getBaseMetaTileEntity().getXCoord();
- int tY = getBaseMetaTileEntity().getYCoord();
- int tZ = getBaseMetaTileEntity().getZCoord();
+ final int tX = this.getBaseMetaTileEntity().getXCoord();
+ final int tY = this.getBaseMetaTileEntity().getYCoord();
+ final int tZ = this.getBaseMetaTileEntity().getZCoord();
for (byte i = -1; i < 2; i = (byte) (i + 1)) {
for (byte j = -1; j < 2; j = (byte) (j + 1)) {
if ((i != 0) || (j != 0)) {
for (byte k = 0; k < 5; k = (byte) (k + 1)) {
if (((i == 0) || (j == 0)) && ((k == 1) || (k == 2) || (k == 3))) {
- if (getBaseMetaTileEntity().getBlock(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == getCasingBlock() && getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == getCasingMeta()) {
- }
- else if (!addToMachineList(getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i))) && (!addEnergyInputToMachineList(getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i))))) {
+ if ((this.getBaseMetaTileEntity().getBlock(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingBlock()) && (this.getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingMeta())) {
+ }
+ else if (!this.addToMachineList(this.getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i))) && (!this.addEnergyInputToMachineList(this.getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i))))) {
Utils.LOG_INFO("False 2");
return false;
}
- }
- else if (getBaseMetaTileEntity().getBlock(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == getCasingBlock() && getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == getCasingMeta()) {
- }
+ }
+ else if ((this.getBaseMetaTileEntity().getBlock(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingBlock()) && (this.getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)) == this.getCasingMeta())) {
+ }
else {
Utils.LOG_INFO("False 3");
return false;
@@ -168,26 +167,26 @@ extends GregtechMeta_MultiBlockBase {
}
}
}
- if (this.mOutputHatches.size() != 0 || this.mInputHatches.size() != 0) {
+ if ((this.mOutputHatches.size() != 0) || (this.mInputHatches.size() != 0)) {
Utils.LOG_INFO("Use Busses, Not Hatches for Input/Output.");
return false;
}
- if (this.mInputBusses.size() != 2 || this.mOutputBusses.size() != 2) {
+ if ((this.mInputBusses.size() != 2) || (this.mOutputBusses.size() != 2)) {
Utils.LOG_INFO("Incorrect amount of Input & Output busses.");
return false;
- }
+ }
this.mMaintenanceHatches.clear();
- IGregTechTileEntity tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), 4);
+ final IGregTechTileEntity tTileEntity = this.getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance(this.getBaseMetaTileEntity().getBackFacing(), 4);
if ((tTileEntity != null) && (tTileEntity.getMetaTileEntity() != null)) {
if ((tTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Maintenance)) {
this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) tTileEntity.getMetaTileEntity());
- ((GT_MetaTileEntity_Hatch) tTileEntity.getMetaTileEntity()).mMachineBlock = getCasingTextureIndex();
+ ((GT_MetaTileEntity_Hatch) tTileEntity.getMetaTileEntity()).mMachineBlock = this.getCasingTextureIndex();
} else {
Utils.LOG_INFO("Maintenance hatch must be in the middle block on the back.");
return false;
}
}
- if (this.mMaintenanceHatches.size() != 1 || this.mEnergyHatches.size() != 1) {
+ if ((this.mMaintenanceHatches.size() != 1) || (this.mEnergyHatches.size() != 1)) {
Utils.LOG_INFO("Incorrect amount of Maintenance or Energy hatches.");
return false;
}
@@ -200,12 +199,12 @@ extends GregtechMeta_MultiBlockBase {
}
@Override
- public int getMaxEfficiency(ItemStack aStack) {
+ public int getMaxEfficiency(final ItemStack aStack) {
return 10000;
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
+ public int getPollutionPerTick(final ItemStack aStack) {
return 0;
}
@@ -215,7 +214,7 @@ extends GregtechMeta_MultiBlockBase {
}
@Override
- public boolean explodesOnComponentBreak(ItemStack aStack) {
+ public boolean explodesOnComponentBreak(final ItemStack aStack) {
return false;
}
@@ -233,11 +232,11 @@ extends GregtechMeta_MultiBlockBase {
return 63;
}
- private boolean addToMachineList(IGregTechTileEntity tTileEntity) {
- return ((addMaintenanceToMachineList(tTileEntity, getCasingTextureIndex())) || (addInputToMachineList(tTileEntity, getCasingTextureIndex())) || (addOutputToMachineList(tTileEntity, getCasingTextureIndex())) || (addMufflerToMachineList(tTileEntity, getCasingTextureIndex())));
+ 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())));
}
-
- private boolean addEnergyInputToMachineList(IGregTechTileEntity tTileEntity) {
- return ((addEnergyInputToMachineList(tTileEntity, getCasingTextureIndex())));
+
+ private boolean addEnergyInputToMachineList(final IGregTechTileEntity tTileEntity) {
+ return ((this.addEnergyInputToMachineList(tTileEntity, this.getCasingTextureIndex())));
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IronBlastFurnace.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IronBlastFurnace.java
index aa7aecc8c5..be28d3ef72 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IronBlastFurnace.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IronBlastFurnace.java
@@ -24,357 +24,357 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.common.util.ForgeDirection;
public class GregtechMetaTileEntity_IronBlastFurnace
- extends MetaTileEntity {
- private static final ITexture[] FACING_SIDE = {new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top)};
- private static final ITexture[] FACING_FRONT = {new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_Off)};
- private static final ITexture[] FACING_ACTIVE = {new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_On)};
- public int mMaxProgresstime = 0;
- public int mUpdate = 30;
- public int mProgresstime = 0;
- public boolean mMachine = false;
- public ItemStack mOutputItem1;
- public ItemStack mOutputItem2;
-
- public GregtechMetaTileEntity_IronBlastFurnace(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional, 4);
- }
-
- public GregtechMetaTileEntity_IronBlastFurnace(String aName) {
- super(aName, 4);
- }
-
- @Override
+extends MetaTileEntity {
+ private static final ITexture[] FACING_SIDE = {new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top)};
+ private static final ITexture[] FACING_FRONT = {new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_Off)};
+ private static final ITexture[] FACING_ACTIVE = {new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Redstone_On)};
+ public int mMaxProgresstime = 0;
+ public int mUpdate = 30;
+ public int mProgresstime = 0;
+ public boolean mMachine = false;
+ public ItemStack mOutputItem1;
+ public ItemStack mOutputItem2;
+
+ public GregtechMetaTileEntity_IronBlastFurnace(final int aID, final String aName, final String aNameRegional) {
+ super(aID, aName, aNameRegional, 4);
+ }
+
+ public GregtechMetaTileEntity_IronBlastFurnace(final String aName) {
+ super(aName, 4);
+ }
+
+ @Override
public String[] getDescription() {
- return new String[]{"Sloooowly, Skip the Bronze age, Get some Steel!",
- "Multiblock: 3x3x5 hollow with opening on top",
- "40 Iron Plated Bricks required",
- "----",
- "Even though Iron melts hotter than bronze,",
- "this machine is to help players skip looking",
- "for tin and copper, which are not as common",
- "as Iron is. This machine takes 5x longer than the bronze",
- "blast furnace as a result.",
- "----",
- CORE.GT_Tooltip};
- }
-
- @Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- if (aSide == aFacing) {
- return aActive ? FACING_ACTIVE : FACING_FRONT;
- }
- return FACING_SIDE;
- }
-
- @Override
+ return new String[]{"Sloooowly, Skip the Bronze age, Get some Steel!",
+ "Multiblock: 3x3x5 hollow with opening on top",
+ "40 Iron Plated Bricks required",
+ "----",
+ "Even though Iron melts hotter than bronze,",
+ "this machine is to help players skip looking",
+ "for tin and copper, which are not as common",
+ "as Iron is. This machine takes 5x longer than the bronze",
+ "blast furnace as a result.",
+ "----",
+ 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 aActive ? FACING_ACTIVE : FACING_FRONT;
+ }
+ return FACING_SIDE;
+ }
+
+ @Override
public boolean isSteampowered() {
- return false;
- }
+ return false;
+ }
- @Override
+ @Override
public boolean isElectric() {
- return false;
- }
+ return false;
+ }
- @Override
+ @Override
public boolean isPneumatic() {
- return false;
- }
+ return false;
+ }
- @Override
+ @Override
public boolean isEnetInput() {
- return false;
- }
+ return false;
+ }
- @Override
+ @Override
public boolean isEnetOutput() {
- return false;
- }
+ return false;
+ }
- @Override
- public boolean isInputFacing(byte aSide) {
- return false;
- }
+ @Override
+ public boolean isInputFacing(final byte aSide) {
+ return false;
+ }
- @Override
- public boolean isOutputFacing(byte aSide) {
- return false;
- }
+ @Override
+ public boolean isOutputFacing(final byte aSide) {
+ return false;
+ }
- @Override
+ @Override
public boolean isTeleporterCompatible() {
- return false;
- }
+ return false;
+ }
- @Override
- public boolean isFacingValid(byte aFacing) {
- return aFacing > 1;
- }
+ @Override
+ public boolean isFacingValid(final byte aFacing) {
+ return aFacing > 1;
+ }
- @Override
- public boolean isAccessAllowed(EntityPlayer aPlayer) {
- return true;
- }
+ @Override
+ public boolean isAccessAllowed(final EntityPlayer aPlayer) {
+ return true;
+ }
- @Override
+ @Override
public int getProgresstime() {
- return this.mProgresstime;
- }
+ return this.mProgresstime;
+ }
- @Override
+ @Override
public int maxProgresstime() {
- return this.mMaxProgresstime;
- }
-
- @Override
- public int increaseProgress(int aProgress) {
- this.mProgresstime += aProgress;
- return this.mMaxProgresstime - this.mProgresstime;
- }
-
- @Override
- public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCoverID) {
- return (GregTech_API.getCoverBehavior(aCoverID.toStack()).isSimpleCover()) && (super.allowCoverOnSide(aSide, aCoverID));
- }
-
- @Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GregtechMetaTileEntity_IronBlastFurnace(this.mName);
- }
-
- @Override
- public void saveNBTData(NBTTagCompound aNBT) {
- aNBT.setInteger("mProgresstime", this.mProgresstime);
- aNBT.setInteger("mMaxProgresstime", this.mMaxProgresstime);
- if (this.mOutputItem1 != null) {
- NBTTagCompound tNBT = new NBTTagCompound();
- this.mOutputItem1.writeToNBT(tNBT);
- aNBT.setTag("mOutputItem1", tNBT);
- }
- if (this.mOutputItem2 != null) {
- NBTTagCompound tNBT = new NBTTagCompound();
- this.mOutputItem2.writeToNBT(tNBT);
- aNBT.setTag("mOutputItem2", tNBT);
- }
- }
-
- @Override
- public void loadNBTData(NBTTagCompound aNBT) {
- this.mUpdate = 30;
- this.mProgresstime = aNBT.getInteger("mProgresstime");
- this.mMaxProgresstime = aNBT.getInteger("mMaxProgresstime");
- this.mOutputItem1 = GT_Utility.loadItem(aNBT, "mOutputItem1");
- this.mOutputItem2 = GT_Utility.loadItem(aNBT, "mOutputItem2");
- }
-
- @Override
- public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
- if (aBaseMetaTileEntity.isClientSide()) {
- return true;
- }
- aBaseMetaTileEntity.openGUI(aPlayer);
- return true;
- }
-
- @Override
- public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new CONTAINER_IronBlastFurnace(aPlayerInventory, aBaseMetaTileEntity);
- }
-
- @Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GUI_IronBlastFurnace(aPlayerInventory, aBaseMetaTileEntity);
- }
-
- private boolean checkMachine() {
- int xDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetX;
- int zDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetZ;
- for (int i = -1; i < 2; i++) {
- for (int j = -1; j < 4; j++) { //This is height
- for (int k = -1; k < 2; k++) {
- if ((xDir + i != 0) || (j != 0) || (zDir + k != 0)) {
- if ((i != 0) || (j == -1) || (k != 0)) {
- if ((getBaseMetaTileEntity().getBlockOffset(xDir + i, j, zDir + k) != ModBlocks.blockCasingsMisc) || (getBaseMetaTileEntity().getMetaIDOffset(xDir + i, j, zDir + k) != 10)) {
- return false;
- }
- } else if ((!GT_Utility.arrayContains(getBaseMetaTileEntity().getBlockOffset(xDir + i, j, zDir + k), new Object[]{Blocks.lava, Blocks.flowing_lava, null})) && (!getBaseMetaTileEntity().getAirOffset(xDir + i, j, zDir + k))) {
- return false;
- }
- }
- }
- }
- }
- return true;
- }
-
- @Override
+ return this.mMaxProgresstime;
+ }
+
+ @Override
+ public int increaseProgress(final int aProgress) {
+ this.mProgresstime += aProgress;
+ return this.mMaxProgresstime - this.mProgresstime;
+ }
+
+ @Override
+ public boolean allowCoverOnSide(final byte aSide, final GT_ItemStack aCoverID) {
+ return (GregTech_API.getCoverBehavior(aCoverID.toStack()).isSimpleCover()) && (super.allowCoverOnSide(aSide, aCoverID));
+ }
+
+ @Override
+ public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntity_IronBlastFurnace(this.mName);
+ }
+
+ @Override
+ public void saveNBTData(final NBTTagCompound aNBT) {
+ aNBT.setInteger("mProgresstime", this.mProgresstime);
+ aNBT.setInteger("mMaxProgresstime", this.mMaxProgresstime);
+ if (this.mOutputItem1 != null) {
+ final NBTTagCompound tNBT = new NBTTagCompound();
+ this.mOutputItem1.writeToNBT(tNBT);
+ aNBT.setTag("mOutputItem1", tNBT);
+ }
+ if (this.mOutputItem2 != null) {
+ final NBTTagCompound tNBT = new NBTTagCompound();
+ this.mOutputItem2.writeToNBT(tNBT);
+ aNBT.setTag("mOutputItem2", tNBT);
+ }
+ }
+
+ @Override
+ public void loadNBTData(final NBTTagCompound aNBT) {
+ this.mUpdate = 30;
+ this.mProgresstime = aNBT.getInteger("mProgresstime");
+ this.mMaxProgresstime = aNBT.getInteger("mMaxProgresstime");
+ this.mOutputItem1 = GT_Utility.loadItem(aNBT, "mOutputItem1");
+ this.mOutputItem2 = GT_Utility.loadItem(aNBT, "mOutputItem2");
+ }
+
+ @Override
+ public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) {
+ if (aBaseMetaTileEntity.isClientSide()) {
+ return true;
+ }
+ aBaseMetaTileEntity.openGUI(aPlayer);
+ return true;
+ }
+
+ @Override
+ public Object getServerGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new CONTAINER_IronBlastFurnace(aPlayerInventory, aBaseMetaTileEntity);
+ }
+
+ @Override
+ public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GUI_IronBlastFurnace(aPlayerInventory, aBaseMetaTileEntity);
+ }
+
+ private boolean checkMachine() {
+ final int xDir = ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetX;
+ final int zDir = ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetZ;
+ for (int i = -1; i < 2; i++) {
+ for (int j = -1; j < 4; j++) { //This is height
+ for (int k = -1; k < 2; k++) {
+ if (((xDir + i) != 0) || (j != 0) || ((zDir + k) != 0)) {
+ if ((i != 0) || (j == -1) || (k != 0)) {
+ if ((this.getBaseMetaTileEntity().getBlockOffset(xDir + i, j, zDir + k) != ModBlocks.blockCasingsMisc) || (this.getBaseMetaTileEntity().getMetaIDOffset(xDir + i, j, zDir + k) != 10)) {
+ return false;
+ }
+ } else if ((!GT_Utility.arrayContains(this.getBaseMetaTileEntity().getBlockOffset(xDir + i, j, zDir + k), new Object[]{Blocks.lava, Blocks.flowing_lava, null})) && (!this.getBaseMetaTileEntity().getAirOffset(xDir + i, j, zDir + k))) {
+ return false;
+ }
+ }
+ }
+ }
+ }
+ return true;
+ }
+
+ @Override
public void onMachineBlockUpdate() {
- this.mUpdate = 30;
- }
-
- @Override
- public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) {
- if ((aBaseMetaTileEntity.isClientSide()) &&
- (aBaseMetaTileEntity.isActive())) {
- aBaseMetaTileEntity.getWorld().spawnParticle("cloud", aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1) + Math.random(), aBaseMetaTileEntity.getOffsetY(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1) + Math.random(), 0.0D, 0.3D, 0.0D);
- }
- if (aBaseMetaTileEntity.isServerSide()) {
- if (this.mUpdate-- == 0) {
- this.mMachine = checkMachine();
- }
- if (this.mMachine) {
- if (this.mMaxProgresstime > 0) {
- if (++this.mProgresstime >= this.mMaxProgresstime) {
- addOutputProducts();
- this.mOutputItem1 = null;
- this.mOutputItem2 = null;
- this.mProgresstime = 0;
- this.mMaxProgresstime = 0;
- try {
- // GT_Mod.instance.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "steel");
- } catch (Exception e) {
- }
- }
- } else if (aBaseMetaTileEntity.isAllowedToWork()) {
- checkRecipe();
- }
- }
- aBaseMetaTileEntity.setActive((this.mMaxProgresstime > 0) && (this.mMachine));
- if (aBaseMetaTileEntity.isActive()) {
- if (aBaseMetaTileEntity.getAir(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1))) {
- aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1), Blocks.lava, 1, 2);
- this.mUpdate = 1;
- }
- if (aBaseMetaTileEntity.getAir(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord() + 1, aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1))) {
- aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord() + 1, aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1), Blocks.lava, 1, 2);
- this.mUpdate = 1;
- }
- } else {
- if (aBaseMetaTileEntity.getBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1)) == Blocks.lava) {
- aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1), Blocks.air, 0, 2);
- this.mUpdate = 1;
- }
- if (aBaseMetaTileEntity.getBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord() + 1, aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1)) == Blocks.lava) {
- aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord() + 1, aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1), Blocks.air, 0, 2);
- this.mUpdate = 1;
- }
- }
- }
- }
-
- private void addOutputProducts() {
- if (this.mOutputItem1 != null) {
- if (this.mInventory[2] == null) {
- this.mInventory[2] = GT_Utility.copy(new Object[]{this.mOutputItem1});
- } else if (GT_Utility.areStacksEqual(this.mInventory[2], this.mOutputItem1)) {
- this.mInventory[2].stackSize = Math.min(this.mOutputItem1.getMaxStackSize(), this.mOutputItem1.stackSize + this.mInventory[2].stackSize);
- }
- }
- if (this.mOutputItem2 != null) {
- if (this.mInventory[3] == null) {
- this.mInventory[3] = GT_Utility.copy(new Object[]{this.mOutputItem2});
- } else if (GT_Utility.areStacksEqual(this.mInventory[3], this.mOutputItem2)) {
- this.mInventory[3].stackSize = Math.min(this.mOutputItem2.getMaxStackSize(), this.mOutputItem2.stackSize + this.mInventory[3].stackSize);
- }
- }
- }
-
- private boolean spaceForOutput(ItemStack aStack1, ItemStack aStack2) {
- if (((this.mInventory[2] == null) || (aStack1 == null) || ((this.mInventory[2].stackSize + aStack1.stackSize <= this.mInventory[2].getMaxStackSize()) && (GT_Utility.areStacksEqual(this.mInventory[2], aStack1)))) && (
- (this.mInventory[3] == null) || (aStack2 == null) || ((this.mInventory[3].stackSize + aStack2.stackSize <= this.mInventory[3].getMaxStackSize()) && (GT_Utility.areStacksEqual(this.mInventory[3], aStack2))))) {
- return true;
- }
- return false;
- }
-
- private boolean checkRecipe() {
- if (!this.mMachine) {
- return false;
- }
- if ((this.mInventory[0] != null) && (this.mInventory[1] != null) && (this.mInventory[0].stackSize >= 1)) {
- if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[0], "dustIron")) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[0], "ingotIron"))) {
- if ((this.mInventory[1].getItem() == Items.coal) && (this.mInventory[1].stackSize >= 4) && (spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 4L)))) {
- getBaseMetaTileEntity().decrStackSize(0, 1);
- getBaseMetaTileEntity().decrStackSize(1, 4*3);
- this.mMaxProgresstime = 36000;
- return true;
- }
- if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "fuelCoke")) && (this.mInventory[1].stackSize >= 2) && (spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash, 4L)))) {
- getBaseMetaTileEntity().decrStackSize(0, 1);
- getBaseMetaTileEntity().decrStackSize(1, 2*3);
- this.mMaxProgresstime = 4800*5;
- return true;
- }
- if ((this.mInventory[0].stackSize >= 9) && ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCoal")) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCharcoal"))) && (this.mInventory[1].stackSize >= 4) && (spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 4L)))) {
- getBaseMetaTileEntity().decrStackSize(0, 9);
- getBaseMetaTileEntity().decrStackSize(1, 4*3);
- this.mMaxProgresstime = 64800*5;
- return true;
- }
- } else if (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[0], "dustSteel")) {
- if ((this.mInventory[1].getItem() == Items.coal) && (this.mInventory[1].stackSize >= 2) && (spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 2L)))) {
- getBaseMetaTileEntity().decrStackSize(0, 1);
- getBaseMetaTileEntity().decrStackSize(1, 2*3);
- this.mMaxProgresstime = 3600*5;
- return true;
- }
- if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "fuelCoke")) && (this.mInventory[1].stackSize >= 1) && (spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash, 2L)))) {
- getBaseMetaTileEntity().decrStackSize(0, 1);
- getBaseMetaTileEntity().decrStackSize(1, 1*3);
- this.mMaxProgresstime = 2400*5;
- return true;
- }
- if ((this.mInventory[0].stackSize >= 9) && ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCoal")) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCharcoal"))) && (this.mInventory[1].stackSize >= 2) && (spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 2L)))) {
- getBaseMetaTileEntity().decrStackSize(0, 9);
- getBaseMetaTileEntity().decrStackSize(1, 2*3);
- this.mMaxProgresstime = 32400*5;
- return true;
- }
- } else if (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[0], "blockIron")) {
- if ((this.mInventory[1].getItem() == Items.coal) && (this.mInventory[1].stackSize >= 36) && (spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 4L)))) {
- getBaseMetaTileEntity().decrStackSize(0, 1);
- getBaseMetaTileEntity().decrStackSize(1, 64);
- this.mMaxProgresstime = 64800*9;
- return true;
- }
- if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "fuelCoke")) && (this.mInventory[1].stackSize >= 18) && (spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 4L)))) {
- getBaseMetaTileEntity().decrStackSize(0, 1);
- getBaseMetaTileEntity().decrStackSize(1, 18*3);
- this.mMaxProgresstime = 43200*5;
- return true;
- }
- if (((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCoal")) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCharcoal"))) && (this.mInventory[1].stackSize >= 4) && (spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 4L)))) {
- getBaseMetaTileEntity().decrStackSize(0, 1);
- getBaseMetaTileEntity().decrStackSize(1, 4*3);
- this.mMaxProgresstime = 64800*5;
- return true;
- }
- }
- }
- this.mOutputItem1 = null;
- this.mOutputItem2 = null;
- return false;
- }
-
- @Override
+ this.mUpdate = 30;
+ }
+
+ @Override
+ public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTimer) {
+ if ((aBaseMetaTileEntity.isClientSide()) &&
+ (aBaseMetaTileEntity.isActive())) {
+ aBaseMetaTileEntity.getWorld().spawnParticle("cloud", aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1) + Math.random(), aBaseMetaTileEntity.getOffsetY(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1) + Math.random(), 0.0D, 0.3D, 0.0D);
+ }
+ if (aBaseMetaTileEntity.isServerSide()) {
+ if (this.mUpdate-- == 0) {
+ this.mMachine = this.checkMachine();
+ }
+ if (this.mMachine) {
+ if (this.mMaxProgresstime > 0) {
+ if (++this.mProgresstime >= this.mMaxProgresstime) {
+ this.addOutputProducts();
+ this.mOutputItem1 = null;
+ this.mOutputItem2 = null;
+ this.mProgresstime = 0;
+ this.mMaxProgresstime = 0;
+ try {
+ // GT_Mod.instance.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "steel");
+ } catch (final Exception e) {
+ }
+ }
+ } else if (aBaseMetaTileEntity.isAllowedToWork()) {
+ this.checkRecipe();
+ }
+ }
+ aBaseMetaTileEntity.setActive((this.mMaxProgresstime > 0) && (this.mMachine));
+ if (aBaseMetaTileEntity.isActive()) {
+ if (aBaseMetaTileEntity.getAir(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1))) {
+ aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1), Blocks.lava, 1, 2);
+ this.mUpdate = 1;
+ }
+ if (aBaseMetaTileEntity.getAir(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord() + 1, aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1))) {
+ aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord() + 1, aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1), Blocks.lava, 1, 2);
+ this.mUpdate = 1;
+ }
+ } else {
+ if (aBaseMetaTileEntity.getBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1)) == Blocks.lava) {
+ aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1), Blocks.air, 0, 2);
+ this.mUpdate = 1;
+ }
+ if (aBaseMetaTileEntity.getBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord() + 1, aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1)) == Blocks.lava) {
+ aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getOffsetX(aBaseMetaTileEntity.getBackFacing(), 1), aBaseMetaTileEntity.getYCoord() + 1, aBaseMetaTileEntity.getOffsetZ(aBaseMetaTileEntity.getBackFacing(), 1), Blocks.air, 0, 2);
+ this.mUpdate = 1;
+ }
+ }
+ }
+ }
+
+ private void addOutputProducts() {
+ if (this.mOutputItem1 != null) {
+ if (this.mInventory[2] == null) {
+ this.mInventory[2] = GT_Utility.copy(new Object[]{this.mOutputItem1});
+ } else if (GT_Utility.areStacksEqual(this.mInventory[2], this.mOutputItem1)) {
+ this.mInventory[2].stackSize = Math.min(this.mOutputItem1.getMaxStackSize(), this.mOutputItem1.stackSize + this.mInventory[2].stackSize);
+ }
+ }
+ if (this.mOutputItem2 != null) {
+ if (this.mInventory[3] == null) {
+ this.mInventory[3] = GT_Utility.copy(new Object[]{this.mOutputItem2});
+ } else if (GT_Utility.areStacksEqual(this.mInventory[3], this.mOutputItem2)) {
+ this.mInventory[3].stackSize = Math.min(this.mOutputItem2.getMaxStackSize(), this.mOutputItem2.stackSize + this.mInventory[3].stackSize);
+ }
+ }
+ }
+
+ private boolean spaceForOutput(final ItemStack aStack1, final ItemStack aStack2) {
+ if (((this.mInventory[2] == null) || (aStack1 == null) || (((this.mInventory[2].stackSize + aStack1.stackSize) <= this.mInventory[2].getMaxStackSize()) && (GT_Utility.areStacksEqual(this.mInventory[2], aStack1)))) && (
+ (this.mInventory[3] == null) || (aStack2 == null) || (((this.mInventory[3].stackSize + aStack2.stackSize) <= this.mInventory[3].getMaxStackSize()) && (GT_Utility.areStacksEqual(this.mInventory[3], aStack2))))) {
+ return true;
+ }
+ return false;
+ }
+
+ private boolean checkRecipe() {
+ if (!this.mMachine) {
+ return false;
+ }
+ if ((this.mInventory[0] != null) && (this.mInventory[1] != null) && (this.mInventory[0].stackSize >= 1)) {
+ if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[0], "dustIron")) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[0], "ingotIron"))) {
+ if ((this.mInventory[1].getItem() == Items.coal) && (this.mInventory[1].stackSize >= 4) && (this.spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 4L)))) {
+ this.getBaseMetaTileEntity().decrStackSize(0, 1);
+ this.getBaseMetaTileEntity().decrStackSize(1, 4*3);
+ this.mMaxProgresstime = 36000;
+ return true;
+ }
+ if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "fuelCoke")) && (this.mInventory[1].stackSize >= 2) && (this.spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash, 4L)))) {
+ this.getBaseMetaTileEntity().decrStackSize(0, 1);
+ this.getBaseMetaTileEntity().decrStackSize(1, 2*3);
+ this.mMaxProgresstime = 4800*5;
+ return true;
+ }
+ if ((this.mInventory[0].stackSize >= 9) && ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCoal")) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCharcoal"))) && (this.mInventory[1].stackSize >= 4) && (this.spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 4L)))) {
+ this.getBaseMetaTileEntity().decrStackSize(0, 9);
+ this.getBaseMetaTileEntity().decrStackSize(1, 4*3);
+ this.mMaxProgresstime = 64800*5;
+ return true;
+ }
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[0], "dustSteel")) {
+ if ((this.mInventory[1].getItem() == Items.coal) && (this.mInventory[1].stackSize >= 2) && (this.spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 2L)))) {
+ this.getBaseMetaTileEntity().decrStackSize(0, 1);
+ this.getBaseMetaTileEntity().decrStackSize(1, 2*3);
+ this.mMaxProgresstime = 3600*5;
+ return true;
+ }
+ if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "fuelCoke")) && (this.mInventory[1].stackSize >= 1) && (this.spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 1L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash, 2L)))) {
+ this.getBaseMetaTileEntity().decrStackSize(0, 1);
+ this.getBaseMetaTileEntity().decrStackSize(1, 1*3);
+ this.mMaxProgresstime = 2400*5;
+ return true;
+ }
+ if ((this.mInventory[0].stackSize >= 9) && ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCoal")) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCharcoal"))) && (this.mInventory[1].stackSize >= 2) && (this.spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 2L)))) {
+ this.getBaseMetaTileEntity().decrStackSize(0, 9);
+ this.getBaseMetaTileEntity().decrStackSize(1, 2*3);
+ this.mMaxProgresstime = 32400*5;
+ return true;
+ }
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[0], "blockIron")) {
+ if ((this.mInventory[1].getItem() == Items.coal) && (this.mInventory[1].stackSize >= 36) && (this.spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 4L)))) {
+ this.getBaseMetaTileEntity().decrStackSize(0, 1);
+ this.getBaseMetaTileEntity().decrStackSize(1, 64);
+ this.mMaxProgresstime = 64800*9;
+ return true;
+ }
+ if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "fuelCoke")) && (this.mInventory[1].stackSize >= 18) && (this.spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Ash, 4L)))) {
+ this.getBaseMetaTileEntity().decrStackSize(0, 1);
+ this.getBaseMetaTileEntity().decrStackSize(1, 18*3);
+ this.mMaxProgresstime = 43200*5;
+ return true;
+ }
+ if (((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCoal")) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[1], "blockCharcoal"))) && (this.mInventory[1].stackSize >= 4) && (this.spaceForOutput(this.mOutputItem1 = GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Steel, 9L), this.mOutputItem2 = GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 4L)))) {
+ this.getBaseMetaTileEntity().decrStackSize(0, 1);
+ this.getBaseMetaTileEntity().decrStackSize(1, 4*3);
+ this.mMaxProgresstime = 64800*5;
+ return true;
+ }
+ }
+ }
+ this.mOutputItem1 = null;
+ this.mOutputItem2 = null;
+ return false;
+ }
+
+ @Override
public boolean isGivingInformation() {
- return false;
- }
-
- @Override
- public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return aIndex > 1;
- }
-
- @Override
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- if (aIndex < 2) {
- }
- return !GT_Utility.areStacksEqual(aStack, this.mInventory[0]);
- }
-
- @Override
+ return false;
+ }
+
+ @Override
+ public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
+ return aIndex > 1;
+ }
+
+ @Override
+ public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
+ if (aIndex < 2) {
+ }
+ return !GT_Utility.areStacksEqual(aStack, this.mInventory[0]);
+ }
+
+ @Override
public byte getTileEntityBaseType() {
- return 0;
- }
+ return 0;
+ }
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MassFabricator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MassFabricator.java
index f6e43f783a..67b592950b 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MassFabricator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MassFabricator.java
@@ -1,5 +1,10 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi;
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import org.apache.commons.lang3.ArrayUtils;
+
import gregtech.api.enums.*;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -15,18 +20,12 @@ import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_MatterFab;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-
import net.minecraft.block.Block;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;
-import org.apache.commons.lang3.ArrayUtils;
-
public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlockBase {
public static int sUUAperUUM = 1;
@@ -43,18 +42,18 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
GT_Recipe fakeRecipe;
public int getAmplifierUsed(){
- return mAmplifierUsed;
+ return this.mAmplifierUsed;
}
public int getMatterProduced(){
- return mMatterProduced;
+ return this.mMatterProduced;
}
- public GregtechMetaTileEntity_MassFabricator(int aID, String aName, String aNameRegional) {
+ public GregtechMetaTileEntity_MassFabricator(final int aID, final String aName, final String aNameRegional) {
super(aID, aName, aNameRegional);
}
- public GregtechMetaTileEntity_MassFabricator(String aName) {
+ public GregtechMetaTileEntity_MassFabricator(final String aName) {
super(aName);
}
@@ -70,14 +69,14 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
"1x Output Hatch (Any bottom layer casing)",
"1x Maintenance Hatch (Any bottom layer casing)",
"1x Muffler Hatch (Centered 3x1x3 area in Top layer)",
- "1x Energy Hatch (Any bottom layer casing)",
+ "1x Energy Hatch (Any bottom layer casing)",
"24x IC2 Reinforced Glass for the walls",
"Matter Fabricator Casings for the edges & top (40 at least!)",
CORE.GT_Tooltip};
}
@Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
+ 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[66],
new GT_RenderedTexture(aActive ? TexturesGtBlock.Casing_Machine_Screen_3 : TexturesGtBlock.Casing_Machine_Screen_1)};
@@ -86,12 +85,12 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
}
@Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GUI_MatterFab(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "MatterFabricator.png");
+ public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GUI_MatterFab(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "MatterFabricator.png");
}
@Override
- public void onConfigLoad(GT_Config aConfig) {
+ public void onConfigLoad(final GT_Config aConfig) {
super.onConfigLoad(aConfig);
sDurationMultiplier = aConfig.get(ConfigCategories.machineconfig, "Massfabricator.UUM_Duration_Multiplier", sDurationMultiplier);
sUUAperUUM = aConfig.get(ConfigCategories.machineconfig, "Massfabricator.UUA_per_UUM", sUUAperUUM);
@@ -101,18 +100,18 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
}
@Override
- public boolean checkRecipe(ItemStack aStack) {
+ public boolean checkRecipe(final ItemStack aStack) {
Utils.LOG_INFO("Fabricating Matter.");
- if (mInputHatches.size() != 1){
- Utils.LOG_INFO("Too many input hatches. Found: "+mInputHatches.size()+" | Expected: 1");
+ if (this.mInputHatches.size() != 1){
+ Utils.LOG_INFO("Too many input hatches. Found: "+this.mInputHatches.size()+" | Expected: 1");
return false;
}
- ArrayList<ItemStack> tInputList = getStoredInputs();
- for (int i = 0; i < tInputList.size() - 1; i++) {
+ final ArrayList<ItemStack> tInputList = this.getStoredInputs();
+ for (int i = 0; i < (tInputList.size() - 1); i++) {
for (int j = i + 1; j < tInputList.size(); j++) {
- if (GT_Utility.areStacksEqual((ItemStack) tInputList.get(i), (ItemStack) tInputList.get(j))) {
- if (((ItemStack) tInputList.get(i)).stackSize >= ((ItemStack) tInputList.get(j)).stackSize) {
+ if (GT_Utility.areStacksEqual(tInputList.get(i), tInputList.get(j))) {
+ if (tInputList.get(i).stackSize >= tInputList.get(j).stackSize) {
tInputList.remove(j--);
} else {
tInputList.remove(i--);
@@ -120,17 +119,17 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
}
}
}
- }
+ }
- ItemStack[] tInputs = (ItemStack[]) Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2);
+ final ItemStack[] tInputs = Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2);
- ArrayList<FluidStack> tFluidList = getStoredFluids();
- for (int i = 0; i < tFluidList.size() - 1; i++) {
+ final ArrayList<FluidStack> tFluidList = this.getStoredFluids();
+ for (int i = 0; i < (tFluidList.size() - 1); i++) {
for (int j = i + 1; j < tFluidList.size(); j++) {
- if (GT_Utility.areFluidsEqual((FluidStack) tFluidList.get(i), (FluidStack) tFluidList.get(j))) {
- if (((FluidStack) tFluidList.get(i)).amount >= ((FluidStack) tFluidList.get(j)).amount) {
+ if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) {
+ if (tFluidList.get(i).amount >= tFluidList.get(j).amount) {
tFluidList.remove(j--);
} else {
tFluidList.remove(i--);
@@ -140,16 +139,16 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
}
}
- long tVoltage = getMaxInputVoltage();
- byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
- FluidStack[] tFluids = (FluidStack[]) Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tFluidList.size()]), 0, tFluidList.size());
+ final long tVoltage = this.getMaxInputVoltage();
+ final byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
+ final FluidStack[] tFluids = Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tFluidList.size()]), 0, tFluidList.size());
for (int scrapSlots=0;scrapSlots<tInputs.length;scrapSlots++){
- if (tInputs[scrapSlots].getItem() == scrapPile.getItem()){
+ if (tInputs[scrapSlots].getItem() == this.scrapPile.getItem()){
if (tInputs[scrapSlots].stackSize >= 9 ){
Utils.LOG_INFO("Found enough scrap for a special recipe. x"+tInputs[scrapSlots].stackSize);
- for (GT_MetaTileEntity_Hatch_Input tHatch : mInputHatches) {
+ for (final GT_MetaTileEntity_Hatch_Input tHatch : this.mInputHatches) {
if (isValidMetaTileEntity(tHatch)) {
Utils.LOG_INFO("Input fluid empty - Time to generate 1UU-A.");
if (tHatch.mFluid == null){
@@ -163,7 +162,7 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
Utils.LOG_INFO("Remaining after recipe. x"+tInputs[scrapSlots].stackSize);
}
}
- }
+ }
}
}
@@ -171,14 +170,14 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
if (tFluids.length > 0) {
Utils.LOG_INFO("Input fluid found");
for(int i = 0;i<tFluids.length;i++){
- GT_Recipe tRecipe = Recipe_GT.Gregtech_Recipe_Map.sMatterFab2Recipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], new FluidStack[]{tFluids[i]}, new ItemStack[]{});
+ final GT_Recipe tRecipe = Recipe_GT.Gregtech_Recipe_Map.sMatterFab2Recipes.findRecipe(this.getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], new FluidStack[]{tFluids[i]}, new ItemStack[]{});
if (tRecipe != null) {
if (tRecipe.isRecipeInputEqual(true, tFluids, new ItemStack[]{})) {
- this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
+ this.mEfficiency = (10000 - ((this.getIdealStatus() - this.getRepairStatus()) * 1000));
this.mEfficiencyIncrease = 10000;
if (tRecipe.mEUt <= 16) {
- this.mEUt = (tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1));
- this.mMaxProgresstime = ((tRecipe.mDuration/**sDurationMultiplier*/) / (1 << tTier - 1));
+ this.mEUt = (tRecipe.mEUt * (1 << (tTier - 1)) * (1 << (tTier - 1)));
+ this.mMaxProgresstime = ((tRecipe.mDuration/**sDurationMultiplier*/) / (1 << (tTier - 1)));
} else {
this.mEUt = tRecipe.mEUt;
this.mMaxProgresstime = (tRecipe.mDuration/**sDurationMultiplier*/);
@@ -193,10 +192,10 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0)};
this.mOutputFluids = tRecipe.mFluidOutputs.clone();
- ArrayUtils.reverse(mOutputFluids);
- mMatterProduced++;
- mAmplifierUsed++;
- updateSlots();
+ ArrayUtils.reverse(this.mOutputFluids);
+ this.mMatterProduced++;
+ this.mAmplifierUsed++;
+ this.updateSlots();
//Utils.LOG_INFO("Recipes Finished: "+mMatterProduced);
return true;
}
@@ -209,9 +208,9 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
}
else if (tFluids.length == 0) {
Utils.LOG_INFO("Input fluid not found");
- fakeRecipe = Recipe_GT.Gregtech_Recipe_Map.sMatterFab2Recipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], new FluidStack[]{tempFake}, new ItemStack[]{});
+ this.fakeRecipe = Recipe_GT.Gregtech_Recipe_Map.sMatterFab2Recipes.findRecipe(this.getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], new FluidStack[]{this.tempFake}, new ItemStack[]{});
- this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
+ this.mEfficiency = (10000 - ((this.getIdealStatus() - this.getRepairStatus()) * 1000));
this.mEfficiencyIncrease = 10000;
this.mEUt = 32;
@@ -225,13 +224,13 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
this.mEUt = (-this.mEUt);
}
- if (fakeRecipe != null) {
+ if (this.fakeRecipe != null) {
this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
- this.mOutputItems = new ItemStack[]{fakeRecipe.getOutput(0)};
- this.mOutputFluids = fakeRecipe.mFluidOutputs.clone();
- ArrayUtils.reverse(mOutputFluids);
- mMatterProduced++;
- updateSlots();
+ this.mOutputItems = new ItemStack[]{this.fakeRecipe.getOutput(0)};
+ this.mOutputFluids = this.fakeRecipe.mFluidOutputs.clone();
+ ArrayUtils.reverse(this.mOutputFluids);
+ this.mMatterProduced++;
+ this.updateSlots();
//Utils.LOG_INFO("Recipes Finished: "+mMatterProduced);
return true;
}
@@ -244,16 +243,16 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
}
@Override
- public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
- int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 2;
- int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 2;
+ public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
+ final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 2;
+ final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 2;
for (int i = -2; i < 3; i++) {
for (int j = -2; j < 3; j++) {
for (int h = 0; h < 4; h++) {
//Utils.LOG_INFO("Logging Variables - xDir:"+xDir+" zDir:"+zDir+" h:"+h+" i:"+i+" j:"+j);
- IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
+ final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
/*if (tTileEntity != Block.getBlockFromItem(UtilsItems.getItem("IC2:blockAlloyGlass"))) {
Utils.LOG_INFO("h:"+h+" i:"+i+" j:"+j);
double tX = tTileEntity.getXCoord();
@@ -262,7 +261,7 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
Utils.LOG_INFO("Found Glass at X:"+tX+" Y:"+tY+" Z:"+tZ);
//return false;
}*/
- if ((i != -2 && i != 2) && (j != -2 && j != 2)) {// innerer 3x3 ohne h�he
+ if (((i != -2) && (i != 2)) && ((j != -2) && (j != 2))) {// innerer 3x3 ohne h�he
if (h == 0) {// innen boden (kantal coils)
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
Utils.LOG_INFO("Matter Generation Coils missings from the bottom layer, inner 3x3.");
@@ -273,7 +272,7 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
return false;
}
} else if (h == 3) {// innen decke (ulv casings + input + muffler)
- if ((!addMufflerToMachineList(tTileEntity, 66))) {
+ if ((!this.addMufflerToMachineList(tTileEntity, 66))) {
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the top layers inner 3x3.");
return false;
@@ -291,8 +290,8 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
}
} else {// Outer 5x5
if (h == 0) {// au�en boden (controller, output, energy, maintainance, rest ulv casings)
- if ((!addMaintenanceToMachineList(tTileEntity, 66)) && (!addInputToMachineList(tTileEntity, 66)) && (!addOutputToMachineList(tTileEntity, 66)) && (!addEnergyInputToMachineList(tTileEntity, 66))) {
- if ((xDir + i != 0) || (zDir + j != 0)) {//no controller
+ if ((!this.addMaintenanceToMachineList(tTileEntity, 66)) && (!this.addInputToMachineList(tTileEntity, 66)) && (!this.addOutputToMachineList(tTileEntity, 66)) && (!this.addEnergyInputToMachineList(tTileEntity, 66))) {
+ if (((xDir + i) != 0) || ((zDir + j) != 0)) {//no controller
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the edges of the bottom layer.");
return false;
@@ -306,7 +305,7 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
} else {// au�en �ber boden (ulv casings)
if (h == 1) {
- if ((i == -2 || i == 2) && (j == -2 || j == 2)){
+ if (((i == -2) || (i == 2)) && ((j == -2) || (j == 2))){
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the corners in the second layer.");
return false;
@@ -317,7 +316,7 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
}
}
- else if ((i != -2 || i != 2) && (j != -2 || j != 2)){
+ else if (((i != -2) || (i != 2)) && ((j != -2) || (j != 2))){
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != IC2Glass) {
Utils.LOG_INFO("Glass Casings Missing from somewhere in the second layer.");
return false;
@@ -325,7 +324,7 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
}
}
if (h == 2) {
- if ((i == -2 || i == 2) && (j == -2 || j == 2)){
+ if (((i == -2) || (i == 2)) && ((j == -2) || (j == 2))){
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the corners in the third layer.");
return false;
@@ -336,7 +335,7 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
}
}
- else if ((i != -2 || i != 2) && (j != -2 || j != 2)){
+ else if (((i != -2) || (i != 2)) && ((j != -2) || (j != 2))){
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != IC2Glass) {
Utils.LOG_INFO("Glass Casings Missing from somewhere in the third layer.");
return false;
@@ -363,12 +362,12 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
}
@Override
- public int getMaxEfficiency(ItemStack aStack) {
+ public int getMaxEfficiency(final ItemStack aStack) {
return 10000;
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
+ public int getPollutionPerTick(final ItemStack aStack) {
return 0;
}
@@ -378,12 +377,12 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
}
@Override
- public boolean explodesOnComponentBreak(ItemStack aStack) {
+ public boolean explodesOnComponentBreak(final ItemStack aStack) {
return false;
}
@Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
return new GregtechMetaTileEntity_MassFabricator(this.mName);
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MultiTank.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MultiTank.java
index fec81aaa15..d8867f904d 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MultiTank.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MultiTank.java
@@ -1,5 +1,8 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi;
+import java.util.ArrayList;
+import java.util.Arrays;
+
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Textures;
import gregtech.api.gui.GT_GUIContainer_MultiMachine;
@@ -17,10 +20,6 @@ import gtPlusPlus.core.util.array.Pair;
import gtPlusPlus.core.util.fluid.FluidUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.init.Blocks;
@@ -32,83 +31,83 @@ import net.minecraftforge.fluids.FluidStack;
public class GregtechMetaTileEntity_MultiTank
extends GregtechMeta_MultiBlockBase {
- public GregtechMetaTileEntity_MultiTank(int aID, String aName, String aNameRegional) {
+ public GregtechMetaTileEntity_MultiTank(final int aID, final String aName, final String aNameRegional) {
super(aID, aName, aNameRegional);
}
private short multiblockCasingCount = 0;
private int mInternalSaveClock = 0;
- private short storageMultiplier = 1;
+ private final short storageMultiplier = 1;
private int maximumFluidStorage = 96000;
private FluidStack internalStorageTank = null;
- private NBTTagCompound internalCraftingComponentsTag = new NBTTagCompound();
+ private final NBTTagCompound internalCraftingComponentsTag = new NBTTagCompound();
@Override
public String[] getInfoData() {
- ArrayList<GT_MetaTileEntity_Hatch_Energy> mTier = this.mEnergyHatches;
+ final ArrayList<GT_MetaTileEntity_Hatch_Energy> mTier = this.mEnergyHatches;
if (!mTier.isEmpty()){
- int temp = mTier.get(0).mTier;
- if (internalStorageTank == null) {
+ final int temp = mTier.get(0).mTier;
+ if (this.internalStorageTank == null) {
return new String[]{
GT_Values.VOLTAGE_NAMES[temp]+" Large Fluid Tank",
"Stored Fluid: No Fluid",
"Internal | Current: "+Integer.toString(0) + "L",
- "Internal | Maximum: "+Integer.toString((int) maximumFluidStorage) + "L"};
+ "Internal | Maximum: "+Integer.toString(this.maximumFluidStorage) + "L"};
}
return new String[]{
GT_Values.VOLTAGE_NAMES[temp]+" Large Fluid Tank",
- "Stored Fluid: "+internalStorageTank.getLocalizedName(),
- "Internal | Current: "+Integer.toString(internalStorageTank.amount) + "L",
- "Internal | Maximum: "+Integer.toString((int) maximumFluidStorage) + "L"};
+ "Stored Fluid: "+this.internalStorageTank.getLocalizedName(),
+ "Internal | Current: "+Integer.toString(this.internalStorageTank.amount) + "L",
+ "Internal | Maximum: "+Integer.toString(this.maximumFluidStorage) + "L"};
}
return new String[]{
"Voltage Tier not set -" +" Large Fluid Tank",
"Stored Fluid: No Fluid",
"Internal | Current: "+Integer.toString(0) + "L",
- "Internal | Maximum: "+Integer.toString((int) maximumFluidStorage) + "L"};
+ "Internal | Maximum: "+Integer.toString(this.maximumFluidStorage) + "L"};
}
@Override
- public void saveNBTData(NBTTagCompound aNBT) {
+ public void saveNBTData(final NBTTagCompound aNBT) {
super.saveNBTData(aNBT);
- NBTTagCompound gtCraftingComponentsTag = aNBT.getCompoundTag("GT.CraftingComponents");
+ final NBTTagCompound gtCraftingComponentsTag = aNBT.getCompoundTag("GT.CraftingComponents");
if (gtCraftingComponentsTag != null){
-
+
Utils.LOG_WARNING("Got Crafting Tag");
-
- if (internalStorageTank != null){
- Utils.LOG_WARNING("mFluid was not null, Saving TileEntity NBT data.");
- gtCraftingComponentsTag.setString("xFluid", internalStorageTank.getFluid().getName());
- gtCraftingComponentsTag.setInteger("xAmount", internalStorageTank.amount);
- gtCraftingComponentsTag.setLong("xAmountMax", maximumFluidStorage);
+ if (this.internalStorageTank != null){
+ Utils.LOG_WARNING("mFluid was not null, Saving TileEntity NBT data.");
- aNBT.setTag("GT.CraftingComponents", gtCraftingComponentsTag);
- }
- else {
- Utils.LOG_WARNING("mFluid was null, Saving TileEntity NBT data.");
- gtCraftingComponentsTag.removeTag("xFluid");
- gtCraftingComponentsTag.removeTag("xAmount");
- gtCraftingComponentsTag.removeTag("xAmountMax");
- gtCraftingComponentsTag.setLong("xAmountMax", maximumFluidStorage);
+ gtCraftingComponentsTag.setString("xFluid", this.internalStorageTank.getFluid().getName());
+ gtCraftingComponentsTag.setInteger("xAmount", this.internalStorageTank.amount);
+ gtCraftingComponentsTag.setLong("xAmountMax", this.maximumFluidStorage);
+ aNBT.setTag("GT.CraftingComponents", gtCraftingComponentsTag);
+ }
+ else {
+ Utils.LOG_WARNING("mFluid was null, Saving TileEntity NBT data.");
+ gtCraftingComponentsTag.removeTag("xFluid");
+ gtCraftingComponentsTag.removeTag("xAmount");
+ gtCraftingComponentsTag.removeTag("xAmountMax");
+ gtCraftingComponentsTag.setLong("xAmountMax", this.maximumFluidStorage);
- aNBT.setTag("GT.CraftingComponents", gtCraftingComponentsTag);
- }
+
+ aNBT.setTag("GT.CraftingComponents", gtCraftingComponentsTag);
+ }
}
}
-
+
@Override
- public void loadNBTData(NBTTagCompound aNBT) {
- super.loadNBTData(aNBT);
- NBTTagCompound gtCraftingComponentsTag = aNBT.getCompoundTag("GT.CraftingComponents");
+ public void loadNBTData(final NBTTagCompound aNBT) {
+ super.loadNBTData(aNBT);
+ final NBTTagCompound gtCraftingComponentsTag = aNBT.getCompoundTag("GT.CraftingComponents");
String xFluid = null;
int xAmount = 0;
if (gtCraftingComponentsTag.hasNoTags()){
- if (internalStorageTank != null){
+ if (this.internalStorageTank != null){
Utils.LOG_WARNING("mFluid was not null, Creating TileEntity NBT data.");
- gtCraftingComponentsTag.setInteger("xAmount", internalStorageTank.amount);
- gtCraftingComponentsTag.setString("xFluid", internalStorageTank.getFluid().getName());
+ gtCraftingComponentsTag.setInteger("xAmount", this.internalStorageTank.amount);
+ gtCraftingComponentsTag.setString("xFluid", this.internalStorageTank.getFluid().getName());
aNBT.setTag("GT.CraftingComponents", gtCraftingComponentsTag);
}
}
@@ -124,76 +123,76 @@ extends GregtechMeta_MultiBlockBase {
Utils.LOG_WARNING("xAmount was not null, Loading TileEntity NBT data.");
xAmount = gtCraftingComponentsTag.getInteger("xAmount");
}
- if (xFluid != null && xAmount != 0){
+ if ((xFluid != null) && (xAmount != 0)){
Utils.LOG_WARNING("Setting Internal Tank, loading "+xAmount+"L of "+xFluid);
- setInternalTank(xFluid, xAmount);
+ this.setInternalTank(xFluid, xAmount);
}
}
}
-
- private boolean setInternalTank(String fluidName, int amount){
- FluidStack temp = FluidUtils.getFluidStack(fluidName, amount);
+
+ private boolean setInternalTank(final String fluidName, final int amount){
+ final FluidStack temp = FluidUtils.getFluidStack(fluidName, amount);
if (temp != null){
- if (internalStorageTank == null){
- internalStorageTank = temp;
+ if (this.internalStorageTank == null){
+ this.internalStorageTank = temp;
Utils.LOG_WARNING(temp.getFluid().getName()+" Amount: "+temp.amount+"L");
}
else{
Utils.LOG_WARNING("Retained Fluid.");
- Utils.LOG_WARNING(internalStorageTank.getFluid().getName()+" Amxount: "+internalStorageTank.amount+"L");
+ Utils.LOG_WARNING(this.internalStorageTank.getFluid().getName()+" Amxount: "+this.internalStorageTank.amount+"L");
}
- markDirty();
+ this.markDirty();
return true;
}
return false;
}
-
+
@Override
- public void onLeftclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
- tryForceNBTUpdate();
+ public void onLeftclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) {
+ this.tryForceNBTUpdate();
super.onLeftclick(aBaseMetaTileEntity, aPlayer);
}
-
+
@Override
- public boolean onWrenchRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- tryForceNBTUpdate();
+ public boolean onWrenchRightClick(final byte aSide, final byte aWrenchingSide, final EntityPlayer aPlayer, final float aX, final float aY, final float aZ) {
+ this.tryForceNBTUpdate();
return super.onWrenchRightClick(aSide, aWrenchingSide, aPlayer, aX, aY, aZ);
}
-
+
@Override
public void onRemoval() {
- tryForceNBTUpdate();
+ this.tryForceNBTUpdate();
super.onRemoval();
}
-
+
@Override
- public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) {
super.onPostTick(aBaseMetaTileEntity, aTick);
- if (internalStorageTank.amount >= maximumFluidStorage){
- if (internalStorageTank.amount > maximumFluidStorage){
- internalStorageTank.amount = (int) maximumFluidStorage;
+ if (this.internalStorageTank.amount >= this.maximumFluidStorage){
+ if (this.internalStorageTank.amount > this.maximumFluidStorage){
+ this.internalStorageTank.amount = this.maximumFluidStorage;
}
this.stopMachine();
}
-
- if (mInternalSaveClock != 20){
- mInternalSaveClock++;
+
+ if (this.mInternalSaveClock != 20){
+ this.mInternalSaveClock++;
}
else {
- mInternalSaveClock = 0;
- tryForceNBTUpdate();
+ this.mInternalSaveClock = 0;
+ this.tryForceNBTUpdate();
}
- }
+ }
- public GregtechMetaTileEntity_MultiTank(String aName) {
+ public GregtechMetaTileEntity_MultiTank(final String aName) {
super(aName);
}
@Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
return new GregtechMetaTileEntity_MultiTank(this.mName);
}
@@ -201,11 +200,11 @@ extends GregtechMeta_MultiBlockBase {
public String[] getDescription() {
return new String[]{
"Controller Block for the Multitank",
- "Size: 3xHx3 (Block behind controller must be air)",
+ "Size: 3xHx3 (Block behind controller must be air)",
"Structure must be at least 4 blocks tall, maximum 20.",
"Each casing within the structure adds 96000L storage.",
"Controller (front centered)",
- "1x Input hatch (anywhere)",
+ "1x Input hatch (anywhere)",
"1x Output hatch (anywhere)",
"1x Energy Hatch (anywhere)",
"1x Maintenance Hatch (anywhere)",
@@ -214,7 +213,7 @@ extends GregtechMeta_MultiBlockBase {
}
@Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
+ 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[68], new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Screen_Logo : TexturesGtBlock.Overlay_Machine_Screen_Logo)};
}
@@ -222,8 +221,8 @@ extends GregtechMeta_MultiBlockBase {
}
@Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "VacuumFreezer.png");
+ public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "VacuumFreezer.png");
}
@Override
@@ -232,18 +231,18 @@ extends GregtechMeta_MultiBlockBase {
}
@Override
- public boolean isFacingValid(byte aFacing) {
+ public boolean isFacingValid(final byte aFacing) {
return aFacing > 1;
}
@Override
- public boolean checkRecipe(ItemStack aStack) {
+ public boolean checkRecipe(final ItemStack aStack) {
- ArrayList<ItemStack> tInputList = getStoredInputs();
- for (int i = 0; i < tInputList.size() - 1; i++) {
+ final ArrayList<ItemStack> tInputList = this.getStoredInputs();
+ for (int i = 0; i < (tInputList.size() - 1); i++) {
for (int j = i + 1; j < tInputList.size(); j++) {
- if (GT_Utility.areStacksEqual((ItemStack) tInputList.get(i), (ItemStack) tInputList.get(j))) {
- if (((ItemStack) tInputList.get(i)).stackSize >= ((ItemStack) tInputList.get(j)).stackSize) {
+ if (GT_Utility.areStacksEqual(tInputList.get(i), tInputList.get(j))) {
+ if (tInputList.get(i).stackSize >= tInputList.get(j).stackSize) {
tInputList.remove(j--);
} else {
tInputList.remove(i--);
@@ -252,13 +251,13 @@ extends GregtechMeta_MultiBlockBase {
}
}
}
- ItemStack[] tInputs = (ItemStack[]) Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2);
+ final ItemStack[] tInputs = Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2);
- ArrayList<FluidStack> tFluidList = getStoredFluids();
- for (int i = 0; i < tFluidList.size() - 1; i++) {
+ final ArrayList<FluidStack> tFluidList = this.getStoredFluids();
+ for (int i = 0; i < (tFluidList.size() - 1); i++) {
for (int j = i + 1; j < tFluidList.size(); j++) {
- if (GT_Utility.areFluidsEqual((FluidStack) tFluidList.get(i), (FluidStack) tFluidList.get(j))) {
- if (((FluidStack) tFluidList.get(i)).amount >= ((FluidStack) tFluidList.get(j)).amount) {
+ if (GT_Utility.areFluidsEqual(tFluidList.get(i), tFluidList.get(j))) {
+ if (tFluidList.get(i).amount >= tFluidList.get(j).amount) {
tFluidList.remove(j--);
} else {
tFluidList.remove(i--);
@@ -267,92 +266,93 @@ extends GregtechMeta_MultiBlockBase {
}
}
}
- FluidStack[] tFluids = (FluidStack[]) Arrays.copyOfRange(tFluidList.toArray(new FluidStack[1]), 0, 1);
+ final FluidStack[] tFluids = Arrays.copyOfRange(tFluidList.toArray(new FluidStack[1]), 0, 1);
if (tFluids.length >= 2){
Utils.LOG_WARNING("Bad");
return false;
}
- ArrayList<Pair<GT_MetaTileEntity_Hatch_Input, Boolean>> rList = new ArrayList<Pair<GT_MetaTileEntity_Hatch_Input, Boolean>>();
+ final ArrayList<Pair<GT_MetaTileEntity_Hatch_Input, Boolean>> rList = new ArrayList<>();
int slotInputCount = 0;
- for (GT_MetaTileEntity_Hatch_Input tHatch : mInputHatches) {
+ for (final GT_MetaTileEntity_Hatch_Input tHatch : this.mInputHatches) {
boolean containsFluid = false;
if (isValidMetaTileEntity(tHatch)) {
slotInputCount++;
for (int i=0; i<tHatch.getBaseMetaTileEntity().getSizeInventory(); i++) {
- if (tHatch.canTankBeEmptied()){containsFluid=true;}
+ if (tHatch.canTankBeEmptied()){containsFluid=true;}
}
- rList.add(new Pair<GT_MetaTileEntity_Hatch_Input, Boolean>(tHatch, containsFluid));
+ rList.add(new Pair<>(tHatch, containsFluid));
}
}
- if (tFluids.length <= 0 || slotInputCount > 1){
+ if ((tFluids.length <= 0) || (slotInputCount > 1)){
Utils.LOG_WARNING("Bad");
return false;
}
- Utils.LOG_WARNING("Okay - 2");
- if (internalStorageTank == null){
- Utils.LOG_WARNING("Okay - 3");
- if (rList.get(0).getKey().mFluid != null && rList.get(0).getKey().mFluid.amount > 0){
- Utils.LOG_WARNING("Okay - 4");
- Utils.LOG_WARNING("Okay - 1"+" rList.get(0).getKey().mFluid.amount: "+rList.get(0).getKey().mFluid.amount /*+" internalStorageTank:"+internalStorageTank.amount*/);
- FluidStack tempFluidStack = rList.get(0).getKey().mFluid;
- Fluid tempFluid = tempFluidStack.getFluid();
- internalStorageTank = FluidUtils.getFluidStack(tempFluid.getName(), tempFluidStack.amount);
+ Utils.LOG_WARNING("Okay - 2");
+ if (this.internalStorageTank == null){
+ Utils.LOG_WARNING("Okay - 3");
+ if ((rList.get(0).getKey().mFluid != null) && (rList.get(0).getKey().mFluid.amount > 0)){
+ Utils.LOG_WARNING("Okay - 4");
+ Utils.LOG_WARNING("Okay - 1"+" rList.get(0).getKey().mFluid.amount: "+rList.get(0).getKey().mFluid.amount /*+" internalStorageTank:"+internalStorageTank.amount*/);
+ final FluidStack tempFluidStack = rList.get(0).getKey().mFluid;
+ final Fluid tempFluid = tempFluidStack.getFluid();
+ this.internalStorageTank = FluidUtils.getFluidStack(tempFluid.getName(), tempFluidStack.amount);
rList.get(0).getKey().mFluid.amount = 0;
- Utils.LOG_WARNING("Okay - 1.1"+" rList.get(0).getKey().mFluid.amount: "+rList.get(0).getKey().mFluid.amount +" internalStorageTank:"+internalStorageTank.amount);
+ Utils.LOG_WARNING("Okay - 1.1"+" rList.get(0).getKey().mFluid.amount: "+rList.get(0).getKey().mFluid.amount +" internalStorageTank:"+this.internalStorageTank.amount);
return true;
}
Utils.LOG_WARNING("No Fluid in hatch.");
- return false;
+ return false;
}
- else if (internalStorageTank.isFluidEqual(rList.get(0).getKey().mFluid)){
+ else if (this.internalStorageTank.isFluidEqual(rList.get(0).getKey().mFluid)){
Utils.LOG_WARNING("Storing "+rList.get(0).getKey().mFluid.amount+"L");
- Utils.LOG_WARNING("Contains "+internalStorageTank.amount+"L");
+ Utils.LOG_WARNING("Contains "+this.internalStorageTank.amount+"L");
int tempAdd = 0;
tempAdd = rList.get(0).getKey().getFluidAmount();
- rList.get(0).getKey().mFluid = null;
+ rList.get(0).getKey().mFluid = null;
Utils.LOG_WARNING("adding "+tempAdd);
- internalStorageTank.amount = internalStorageTank.amount + tempAdd;
- Utils.LOG_WARNING("Tank now Contains "+internalStorageTank.amount+"L of "+internalStorageTank.getFluid().getName()+".");
+ this.internalStorageTank.amount = this.internalStorageTank.amount + tempAdd;
+ Utils.LOG_WARNING("Tank now Contains "+this.internalStorageTank.amount+"L of "+this.internalStorageTank.getFluid().getName()+".");
//Utils.LOG_WARNING("Tank");
return true;
}
else {
- FluidStack superTempFluidStack = rList.get(0).getKey().mFluid;
- Utils.LOG_WARNING("is input fluid equal to stored fluid? "+(internalStorageTank.isFluidEqual(superTempFluidStack)));
- if (superTempFluidStack != null)
+ final FluidStack superTempFluidStack = rList.get(0).getKey().mFluid;
+ Utils.LOG_WARNING("is input fluid equal to stored fluid? "+(this.internalStorageTank.isFluidEqual(superTempFluidStack)));
+ if (superTempFluidStack != null) {
Utils.LOG_WARNING("Input hatch[0] Contains "+superTempFluidStack.amount+"L of "+superTempFluidStack.getFluid().getName()+".");
- Utils.LOG_WARNING("Large Multi-Tank Contains "+internalStorageTank.amount+"L of "+internalStorageTank.getFluid().getName()+".");
+ }
+ Utils.LOG_WARNING("Large Multi-Tank Contains "+this.internalStorageTank.amount+"L of "+this.internalStorageTank.getFluid().getName()+".");
- if (internalStorageTank.amount <= 0){
+ if (this.internalStorageTank.amount <= 0){
Utils.LOG_WARNING("Internal Tank is empty, sitting idle.");
return false;
}
- if (mOutputHatches.get(0).mFluid == null || mOutputHatches.isEmpty() || (mOutputHatches.get(0).mFluid.isFluidEqual(internalStorageTank) && mOutputHatches.get(0).mFluid.amount < mOutputHatches.get(0).getCapacity())){
- Utils.LOG_WARNING("Okay - 3");
- int tempCurrentStored = internalStorageTank.amount;
+ if ((this.mOutputHatches.get(0).mFluid == null) || this.mOutputHatches.isEmpty() || (this.mOutputHatches.get(0).mFluid.isFluidEqual(this.internalStorageTank) && (this.mOutputHatches.get(0).mFluid.amount < this.mOutputHatches.get(0).getCapacity()))){
+ Utils.LOG_WARNING("Okay - 3");
+ final int tempCurrentStored = this.internalStorageTank.amount;
int tempResult = 0;
- int tempHatchSize = mOutputHatches.get(0).getCapacity();
- int tempHatchCurrentHolding = mOutputHatches.get(0).getFluidAmount();
- int tempHatchRemainingSpace = tempHatchSize - tempHatchCurrentHolding;
- FluidStack tempOutputFluid = internalStorageTank;
+ final int tempHatchSize = this.mOutputHatches.get(0).getCapacity();
+ final int tempHatchCurrentHolding = this.mOutputHatches.get(0).getFluidAmount();
+ final int tempHatchRemainingSpace = tempHatchSize - tempHatchCurrentHolding;
+ final FluidStack tempOutputFluid = this.internalStorageTank;
if (tempHatchRemainingSpace <= 0){
return false;
}
- Utils.LOG_WARNING("Okay - 3.1.x"+" hatchCapacity: "+tempHatchSize +" tempCurrentStored: "+tempCurrentStored+" output hatch holds: "+tempHatchCurrentHolding+" tank has "+tempHatchRemainingSpace+"L of space left.");
+ Utils.LOG_WARNING("Okay - 3.1.x"+" hatchCapacity: "+tempHatchSize +" tempCurrentStored: "+tempCurrentStored+" output hatch holds: "+tempHatchCurrentHolding+" tank has "+tempHatchRemainingSpace+"L of space left.");
if (tempHatchSize >= tempHatchRemainingSpace){
- Utils.LOG_WARNING("Okay - 3.1.1"+" hatchCapacity: "+tempHatchSize +" tempCurrentStored: "+tempCurrentStored+" output hatch holds: "+tempHatchCurrentHolding+" tank has "+tempHatchRemainingSpace+"L of space left.");
+ Utils.LOG_WARNING("Okay - 3.1.1"+" hatchCapacity: "+tempHatchSize +" tempCurrentStored: "+tempCurrentStored+" output hatch holds: "+tempHatchCurrentHolding+" tank has "+tempHatchRemainingSpace+"L of space left.");
int adder;
- if (tempCurrentStored > 0 && tempCurrentStored <= tempHatchSize){
+ if ((tempCurrentStored > 0) && (tempCurrentStored <= tempHatchSize)){
adder = tempCurrentStored;
if (adder >= tempHatchRemainingSpace){
adder = tempHatchRemainingSpace;
@@ -367,11 +367,11 @@ extends GregtechMeta_MultiBlockBase {
tempResult = adder;
tempOutputFluid.amount = tempResult;
- Utils.LOG_WARNING("Okay - 3.1.2"+" result: "+tempResult +" tempCurrentStored: "+tempCurrentStored + " filling output hatch with: "+tempOutputFluid.amount+"L of "+tempOutputFluid.getFluid().getName());
- mOutputHatches.get(0).fill(tempOutputFluid, true);
+ Utils.LOG_WARNING("Okay - 3.1.2"+" result: "+tempResult +" tempCurrentStored: "+tempCurrentStored + " filling output hatch with: "+tempOutputFluid.amount+"L of "+tempOutputFluid.getFluid().getName());
+ this.mOutputHatches.get(0).fill(tempOutputFluid, true);
//mOutputHatches.get(0).mFluid.amount = tempResult;
- internalStorageTank.amount = (tempCurrentStored-adder);
- Utils.LOG_WARNING("Okay - 3.1.3"+" internalTankStorage: "+internalStorageTank.amount +"L | output hatch contains: "+mOutputHatches.get(0).mFluid.amount+"L of "+mOutputHatches.get(0).mFluid.getFluid().getName());
+ this.internalStorageTank.amount = (tempCurrentStored-adder);
+ Utils.LOG_WARNING("Okay - 3.1.3"+" internalTankStorage: "+this.internalStorageTank.amount +"L | output hatch contains: "+this.mOutputHatches.get(0).mFluid.amount+"L of "+this.mOutputHatches.get(0).mFluid.getFluid().getName());
/*if (internalStorageTank.amount <= 0)
internalStorageTank = null;*/
}
@@ -379,15 +379,15 @@ extends GregtechMeta_MultiBlockBase {
return true;
}
}
- //this.getBaseMetaTileEntity().(tFluids[0].amount, true);
+ //this.getBaseMetaTileEntity().(tFluids[0].amount, true);
Utils.LOG_WARNING("Tank");
return false;
}
@Override
- public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
- int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
- int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
+ public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
+ final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
+ final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
if (!aBaseMetaTileEntity.getAirOffset(xDir, 0, zDir)) {
Utils.LOG_WARNING("Must be hollow.");
return false;
@@ -396,9 +396,9 @@ extends GregtechMeta_MultiBlockBase {
for (int i = -1; i < 2; i++) {
for (int j = -1; j < 2; j++) {
for (int h = -1; h < 19; h++) {
- if ((h != 0) || (((xDir + i != 0) || (zDir + j != 0)) && ((i != 0) || (j != 0)))) {
- IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
- if ((!addMaintenanceToMachineList(tTileEntity, 68)) && (!addInputToMachineList(tTileEntity, 68)) && (!addOutputToMachineList(tTileEntity, 68)) && (!addEnergyInputToMachineList(tTileEntity, 68))) {
+ if ((h != 0) || ((((xDir + i) != 0) || ((zDir + j) != 0)) && ((i != 0) || (j != 0)))) {
+ final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
+ if ((!this.addMaintenanceToMachineList(tTileEntity, 68)) && (!this.addInputToMachineList(tTileEntity, 68)) && (!this.addOutputToMachineList(tTileEntity, 68)) && (!this.addEnergyInputToMachineList(tTileEntity, 68))) {
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
if (h < 3){
Utils.LOG_WARNING("Casing Expected.");
@@ -421,7 +421,7 @@ extends GregtechMeta_MultiBlockBase {
tAmount++;
}
else if (h >= 3){
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) == Blocks.air || aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getUnlocalizedName().contains("residual")){
+ if ((aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) == Blocks.air) || aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getUnlocalizedName().contains("residual")){
Utils.LOG_WARNING("Found air");
}
else {
@@ -434,21 +434,21 @@ extends GregtechMeta_MultiBlockBase {
}
}
}
- multiblockCasingCount = (short) tAmount;
- maximumFluidStorage = getMaximumTankStorage(tAmount);
+ this.multiblockCasingCount = (short) tAmount;
+ this.maximumFluidStorage = getMaximumTankStorage(tAmount);
Utils.LOG_INFO("Your Multitank can be 20 blocks tall.");
- Utils.LOG_INFO("Casings Count: "+multiblockCasingCount+" Valid Multiblock: "+(tAmount >= 16)+" Tank Storage Capacity:"+maximumFluidStorage+"L");
- tryForceNBTUpdate();
+ Utils.LOG_INFO("Casings Count: "+this.multiblockCasingCount+" Valid Multiblock: "+(tAmount >= 16)+" Tank Storage Capacity:"+this.maximumFluidStorage+"L");
+ this.tryForceNBTUpdate();
return tAmount >= 16;
}
-
+
/*public int countCasings() {
Utils.LOG_INFO("Counting Machine Casings");
try{
if (this.getBaseMetaTileEntity().getWorld() == null){
Utils.LOG_INFO("Tile Entity's world was null for casing count.");
return 0;
- }
+ }
if (this.getBaseMetaTileEntity() == null){
Utils.LOG_INFO("Tile Entity was null for casing count.");
return 0;
@@ -515,12 +515,12 @@ extends GregtechMeta_MultiBlockBase {
}*/
@Override
- public int getMaxEfficiency(ItemStack aStack) {
+ public int getMaxEfficiency(final ItemStack aStack) {
return 10000;
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
+ public int getPollutionPerTick(final ItemStack aStack) {
return 0;
}
@@ -530,29 +530,29 @@ extends GregtechMeta_MultiBlockBase {
}
@Override
- public boolean explodesOnComponentBreak(ItemStack aStack) {
+ public boolean explodesOnComponentBreak(final ItemStack aStack) {
return false;
}
-
- private static short getStorageMultiplier(int casingCount){
- int tsm = 1*casingCount;
- if (tsm <= 0){
- return 1;
+
+ private static short getStorageMultiplier(final int casingCount){
+ final int tsm = 1*casingCount;
+ if (tsm <= 0){
+ return 1;
}
return (short) tsm;
}
-
- private static int getMaximumTankStorage(int casingCount){
- int multiplier = getStorageMultiplier(casingCount);
- int tempTankStorageMax = 96000*multiplier;
+
+ private static int getMaximumTankStorage(final int casingCount){
+ final int multiplier = getStorageMultiplier(casingCount);
+ final int tempTankStorageMax = 96000*multiplier;
if (tempTankStorageMax <= 0){return 96000;}
return tempTankStorageMax;
}
-
+
private boolean tryForceNBTUpdate(){
//Block is invalid.
- if (this == null || this.getBaseMetaTileEntity() == null){
+ if ((this == null) || (this.getBaseMetaTileEntity() == null)){
Utils.LOG_WARNING("Block was not valid for saving data.");
return false;
}
@@ -564,17 +564,17 @@ extends GregtechMeta_MultiBlockBase {
//Internal Tag was not valid.
try{
- if (internalCraftingComponentsTag == null){
- Utils.LOG_WARNING("Internal NBT data tag was null.");
- return false;
- }
- } catch (NullPointerException x){
+ if (this.internalCraftingComponentsTag == null){
+ Utils.LOG_WARNING("Internal NBT data tag was null.");
+ return false;
+ }
+ } catch (final NullPointerException x){
Utils.LOG_WARNING("Caught null NBT.");
}
//Internal tag was valid.
- saveNBTData(internalCraftingComponentsTag);
-
+ this.saveNBTData(this.internalCraftingComponentsTag);
+
//Mark block for update
int x,y,z = 0;
@@ -585,6 +585,6 @@ extends GregtechMeta_MultiBlockBase {
//Mark block dirty, let chunk know it's data has changed and it must be saved to disk. (Albeit slowly)
this.getBaseMetaTileEntity().markDirty();
- return true;
+ return true;
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_PowerSubStationController.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_PowerSubStationController.java
index 45635ea74d..a924e1418d 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_PowerSubStationController.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_PowerSubStationController.java
@@ -17,13 +17,13 @@ import net.minecraftforge.common.util.ForgeDirection;
public class GregtechMetaTileEntity_PowerSubStationController extends GT_MetaTileEntity_MultiBlockBase {
- private int recipeCounter = 0;
+ private final int recipeCounter = 0;
- public GregtechMetaTileEntity_PowerSubStationController(int aID, String aName, String aNameRegional) {
+ public GregtechMetaTileEntity_PowerSubStationController(final int aID, final String aName, final String aNameRegional) {
super(aID, aName, aNameRegional);
}
- public GregtechMetaTileEntity_PowerSubStationController(String aName) {
+ public GregtechMetaTileEntity_PowerSubStationController(final String aName) {
super(aName);
}
@@ -37,7 +37,7 @@ public class GregtechMetaTileEntity_PowerSubStationController extends GT_MetaTil
}
@Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
+ 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[67],
new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER)};
@@ -46,31 +46,31 @@ public class GregtechMetaTileEntity_PowerSubStationController extends GT_MetaTil
}
@Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "MatterFabricator.png");
+ public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "MatterFabricator.png");
}
@Override
- public void onConfigLoad(GT_Config aConfig) {
+ public void onConfigLoad(final GT_Config aConfig) {
super.onConfigLoad(aConfig);
}
@Override
- public boolean checkRecipe(ItemStack aStack) {
+ public boolean checkRecipe(final ItemStack aStack) {
return false;
}
@Override
- public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
- int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
- int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
+ public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
+ final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
+ final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
for (int i = -2; i < 3; i++) {
for (int j = -2; j < 3; j++) {
for (int h = 0; h < 4; h++) {
//Utils.LOG_INFO("Logging Variables - xDir:"+xDir+" zDir:"+zDir+" h:"+h+" i:"+i+" j:"+j);
- IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
+ final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
/*if (tTileEntity != Block.getBlockFromItem(UtilsItems.getItem("IC2:blockAlloyGlass"))) {
Utils.LOG_INFO("h:"+h+" i:"+i+" j:"+j);
double tX = tTileEntity.getXCoord();
@@ -79,8 +79,8 @@ public class GregtechMetaTileEntity_PowerSubStationController extends GT_MetaTil
Utils.LOG_INFO("Found Glass at X:"+tX+" Y:"+tY+" Z:"+tZ);
//return false;
}*/
- if ((i != -2 && i != 2) && (j != -2 && j != 2)) {// innerer 3x3 ohne h�he
- if (h == 0 && i != 0 && j != 0) {// innen boden (kantal coils)
+ if (((i != -2) && (i != 2)) && ((j != -2) && (j != 2))) {// innerer 3x3 ohne h�he
+ if ((h == 0) && (i != 0) && (j != 0)) {// innen boden (kantal coils)
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
Utils.LOG_INFO("Matter Generation Coils missings from the bottom layer, inner 3x3. - Wrong Block");
Utils.LOG_INFO("Found: "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getUnlocalizedName()+" at x:"+(xDir + i)+" y:" +h+" z:"+(zDir + j));
@@ -92,24 +92,24 @@ public class GregtechMetaTileEntity_PowerSubStationController extends GT_MetaTil
Utils.LOG_INFO("Matter Generation Coils missings from the bottom layer, inner 3x3. - Wrong Meta");
return false;
}
- }
- else if (h == 3 && i != 0 && j != 0) {// innen decke (ulv casings + input + muffler)
- //if(j == 0 && i == 0) {
-
- if ((!addMufflerToMachineList(tTileEntity, 66))) {
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
- Utils.LOG_INFO("Found: "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getUnlocalizedName()+" at x:"+(xDir + i)+" y:" +h+" z:"+(zDir + j));
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the top layers inner 3x3.");
- return false;
- }
- if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 4) {
- Utils.LOG_INFO("Found: "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getUnlocalizedName()+" at x:"+(xDir + i)+" y:" +h+" z:"+(zDir + j));
- Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the top layers inner 3x3.");
- return false;
- }
- }
+ }
+ else if ((h == 3) && (i != 0) && (j != 0)) {// innen decke (ulv casings + input + muffler)
+ //if(j == 0 && i == 0) {
+
+ if ((!this.addMufflerToMachineList(tTileEntity, 66))) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
+ Utils.LOG_INFO("Found: "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getUnlocalizedName()+" at x:"+(xDir + i)+" y:" +h+" z:"+(zDir + j));
+ Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the top layers inner 3x3.");
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 4) {
+ Utils.LOG_INFO("Found: "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getUnlocalizedName()+" at x:"+(xDir + i)+" y:" +h+" z:"+(zDir + j));
+ Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the top layers inner 3x3.");
+ return false;
+ }
+ }
//}
-
+
} /*else {// top air
if ((i != -2 && i != 2) && (j != -2 && j != 2) && h == 3) {
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
@@ -123,12 +123,12 @@ public class GregtechMetaTileEntity_PowerSubStationController extends GT_MetaTil
Utils.LOG_INFO("Matter Generation Coils missings from the top layer, inner 3x3. - Wrong Meta");
return false;
}
- }
+ }
}*/
} else {// Outer 5x5
if (h == 0) {// au�en boden (controller, output, energy, maintainance, rest ulv casings)
- if ((!addEnergyInputToMachineList(tTileEntity, 66) && (!addDynamoToMachineList(tTileEntity, 66)))) {
- if ((xDir + i != 0) || (zDir + j != 0)) {//no controller
+ if ((!this.addEnergyInputToMachineList(tTileEntity, 66) && (!this.addDynamoToMachineList(tTileEntity, 66)))) {
+ if (((xDir + i) != 0) || ((zDir + j) != 0)) {//no controller
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) {
Utils.LOG_INFO("Found: "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getUnlocalizedName()+" at x:"+(xDir + i)+" y:" +h+" z:"+(zDir + j));
Utils.LOG_INFO("Matter Fabricator Casings Missing from one of the edges of the bottom layer. "+(aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()));
@@ -141,7 +141,7 @@ public class GregtechMetaTileEntity_PowerSubStationController extends GT_MetaTil
}
}
} else {
-
+
}
}
}
@@ -152,22 +152,22 @@ public class GregtechMetaTileEntity_PowerSubStationController extends GT_MetaTil
}
@Override
- public boolean isCorrectMachinePart(ItemStack aStack) {
+ public boolean isCorrectMachinePart(final ItemStack aStack) {
return true;
}
@Override
- public int getMaxEfficiency(ItemStack aStack) {
+ public int getMaxEfficiency(final ItemStack aStack) {
return 10000;
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
+ public int getPollutionPerTick(final ItemStack aStack) {
return 0;
}
@Override
- public int getDamageToComponent(ItemStack aStack) {
+ public int getDamageToComponent(final ItemStack aStack) {
return 0;
}
@@ -177,12 +177,12 @@ public class GregtechMetaTileEntity_PowerSubStationController extends GT_MetaTil
}
@Override
- public boolean explodesOnComponentBreak(ItemStack aStack) {
+ public boolean explodesOnComponentBreak(final ItemStack aStack) {
return false;
}
@Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
return new GregtechMetaTileEntity_PowerSubStationController(this.mName);
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_Refinery.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_Refinery.java
index 5ff1239ce3..2b58c09daa 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_Refinery.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_Refinery.java
@@ -1,6 +1,9 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi;
import static gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks2.GTID;
+
+import java.util.ArrayList;
+
import gregtech.api.enums.Textures;
import gregtech.api.gui.GT_GUIContainer_MultiMachine;
import gregtech.api.interfaces.ITexture;
@@ -12,9 +15,6 @@ import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.util.Utils;
-
-import java.util.ArrayList;
-
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
@@ -25,14 +25,15 @@ public class GregtechMetaTileEntity_Refinery extends GT_MetaTileEntity_MultiBloc
private boolean completedCycle = false;
- public GregtechMetaTileEntity_Refinery(int aID, String aName, String aNameRegional) {
+ public GregtechMetaTileEntity_Refinery(final int aID, final String aName, final String aNameRegional) {
super(aID, aName, aNameRegional);
}
- public GregtechMetaTileEntity_Refinery(String aName) {
+ public GregtechMetaTileEntity_Refinery(final String aName) {
super(aName);
}
+ @Override
public String[] getDescription() {
return new String[]{
"Controller Block for the Fission Fuel Processing Unit",
@@ -49,21 +50,23 @@ public class GregtechMetaTileEntity_Refinery extends GT_MetaTileEntity_MultiBloc
"1x Energy Hatch (One of base platform)"};
}
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
+ @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[GTID+2], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_MULTI_SMELTER)};
}
return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[GTID+2]};
}
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "LFTR.png");
+ @Override
+ public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "LFTR.png");
}
@Override
- public boolean checkRecipe(ItemStack aStack) {
- if (mInventory[1] == null || (mInventory[1].isItemEqual(GT_ModHandler.getIC2Item("miningPipe", 1L)) && mInventory[1].stackSize < mInventory[1].getMaxStackSize())) {
- ArrayList<ItemStack> tItems = getStoredInputs();
+ public boolean checkRecipe(final ItemStack aStack) {
+ if ((this.mInventory[1] == null) || (this.mInventory[1].isItemEqual(GT_ModHandler.getIC2Item("miningPipe", 1L)) && (this.mInventory[1].stackSize < this.mInventory[1].getMaxStackSize()))) {
+ final ArrayList<ItemStack> tItems = this.getStoredInputs();
for (ItemStack tStack : tItems) {
if (tStack.isItemEqual(GT_ModHandler.getIC2Item("miningPipe", 1L))) {
if (tStack.stackSize < 2) {
@@ -73,10 +76,10 @@ public class GregtechMetaTileEntity_Refinery extends GT_MetaTileEntity_MultiBloc
}
}
- if (mInventory[1] == null) {
- mInventory[1] = GT_ModHandler.getIC2Item("miningPipe", 1L);
+ if (this.mInventory[1] == null) {
+ this.mInventory[1] = GT_ModHandler.getIC2Item("miningPipe", 1L);
} else {
- mInventory[1].stackSize++;
+ this.mInventory[1].stackSize++;
}
}
}
@@ -84,28 +87,29 @@ public class GregtechMetaTileEntity_Refinery extends GT_MetaTileEntity_MultiBloc
if (tFluid == null) {
return false;
}
- if (getYOfPumpHead() > 0 && getBaseMetaTileEntity().getBlockOffset(ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetX, getYOfPumpHead() - 1 - getBaseMetaTileEntity().getYCoord(), ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetZ) != Blocks.bedrock) {
- if (completedCycle) {
- moveOneDown();
+ if ((this.getYOfPumpHead() > 0) && (this.getBaseMetaTileEntity().getBlockOffset(ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetX, this.getYOfPumpHead() - 1 - this.getBaseMetaTileEntity().getYCoord(), ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetZ) != Blocks.bedrock)) {
+ if (this.completedCycle) {
+ this.moveOneDown();
}
tFluid = null;
- if (mEnergyHatches.size() > 0 && mEnergyHatches.get(0).getEUVar() > (512 + getMaxInputVoltage() * 4))
- completedCycle = true;
+ if ((this.mEnergyHatches.size() > 0) && (this.mEnergyHatches.get(0).getEUVar() > (512 + (this.getMaxInputVoltage() * 4)))) {
+ this.completedCycle = true;
+ }
} else if (tFluid.amount < 5000) {
- stopMachine();
+ this.stopMachine();
return false;
} else {
tFluid.amount = tFluid.amount / 5000;
}
- long tVoltage = getMaxInputVoltage();
- byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
- this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
+ final long tVoltage = this.getMaxInputVoltage();
+ final byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
+ this.mEfficiency = (10000 - ((this.getIdealStatus() - this.getRepairStatus()) * 1000));
this.mEfficiencyIncrease = 10000;
- int tEU = 24;
- int tDuration = 160;
+ final int tEU = 24;
+ final int tDuration = 160;
if (tEU <= 16) {
- this.mEUt = (tEU * (1 << tTier - 1) * (1 << tTier - 1));
- this.mMaxProgresstime = (tDuration / (1 << tTier - 1));
+ this.mEUt = (tEU * (1 << (tTier - 1)) * (1 << (tTier - 1)));
+ this.mMaxProgresstime = (tDuration / (1 << (tTier - 1)));
} else {
this.mEUt = tEU;
this.mMaxProgresstime = tDuration;
@@ -127,89 +131,89 @@ public class GregtechMetaTileEntity_Refinery extends GT_MetaTileEntity_MultiBloc
|| (!GT_Utility.areStacksEqual(this.mInventory[1], GT_ModHandler.getIC2Item("miningPipe", 1L)))) {
return false;
}
- int xDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetX;
- int zDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetZ;
- int yHead = getYOfPumpHead();
+ final int xDir = ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetX;
+ final int zDir = ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetZ;
+ final int yHead = this.getYOfPumpHead();
if (yHead < 1) {
return false;
}
- if (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord() + xDir, yHead - 1, getBaseMetaTileEntity().getZCoord() + zDir) == Blocks.bedrock) {
+ if (this.getBaseMetaTileEntity().getBlock(this.getBaseMetaTileEntity().getXCoord() + xDir, yHead - 1, this.getBaseMetaTileEntity().getZCoord() + zDir) == Blocks.bedrock) {
return false;
}
- if (!(getBaseMetaTileEntity().getWorld().setBlock(getBaseMetaTileEntity().getXCoord() + xDir, yHead - 1, getBaseMetaTileEntity().getZCoord() + zDir, GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L))))) {
+ if (!(this.getBaseMetaTileEntity().getWorld().setBlock(this.getBaseMetaTileEntity().getXCoord() + xDir, yHead - 1, this.getBaseMetaTileEntity().getZCoord() + zDir, GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L))))) {
return false;
}
- if (yHead != getBaseMetaTileEntity().getYCoord()) {
- getBaseMetaTileEntity().getWorld().setBlock(getBaseMetaTileEntity().getXCoord() + xDir, yHead, getBaseMetaTileEntity().getZCoord() + zDir, GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipe", 1L)));
+ if (yHead != this.getBaseMetaTileEntity().getYCoord()) {
+ this.getBaseMetaTileEntity().getWorld().setBlock(this.getBaseMetaTileEntity().getXCoord() + xDir, yHead, this.getBaseMetaTileEntity().getZCoord() + zDir, GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipe", 1L)));
}
- getBaseMetaTileEntity().decrStackSize(1, 1);
+ this.getBaseMetaTileEntity().decrStackSize(1, 1);
return true;
}
private int getYOfPumpHead() {
- int xDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetX;
- int zDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetZ;
- int y = getBaseMetaTileEntity().getYCoord() - 1;
- while (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord() + xDir, y, getBaseMetaTileEntity().getZCoord() + zDir) == GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipe", 1L))) {
+ final int xDir = ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetX;
+ final int zDir = ForgeDirection.getOrientation(this.getBaseMetaTileEntity().getBackFacing()).offsetZ;
+ int y = this.getBaseMetaTileEntity().getYCoord() - 1;
+ while (this.getBaseMetaTileEntity().getBlock(this.getBaseMetaTileEntity().getXCoord() + xDir, y, this.getBaseMetaTileEntity().getZCoord() + zDir) == GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipe", 1L))) {
y--;
}
- if (y == getBaseMetaTileEntity().getYCoord() - 1) {
- if (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord() + xDir, y, getBaseMetaTileEntity().getZCoord() + zDir) != GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L))) {
+ if (y == (this.getBaseMetaTileEntity().getYCoord() - 1)) {
+ if (this.getBaseMetaTileEntity().getBlock(this.getBaseMetaTileEntity().getXCoord() + xDir, y, this.getBaseMetaTileEntity().getZCoord() + zDir) != GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L))) {
return y + 1;
}
- } else if (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord() + xDir, y, getBaseMetaTileEntity().getZCoord() + zDir) != GT_Utility
- .getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L)) && this.mInventory[1] != null && this.mInventory[1].stackSize > 0 && GT_Utility.areStacksEqual(this.mInventory[1], GT_ModHandler.getIC2Item("miningPipe", 1L))) {
- getBaseMetaTileEntity().getWorld().setBlock(getBaseMetaTileEntity().getXCoord() + xDir, y, getBaseMetaTileEntity().getZCoord() + zDir,
+ } else if ((this.getBaseMetaTileEntity().getBlock(this.getBaseMetaTileEntity().getXCoord() + xDir, y, this.getBaseMetaTileEntity().getZCoord() + zDir) != GT_Utility
+ .getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L))) && (this.mInventory[1] != null) && (this.mInventory[1].stackSize > 0) && GT_Utility.areStacksEqual(this.mInventory[1], GT_ModHandler.getIC2Item("miningPipe", 1L))) {
+ this.getBaseMetaTileEntity().getWorld().setBlock(this.getBaseMetaTileEntity().getXCoord() + xDir, y, this.getBaseMetaTileEntity().getZCoord() + zDir,
GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L)));
- getBaseMetaTileEntity().decrStackSize(0, 1);
+ this.getBaseMetaTileEntity().decrStackSize(0, 1);
}
return y;
}
@Override
- public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
- int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
- int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
- for (int i = -1; i < 2; i++) {
- for (int j = -1; j < 2; j++) {
- int Y = 0;
- if ((xDir + i != 0) || (zDir + j != 0)) {
- IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, Y, zDir + j);
- if ((!addToMachineList(tTileEntity, GTID+2)) && (!addEnergyInputToMachineList(tTileEntity, GTID+1))) {
+ public boolean checkMachine(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
+ final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
+ final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
+ for (int i = -1; i < 2; i++) {
+ for (int j = -1; j < 2; j++) {
+ int Y = 0;
+ if (((xDir + i) != 0) || ((zDir + j) != 0)) {
+ final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, Y, zDir + j);
+ if ((!this.addToMachineList(tTileEntity, GTID+2)) && (!this.addEnergyInputToMachineList(tTileEntity, GTID+1))) {
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, Y, zDir + j) != ModBlocks.blockCasings2Misc) {
- Utils.LOG_INFO("Wrong Block.");
- return false;
- }
- if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, Y, zDir + j) != 2) {
- Utils.LOG_INFO("Wrong Meta 1.");
- return false;
- }
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, Y, zDir + j) != ModBlocks.blockCasings2Misc) {
+ Utils.LOG_INFO("Wrong Block.");
+ return false;
}
- else {
- Utils.LOG_INFO("Added Hatch. "+tTileEntity.getInventoryName());
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, Y, zDir + j) != 2) {
+ Utils.LOG_INFO("Wrong Meta 1.");
+ return false;
}
}
- Y = 1;
- Utils.LOG_INFO("Checking at Y+1 as well.");
- IGregTechTileEntity tTileEntity2 = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, Y, zDir + j);
- if ((!addToMachineList(tTileEntity2, GTID+2)) && (!addEnergyInputToMachineList(tTileEntity2, GTID+1))) {
+ else {
+ Utils.LOG_INFO("Added Hatch. "+tTileEntity.getInventoryName());
+ }
+ }
+ Y = 1;
+ Utils.LOG_INFO("Checking at Y+1 as well.");
+ final IGregTechTileEntity tTileEntity2 = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, Y, zDir + j);
+ if ((!this.addToMachineList(tTileEntity2, GTID+2)) && (!this.addEnergyInputToMachineList(tTileEntity2, GTID+1))) {
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, Y, zDir + j) != ModBlocks.blockCasings2Misc) {
- Utils.LOG_INFO("Wrong Block.");
- return false;
- }
- if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, Y, zDir + j) != 2) {
- Utils.LOG_INFO("Wrong Meta 1.");
- return false;
- }
- }
- else {
- Utils.LOG_INFO("Added Hatch. "+tTileEntity2.getInventoryName());
- }
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, Y, zDir + j) != ModBlocks.blockCasings2Misc) {
+ Utils.LOG_INFO("Wrong Block.");
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, Y, zDir + j) != 2) {
+ Utils.LOG_INFO("Wrong Meta 1.");
+ return false;
+ }
+ }
+ else {
+ Utils.LOG_INFO("Added Hatch. "+tTileEntity2.getInventoryName());
}
}
-
+ }
+
for (int y = 2; y < 6; y++) {
if (aBaseMetaTileEntity.getBlockOffset(xDir, y, zDir) != ModBlocks.blockCasings2Misc) { //Must Define meta for center blocks
Utils.LOG_INFO("Wrong Block.");
@@ -290,39 +294,39 @@ public class GregtechMetaTileEntity_Refinery extends GT_MetaTileEntity_MultiBloc
return false;
}
}
-
- if (mInputHatches.size() != 4 || mOutputHatches.size() != 2 ||
- mOutputBusses.size() != 1 || mMufflerHatches.size() != 1 ||
- mMaintenanceHatches.size() != 2 || mEnergyHatches.size() < 1){
+
+ if ((this.mInputHatches.size() != 4) || (this.mOutputHatches.size() != 2) ||
+ (this.mOutputBusses.size() != 1) || (this.mMufflerHatches.size() != 1) ||
+ (this.mMaintenanceHatches.size() != 2) || (this.mEnergyHatches.size() < 1)){
Utils.LOG_INFO("Wrong Hatch count.");
return false;
}
- if (mMufflerHatches.size() == 1){
- if (mMufflerHatches.get(0).mTier < 7){
+ if (this.mMufflerHatches.size() == 1){
+ if (this.mMufflerHatches.get(0).mTier < 7){
Utils.LOG_INFO("Your Muffler must be AT LEAST ZPM tier or higher.");
}
}
- Utils.LOG_INFO("Multiblock Formed.");
+ Utils.LOG_INFO("Multiblock Formed.");
return true;
}
@Override
- public boolean isCorrectMachinePart(ItemStack aStack) {
+ public boolean isCorrectMachinePart(final ItemStack aStack) {
return true;
}
@Override
- public int getMaxEfficiency(ItemStack aStack) {
+ public int getMaxEfficiency(final ItemStack aStack) {
return 10000;
}
@Override
- public int getPollutionPerTick(ItemStack aStack) {
+ public int getPollutionPerTick(final ItemStack aStack) {
return 0;
}
@Override
- public int getDamageToComponent(ItemStack aStack) {
+ public int getDamageToComponent(final ItemStack aStack) {
return 0;
}
@@ -332,11 +336,12 @@ public class GregtechMetaTileEntity_Refinery extends GT_MetaTileEntity_MultiBloc
}
@Override
- public boolean explodesOnComponentBreak(ItemStack aStack) {
+ public boolean explodesOnComponentBreak(final ItemStack aStack) {
return false;
}
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ @Override
+ public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
return new GregtechMetaTileEntity_Refinery(this.mName);
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java
index 6cd65437cb..1e502be52c 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java
@@ -20,81 +20,81 @@ extends GT_MetaTileEntity_BasicTank {
private String mFluidName;
private int mFluidAmount;
- private NBTTagCompound internalCraftingComponentsTag = new NBTTagCompound();
+ private final NBTTagCompound internalCraftingComponentsTag = new NBTTagCompound();
- public GT_MetaTileEntity_TieredTank(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, 3, "Stores " + ((int) (Math.pow(2, aTier) * 32000)) + "L of fluid");
+ public GT_MetaTileEntity_TieredTank(final int aID, final String aName, final String aNameRegional, final int aTier) {
+ super(aID, aName, aNameRegional, aTier, 3, "Stores " + ((aTier+1) * 32000) + "L of fluid");
}
- public GT_MetaTileEntity_TieredTank(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, 3, aDescription, aTextures);
+ public GT_MetaTileEntity_TieredTank(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) {
+ super(aName, aTier, 3, "Stores " + ((aTier+1) * 32000) + "L of fluid", aTextures);
}
@Override
- public ITexture[][][] getTextureSet(ITexture[] aTextures) {
+ public ITexture[][][] getTextureSet(final ITexture[] aTextures) {
return new ITexture[0][0][0];
}
@Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- return aSide == 1 ? new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_POTIONBREWER_ACTIVE)} : new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_POTIONBREWER)};
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ return aSide == 1 ? new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_POTIONBREWER_ACTIVE)} : new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_POTIONBREWER)};
}
- @Override
+ /*@Override
public String[] getDescription() {
//setVars();
- if ((mFluidName.equals("Empty")||mFluidName.equals("")) || mFluidAmount <= 0){
- return new String[] {mDescription, CORE.GT_Tooltip};
+ if ((this.mFluidName.equals("Empty")||this.mFluidName.equals("")) || (this.mFluidAmount <= 0)){
+ return new String[] {"Stores " + (this.mTier * 32000) + "L of fluid", CORE.GT_Tooltip};
}
- return new String[] {mDescription, "Stored Fluid: "+mFluidName, "Stored Amount: "+mFluidAmount+"l", CORE.GT_Tooltip};
- }
+ return new String[] {"Stores " + (this.mTier * 32000) + "L of fluid", "Stored Fluid: "+this.mFluidName, "Stored Amount: "+this.mFluidAmount+"l", CORE.GT_Tooltip};
+ }*/
@Override
- public void saveNBTData(NBTTagCompound aNBT) {
+ public void saveNBTData(final NBTTagCompound aNBT) {
super.saveNBTData(aNBT);
- NBTTagCompound gtCraftingComponentsTag = aNBT.getCompoundTag("GT.CraftingComponents");
+ final NBTTagCompound gtCraftingComponentsTag = aNBT.getCompoundTag("GT.CraftingComponents");
if (gtCraftingComponentsTag != null){
-
+
Utils.LOG_WARNING("Got Crafting Tag");
-
- if (mFluid != null){
- Utils.LOG_WARNING("mFluid was not null, Saving TileEntity NBT data.");
- gtCraftingComponentsTag.setInteger("xAmount", mFluid.amount);
- gtCraftingComponentsTag.setString("xFluid", mFluid.getFluid().getName());
- mFluidName = mFluid.getFluid().getName();
-
- //Backup the current tag
- //gtCraftingComponentsTag.setTag("backupTag", internalCraftingComponentsTag);
- //internalCraftingComponentsTag = gtCraftingComponentsTag;
-
- aNBT.setTag("GT.CraftingComponents", gtCraftingComponentsTag);
- }
- else {
- Utils.LOG_WARNING("mFluid was null, Saving TileEntity NBT data.");
- gtCraftingComponentsTag.removeTag("xFluid");
- gtCraftingComponentsTag.removeTag("xAmount");
-
- //Backup the current tag
- //gtCraftingComponentsTag.setTag("backupTag", internalCraftingComponentsTag);
- //internalCraftingComponentsTag = gtCraftingComponentsTag;
-
- aNBT.setTag("GT.CraftingComponents", gtCraftingComponentsTag);
- }
+
+ if (this.mFluid != null){
+ Utils.LOG_WARNING("mFluid was not null, Saving TileEntity NBT data.");
+ gtCraftingComponentsTag.setInteger("xAmount", this.mFluid.amount);
+ gtCraftingComponentsTag.setString("xFluid", this.mFluid.getFluid().getName());
+ this.mFluidName = this.mFluid.getFluid().getName();
+
+ //Backup the current tag
+ //gtCraftingComponentsTag.setTag("backupTag", internalCraftingComponentsTag);
+ //internalCraftingComponentsTag = gtCraftingComponentsTag;
+
+ aNBT.setTag("GT.CraftingComponents", gtCraftingComponentsTag);
+ }
+ else {
+ Utils.LOG_WARNING("mFluid was null, Saving TileEntity NBT data.");
+ gtCraftingComponentsTag.removeTag("xFluid");
+ gtCraftingComponentsTag.removeTag("xAmount");
+
+ //Backup the current tag
+ //gtCraftingComponentsTag.setTag("backupTag", internalCraftingComponentsTag);
+ //internalCraftingComponentsTag = gtCraftingComponentsTag;
+
+ aNBT.setTag("GT.CraftingComponents", gtCraftingComponentsTag);
+ }
}
}
@Override
- public void loadNBTData(NBTTagCompound aNBT) {
- super.loadNBTData(aNBT);
- NBTTagCompound gtCraftingComponentsTag = aNBT.getCompoundTag("GT.CraftingComponents");
+ public void loadNBTData(final NBTTagCompound aNBT) {
+ super.loadNBTData(aNBT);
+ final NBTTagCompound gtCraftingComponentsTag = aNBT.getCompoundTag("GT.CraftingComponents");
String xFluid = null;
int xAmount = 0;
if (gtCraftingComponentsTag.hasNoTags()){
- if (mFluid != null){
+ if (this.mFluid != null){
Utils.LOG_WARNING("mFluid was not null, Creating TileEntity NBT data.");
- gtCraftingComponentsTag.setInteger("xAmount", mFluid.amount);
- gtCraftingComponentsTag.setString("xFluid", mFluid.getFluid().getName());
+ gtCraftingComponentsTag.setInteger("xAmount", this.mFluid.amount);
+ gtCraftingComponentsTag.setString("xFluid", this.mFluid.getFluid().getName());
aNBT.setTag("GT.CraftingComponents", gtCraftingComponentsTag);
}
}
@@ -110,26 +110,26 @@ extends GT_MetaTileEntity_BasicTank {
Utils.LOG_WARNING("xAmount was not null, Loading TileEntity NBT data.");
xAmount = gtCraftingComponentsTag.getInteger("xAmount");
}
- if (xFluid != null && xAmount != 0){
+ if ((xFluid != null) && (xAmount != 0)){
Utils.LOG_WARNING("Setting Internal Tank, loading "+xAmount+"L of "+xFluid);
- setInternalTank(xFluid, xAmount);
+ this.setInternalTank(xFluid, xAmount);
}
}
}
- private boolean setInternalTank(String fluidName, int amount){
- FluidStack temp = FluidUtils.getFluidStack(fluidName, amount);
+ private boolean setInternalTank(final String fluidName, final int amount){
+ final FluidStack temp = FluidUtils.getFluidStack(fluidName, amount);
if (temp != null){
- if (mFluid == null){
- mFluid = temp;
+ if (this.mFluid == null){
+ this.mFluid = temp;
Utils.LOG_WARNING(temp.getFluid().getName()+" Amount: "+temp.amount+"L");
}
else{
Utils.LOG_WARNING("Retained Fluid.");
- Utils.LOG_WARNING(mFluid.getFluid().getName()+" Amxount: "+mFluid.amount+"L");
+ Utils.LOG_WARNING(this.mFluid.getFluid().getName()+" Amxount: "+this.mFluid.amount+"L");
}
- markDirty();
+ this.markDirty();
return true;
}
return false;
@@ -138,19 +138,19 @@ extends GT_MetaTileEntity_BasicTank {
}
@Override
- public FluidStack drain(int maxDrain, boolean doDrain) {
- tryForceNBTUpdate();
+ public FluidStack drain(final int maxDrain, final boolean doDrain) {
+ this.tryForceNBTUpdate();
return super.drain(maxDrain, doDrain);
}
@Override
- public int fill(FluidStack aFluid, boolean doFill) {
- tryForceNBTUpdate();
+ public int fill(final FluidStack aFluid, final boolean doFill) {
+ this.tryForceNBTUpdate();
return super.fill(aFluid, doFill);
}
@Override
- public void setItemNBT(NBTTagCompound aNBT) {
+ public void setItemNBT(final NBTTagCompound aNBT) {
super.setItemNBT(aNBT);
Utils.LOG_WARNING("setItemNBT");
//aNBT.setTag("GT.CraftingComponents", lRecipeStuff);
@@ -159,32 +159,32 @@ extends GT_MetaTileEntity_BasicTank {
@Override
public void closeInventory() {
- tryForceNBTUpdate();
+ this.tryForceNBTUpdate();
super.closeInventory();
}
@Override
- public boolean onWrenchRightClick(byte aSide, byte aWrenchingSide,
- EntityPlayer aPlayer, float aX, float aY, float aZ) {
- tryForceNBTUpdate();
+ public boolean onWrenchRightClick(final byte aSide, final byte aWrenchingSide,
+ final EntityPlayer aPlayer, final float aX, final float aY, final float aZ) {
+ this.tryForceNBTUpdate();
return super.onWrenchRightClick(aSide, aWrenchingSide, aPlayer, aX, aY, aZ);
}
@Override
- public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
+ public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) {
if (aBaseMetaTileEntity.isClientSide()){
//setVars();
return true;
}
aBaseMetaTileEntity.openGUI(aPlayer);
- tryForceNBTUpdate();
+ this.tryForceNBTUpdate();
return true;
}
@Override
- public void onLeftclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
+ public void onLeftclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) {
super.onLeftclick(aBaseMetaTileEntity, aPlayer);
- tryForceNBTUpdate();
+ this.tryForceNBTUpdate();
}
@Override
@@ -193,12 +193,12 @@ extends GT_MetaTileEntity_BasicTank {
}
@Override
- public boolean isFacingValid(byte aFacing) {
+ public boolean isFacingValid(final byte aFacing) {
return true;
}
@Override
- public boolean isAccessAllowed(EntityPlayer aPlayer) {
+ public boolean isAccessAllowed(final EntityPlayer aPlayer) {
return true;
}
@@ -240,20 +240,20 @@ extends GT_MetaTileEntity_BasicTank {
@Override
public String[] getInfoData() {
- if (mFluid == null) {
+ if (this.mFluid == null) {
return new String[]{
- GT_Values.VOLTAGE_NAMES[mTier]+" Fluid Tank",
+ GT_Values.VOLTAGE_NAMES[this.mTier]+" Fluid Tank",
"Stored Fluid:",
"No Fluid",
Integer.toString(0) + "L",
- Integer.toString(getCapacity()) + "L"};
+ Integer.toString(this.getCapacity()) + "L"};
}
return new String[]{
- GT_Values.VOLTAGE_NAMES[mTier]+" Fluid Tank",
+ GT_Values.VOLTAGE_NAMES[this.mTier]+" Fluid Tank",
"Stored Fluid:",
- mFluid.getLocalizedName(),
- Integer.toString(mFluid.amount) + "L",
- Integer.toString(getCapacity()) + "L"};
+ this.mFluid.getLocalizedName(),
+ Integer.toString(this.mFluid.amount) + "L",
+ Integer.toString(this.getCapacity()) + "L"};
}
@Override
@@ -262,13 +262,13 @@ extends GT_MetaTileEntity_BasicTank {
}
@Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_TieredTank(mName, mTier, mDescription, mTextures);
+ public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_TieredTank(this.mName, this.mTier, this.mDescription, this.mTextures);
}
@Override
public int getCapacity() {
- return (int) (Math.pow(2, mTier) * 32000);
+ return (int) (Math.pow(2, this.mTier) * 32000);
}
@Override
@@ -284,52 +284,52 @@ extends GT_MetaTileEntity_BasicTank {
@Override
public void onRemoval() {
- tryForceNBTUpdate();
+ this.tryForceNBTUpdate();
super.onRemoval();
}
@Override
public void onCloseGUI() {
super.onCloseGUI();
- tryForceNBTUpdate();
+ this.tryForceNBTUpdate();
}
@Override
- public FluidStack drain(ForgeDirection aSide, FluidStack aFluid, boolean doDrain) {
- tryForceNBTUpdate();
+ public FluidStack drain(final ForgeDirection aSide, final FluidStack aFluid, final boolean doDrain) {
+ this.tryForceNBTUpdate();
return super.drain(aSide, aFluid, doDrain);
}
@Override
- public FluidStack drain(ForgeDirection aSide, int maxDrain, boolean doDrain) {
- tryForceNBTUpdate();
+ public FluidStack drain(final ForgeDirection aSide, final int maxDrain, final boolean doDrain) {
+ this.tryForceNBTUpdate();
return super.drain(aSide, maxDrain, doDrain);
}
@Override
- public int fill(ForgeDirection arg0, FluidStack arg1, boolean arg2) {
- tryForceNBTUpdate();
+ public int fill(final ForgeDirection arg0, final FluidStack arg1, final boolean arg2) {
+ this.tryForceNBTUpdate();
return super.fill(arg0, arg1, arg2);
}
@Override
- public int fill_default(ForgeDirection aSide, FluidStack aFluid, boolean doFill) {
- tryForceNBTUpdate();
+ public int fill_default(final ForgeDirection aSide, final FluidStack aFluid, final boolean doFill) {
+ this.tryForceNBTUpdate();
return super.fill_default(aSide, aFluid, doFill);
}
private int mInternalSaveClock = 0;
@Override
- public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) {
super.onPostTick(aBaseMetaTileEntity, aTick);
- if (mInternalSaveClock != 20){
- mInternalSaveClock++;
+ if (this.mInternalSaveClock != 20){
+ this.mInternalSaveClock++;
}
else {
- mInternalSaveClock = 0;
- tryForceNBTUpdate();
+ this.mInternalSaveClock = 0;
+ this.tryForceNBTUpdate();
}
}
@@ -337,7 +337,7 @@ extends GT_MetaTileEntity_BasicTank {
private void tryForceNBTUpdate(){
//Block is invalid.
- if (this == null || this.getBaseMetaTileEntity() == null){
+ if ((this == null) || (this.getBaseMetaTileEntity() == null)){
Utils.LOG_WARNING("Block was not valid for saving data.");
return;
}
@@ -348,7 +348,7 @@ extends GT_MetaTileEntity_BasicTank {
}
//Internal Tag was not valid.
- if (internalCraftingComponentsTag == null){
+ if (this.internalCraftingComponentsTag == null){
Utils.LOG_WARNING("Internal NBT data tag was null.");
return;
}
@@ -360,12 +360,12 @@ extends GT_MetaTileEntity_BasicTank {
//Internal tag was valid and contains tags.
if (!this.internalCraftingComponentsTag.hasNoTags()){
Utils.LOG_WARNING("Found tags to save.");
- saveNBTData(internalCraftingComponentsTag);
+ this.saveNBTData(this.internalCraftingComponentsTag);
}
//Internal tag has no tags.
else {
- Utils.LOG_WARNING("Found no tags to save.");
- saveNBTData(internalCraftingComponentsTag);
+ Utils.LOG_WARNING("Found no tags to save.");
+ this.saveNBTData(this.internalCraftingComponentsTag);
}
//Mark block for update
@@ -376,7 +376,7 @@ extends GT_MetaTileEntity_BasicTank {
this.getBaseMetaTileEntity().getWorld().markBlockForUpdate(x, y, z);
//Mark block dirty, let chunk know it's data has changed and it must be saved to disk. (Albeit slowly)
- this.getBaseMetaTileEntity().markDirty();
+ this.getBaseMetaTileEntity().markDirty();
}
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Base.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Base.java
index cfa7060832..6a53d68221 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Base.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Base.java
@@ -1,12 +1,11 @@
package gtPlusPlus.xmod.gregtech.common.tools;
+import java.util.List;
+
import gregtech.api.GregTech_API;
import gregtech.api.damagesources.GT_DamageSources;
import gtPlusPlus.xmod.gregtech.api.interfaces.internal.Interface_ToolStats;
import gtPlusPlus.xmod.gregtech.api.items.Gregtech_MetaTool;
-
-import java.util.List;
-
import net.minecraft.block.Block;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.Entity;
@@ -55,7 +54,7 @@ implements Interface_ToolStats {
}
@Override
- public int getHurtResistanceTime(int aOriginalHurtResistance, Entity aEntity) {
+ public int getHurtResistanceTime(final int aOriginalHurtResistance, final Entity aEntity) {
return aOriginalHurtResistance;
}
@@ -76,7 +75,7 @@ implements Interface_ToolStats {
@Override
public String getBreakingSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(0));
+ return GregTech_API.sSoundList.get(Integer.valueOf(0));
}
@Override
@@ -113,62 +112,65 @@ implements Interface_ToolStats {
public boolean isMiningTool() {
return true;
}
-
+
public boolean isChainsaw(){
return false;
}
-
-
+
+
+ @Override
public boolean isGrafter(){
return false;
}
-
- public DamageSource getDamageSource(EntityLivingBase aPlayer, Entity aEntity) {
- return GT_DamageSources.getCombatDamage((aPlayer instanceof EntityPlayer) ? "player" : "mob", aPlayer, (aEntity instanceof EntityLivingBase) ? getDeathMessage(aPlayer, (EntityLivingBase) aEntity) : null);
+
+ @Override
+ public DamageSource getDamageSource(final EntityLivingBase aPlayer, final Entity aEntity) {
+ return GT_DamageSources.getCombatDamage((aPlayer instanceof EntityPlayer) ? "player" : "mob", aPlayer, (aEntity instanceof EntityLivingBase) ? this.getDeathMessage(aPlayer, (EntityLivingBase) aEntity) : null);
}
- public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) {
+ public IChatComponent getDeathMessage(final EntityLivingBase aPlayer, final EntityLivingBase aEntity) {
return new EntityDamageSource((aPlayer instanceof EntityPlayer) ? "player" : "mob", aPlayer).func_151519_b(aEntity);
}
@Override
- public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) {
+ public int convertBlockDrops(final List<ItemStack> aDrops, final ItemStack aStack, final EntityPlayer aPlayer, final Block aBlock, final int aX, final int aY, final int aZ, final byte aMetaData, final int aFortune, final boolean aSilkTouch, final BlockEvent.HarvestDropsEvent aEvent) {
return 0;
}
@Override
- public ItemStack getBrokenItem(ItemStack aStack) {
+ public ItemStack getBrokenItem(final ItemStack aStack) {
return null;
}
@Override
- public Enchantment[] getEnchantments(ItemStack aStack) {
+ public Enchantment[] getEnchantments(final ItemStack aStack) {
return ZERO_ENCHANTMENTS;
}
@Override
- public int[] getEnchantmentLevels(ItemStack aStack) {
+ public int[] getEnchantmentLevels(final ItemStack aStack) {
return ZERO_ENCHANTMENT_LEVELS;
}
@Override
- public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) {
+ public void onToolCrafted(final ItemStack aStack, final EntityPlayer aPlayer) {
aPlayer.triggerAchievement(AchievementList.openInventory);
aPlayer.triggerAchievement(AchievementList.mineWood);
aPlayer.triggerAchievement(AchievementList.buildWorkBench);
}
-
- public void onStatsAddedToTool(Gregtech_MetaTool aItem, int aID) {
+
+ @Override
+ public void onStatsAddedToTool(final Gregtech_MetaTool aItem, final int aID) {
}
@Override
- public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) {
+ public float getNormalDamageAgainstEntity(final float aOriginalDamage, final Entity aEntity, final ItemStack aStack, final EntityPlayer aPlayer) {
return aOriginalDamage;
}
@Override
- public float getMagicDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) {
+ public float getMagicDamageAgainstEntity(final float aOriginalDamage, final Entity aEntity, final ItemStack aStack, final EntityPlayer aPlayer) {
return aOriginalDamage;
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java
index 331bd32f85..0a0e730248 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java
@@ -1,5 +1,8 @@
package gtPlusPlus.xmod.gregtech.common.tools;
+import java.util.Arrays;
+import java.util.List;
+
import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
import gregtech.api.interfaces.IIconContainer;
@@ -8,10 +11,6 @@ import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools;
import gtPlusPlus.xmod.gregtech.common.items.behaviours.Behaviour_Choocher;
-
-import java.util.Arrays;
-import java.util.List;
-
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
@@ -25,169 +24,169 @@ import net.minecraft.util.*;
import net.minecraftforge.event.world.BlockEvent;
public class TOOL_Gregtech_Choocher
- extends TOOL_Gregtech_Base {
-
+extends TOOL_Gregtech_Base {
+
public static final List<String> mEffectiveList = Arrays.asList(new String[]{EntityIronGolem.class.getName(), "EntityTowerGuardian"});
-
-
+
+
@Override
- public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) {
+ public float getNormalDamageAgainstEntity(final float aOriginalDamage, final Entity aEntity, final ItemStack aStack, final EntityPlayer aPlayer) {
String tName = aEntity.getClass().getName();
tName = tName.substring(tName.lastIndexOf(".") + 1);
return (mEffectiveList.contains(tName)) || (tName.contains("Golem")) ? aOriginalDamage * 2.0F : aOriginalDamage;
- }
-
- @Override
+ }
+
+ @Override
public int getToolDamagePerBlockBreak() {
- return 50;
- }
+ return 50;
+ }
- @Override
+ @Override
public int getToolDamagePerDropConversion() {
- return 100;
- }
+ return 100;
+ }
- @Override
+ @Override
public int getToolDamagePerContainerCraft() {
- return 400;
- }
+ return 400;
+ }
- @Override
+ @Override
public int getToolDamagePerEntityAttack() {
- return 100;
- }
+ return 100;
+ }
- @Override
+ @Override
public int getBaseQuality() {
- return 0;
- }
+ return 0;
+ }
- @Override
+ @Override
public float getBaseDamage() {
- return 4.0F;
- }
+ return 4.0F;
+ }
- @Override
+ @Override
public float getSpeedMultiplier() {
- return 0.85F;
- }
+ return 0.85F;
+ }
- @Override
+ @Override
public float getMaxDurabilityMultiplier() {
- return 1.2F;
- }
+ return 1.2F;
+ }
- @Override
+ @Override
public String getCraftingSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(1));
- }
+ return GregTech_API.sSoundList.get(Integer.valueOf(1));
+ }
- @Override
+ @Override
public String getEntityHitSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(2));
- }
+ return GregTech_API.sSoundList.get(Integer.valueOf(2));
+ }
- @Override
+ @Override
public String getBreakingSound() {
- return (String) GregTech_API.sSoundList.get(Integer.valueOf(0));
- }
+ return GregTech_API.sSoundList.get(Integer.valueOf(0));
+ }
- @Override
+ @Override
public String getMiningSound() {
- return null;
- }
+ return null;
+ }
- @Override
+ @Override
public boolean canBlock() {
- return true;
- }
-
- @Override
+ return true;
+ }
+
+ @Override
public boolean isWrench(){
- return true;
- }
+ return true;
+ }
- @Override
+ @Override
public boolean isCrowbar() {
- return false;
- }
+ return false;
+ }
- @Override
+ @Override
public boolean isWeapon() {
- return true;
- }
-
- @Override
- public boolean isMinableBlock(Block aBlock, byte aMetaData) {
- String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && ((tTool.equals("sword")) || (tTool.equals("wrench")) || (tTool.equals("hammer")) || (tTool.equals("pickaxe")))) || (aBlock.getMaterial() == Material.rock) || (aBlock.getMaterial() == Material.glass) || (aBlock.getMaterial() == Material.piston) || (aBlock == Blocks.hopper) || (aBlock == Blocks.dispenser) || (aBlock == Blocks.dropper) || (aBlock.getMaterial() == Material.ice) || (aBlock.getMaterial() == Material.packedIce) || (GT_Recipe.GT_Recipe_Map.sHammerRecipes.containsInput(new ItemStack(aBlock, 1, aMetaData))) || (aBlock.getMaterial() == Material.sand) || (aBlock.getMaterial() == Material.grass) || (aBlock.getMaterial() == Material.ground) || (aBlock.getMaterial() == Material.snow) || (aBlock.getMaterial() == Material.clay) || (aBlock.getMaterial() == Material.leaves) || (aBlock.getMaterial() == Material.vine) || (aBlock.getMaterial() == Material.wood) || (aBlock.getMaterial() == Material.cactus) || (aBlock.getMaterial() == Material.circuits) || (aBlock.getMaterial() == Material.gourd) || (aBlock.getMaterial() == Material.web) || (aBlock.getMaterial() == Material.cloth) || (aBlock.getMaterial() == Material.carpet) || (aBlock.getMaterial() == Material.plants) || (aBlock.getMaterial() == Material.cake) || (aBlock.getMaterial() == Material.tnt) || (aBlock.getMaterial() == Material.sponge);
- }
-
- @Override
- public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) {
- int rConversions = 0;
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new ItemStack[]{new ItemStack(aBlock, 1, aMetaData)});
- if ((tRecipe == null) || (aBlock.hasTileEntity(aMetaData))) {
- for (ItemStack tDrop : aDrops) {
- tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new ItemStack[]{GT_Utility.copyAmount(1L, new Object[]{tDrop})});
- if (tRecipe != null) {
- ItemStack tHammeringOutput = tRecipe.getOutput(0);
- if (tHammeringOutput != null) {
- rConversions += tDrop.stackSize;
- tDrop.stackSize *= tHammeringOutput.stackSize;
- tHammeringOutput.stackSize = tDrop.stackSize;
- GT_Utility.setStack(tDrop, tHammeringOutput);
- }
- }
- }
- } else {
- aDrops.clear();
- aDrops.add(tRecipe.getOutput(0));
- rConversions++;
- }
- return rConversions;
- }
-
- @Override
- public ItemStack getBrokenItem(ItemStack aStack) {
- return null;
- }
-
- @Override
- public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
- //Utils.LOG_INFO("Texture: "+TexturesGtTools.SKOOKUM_CHOOCHER.getTextureFile());
- return TexturesGtTools.SKOOKUM_CHOOCHER;
- }
-
- @Override
- public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) {
+ return true;
+ }
+
+ @Override
+ public boolean isMinableBlock(final Block aBlock, final byte aMetaData) {
+ final String tTool = aBlock.getHarvestTool(aMetaData);
+ return ((tTool != null) && ((tTool.equals("sword")) || (tTool.equals("wrench")) || (tTool.equals("hammer")) || (tTool.equals("pickaxe")))) || (aBlock.getMaterial() == Material.rock) || (aBlock.getMaterial() == Material.glass) || (aBlock.getMaterial() == Material.piston) || (aBlock == Blocks.hopper) || (aBlock == Blocks.dispenser) || (aBlock == Blocks.dropper) || (aBlock.getMaterial() == Material.ice) || (aBlock.getMaterial() == Material.packedIce) || (GT_Recipe.GT_Recipe_Map.sHammerRecipes.containsInput(new ItemStack(aBlock, 1, aMetaData))) || (aBlock.getMaterial() == Material.sand) || (aBlock.getMaterial() == Material.grass) || (aBlock.getMaterial() == Material.ground) || (aBlock.getMaterial() == Material.snow) || (aBlock.getMaterial() == Material.clay) || (aBlock.getMaterial() == Material.leaves) || (aBlock.getMaterial() == Material.vine) || (aBlock.getMaterial() == Material.wood) || (aBlock.getMaterial() == Material.cactus) || (aBlock.getMaterial() == Material.circuits) || (aBlock.getMaterial() == Material.gourd) || (aBlock.getMaterial() == Material.web) || (aBlock.getMaterial() == Material.cloth) || (aBlock.getMaterial() == Material.carpet) || (aBlock.getMaterial() == Material.plants) || (aBlock.getMaterial() == Material.cake) || (aBlock.getMaterial() == Material.tnt) || (aBlock.getMaterial() == Material.sponge);
+ }
+
+ @Override
+ public int convertBlockDrops(final List<ItemStack> aDrops, final ItemStack aStack, final EntityPlayer aPlayer, final Block aBlock, final int aX, final int aY, final int aZ, final byte aMetaData, final int aFortune, final boolean aSilkTouch, final BlockEvent.HarvestDropsEvent aEvent) {
+ int rConversions = 0;
+ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new ItemStack[]{new ItemStack(aBlock, 1, aMetaData)});
+ if ((tRecipe == null) || (aBlock.hasTileEntity(aMetaData))) {
+ for (final ItemStack tDrop : aDrops) {
+ tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(null, true, 2147483647L, null, new ItemStack[]{GT_Utility.copyAmount(1L, new Object[]{tDrop})});
+ if (tRecipe != null) {
+ final ItemStack tHammeringOutput = tRecipe.getOutput(0);
+ if (tHammeringOutput != null) {
+ rConversions += tDrop.stackSize;
+ tDrop.stackSize *= tHammeringOutput.stackSize;
+ tHammeringOutput.stackSize = tDrop.stackSize;
+ GT_Utility.setStack(tDrop, tHammeringOutput);
+ }
+ }
+ }
+ } else {
+ aDrops.clear();
+ aDrops.add(tRecipe.getOutput(0));
+ rConversions++;
+ }
+ return rConversions;
+ }
+
+ @Override
+ public ItemStack getBrokenItem(final ItemStack aStack) {
+ return null;
+ }
+
+ @Override
+ public IIconContainer getIcon(final boolean aIsToolHead, final ItemStack aStack) {
+ //Utils.LOG_INFO("Texture: "+TexturesGtTools.SKOOKUM_CHOOCHER.getTextureFile());
+ return TexturesGtTools.SKOOKUM_CHOOCHER;
+ }
+
+ @Override
+ public short[] getRGBa(final boolean aIsToolHead, final ItemStack aStack) {
return GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa;
}
- /*@Override
+ /*@Override
public void onStatsAddedToTool(Gregtech_MetaTool aItem, int aID) {
aItem.addItemBehavior(aID, new Behaviour_Choocher());
}*/
- @Override
- public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) {
- super.onToolCrafted(aStack, aPlayer);
- aPlayer.triggerAchievement(AchievementList.buildSword);
- try {
- GT_Mod.instance.achievements.issueAchievement(aPlayer, "tools");
- GT_Mod.instance.achievements.issueAchievement(aPlayer, "unitool");
- } catch (Exception e) {
- }
- }
-
- @Override
- public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) {
- return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been Choochered by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE);
- }
-
- @Override
- public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) {
- aItem.addItemBehavior(aID, new Behaviour_Choocher());
+ @Override
+ public void onToolCrafted(final ItemStack aStack, final EntityPlayer aPlayer) {
+ super.onToolCrafted(aStack, aPlayer);
+ aPlayer.triggerAchievement(AchievementList.buildSword);
+ try {
+ GT_Mod.achievements.issueAchievement(aPlayer, "tools");
+ GT_Mod.achievements.issueAchievement(aPlayer, "unitool");
+ } catch (final Exception e) {
+ }
+ }
+
+ @Override
+ public IChatComponent getDeathMessage(final EntityLivingBase aPlayer, final EntityLivingBase aEntity) {
+ return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been Choochered by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE);
+ }
+
+ @Override
+ public void onStatsAddedToTool(final GT_MetaGenerated_Tool aItem, final int aID) {
+ aItem.addItemBehavior(aID, new Behaviour_Choocher());
}
@Override