aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/common')
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Casings4.java8
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java67
2 files changed, 67 insertions, 8 deletions
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java
index 3c3535e4da..da775be69d 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings4.java
@@ -37,6 +37,8 @@ public class GT_Block_Casings4
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Titanium Turbine Casing");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Tungstensteel Turbine Casing");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "Engine Intake Casing");
+ GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Inert Machine Casing");
+ GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "PTFE Pipe Casing");
ItemList.Casing_RobustTungstenSteel.set(new ItemStack(this, 1, 0));
ItemList.Casing_CleanStainlessSteel.set(new ItemStack(this, 1, 1));
@@ -50,6 +52,8 @@ public class GT_Block_Casings4
ItemList.Casing_Turbine2.set(new ItemStack(this, 1, 11));
ItemList.Casing_Turbine3.set(new ItemStack(this, 1, 12));
ItemList.Casing_EngineIntake.set(new ItemStack(this, 1, 13));
+ ItemList.Casing_Inert.set(new ItemStack(this, 1, 14));
+ ItemList.Casing_Pipe_Polytetrafluoroethylene.set(new ItemStack(this, 1, 15));
}
public IIcon getIcon(int aSide, int aMeta) {
@@ -83,9 +87,9 @@ public class GT_Block_Casings4
case 13:
return Textures.BlockIcons.MACHINE_CASING_ENGINE_INTAKE.getIcon();
case 14:
- return Textures.BlockIcons.MACHINE_CASING_ROBUST_TUNGSTENSTEEL.getIcon();
+ return Textures.BlockIcons.MACHINE_CASING_INERT.getIcon();
case 15:
- return Textures.BlockIcons.MACHINE_CASING_ROBUST_TUNGSTENSTEEL.getIcon();
+ return Textures.BlockIcons.MACHINE_CASING_PIPE_POLYTETRAFLUOROETHYLENE.getIcon();
}
return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon();
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java
index 6e57f85c99..9a148cc95d 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java
@@ -1,15 +1,21 @@
package gregtech.common.tileentities.machines.multi;
+import gregtech.api.GregTech_API;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.util.GT_Log;
+import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
+import net.minecraftforge.common.util.ForgeDirection;
public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_MultiBlockBase {
+ private static final int CASING_INDEX = 16;
+
public GT_MetaTileEntity_LargeChemicalReactor(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
}
@@ -29,17 +35,28 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_Mu
"Controller block for the Large Chemical Reactor",
"Has the same recipes as the Chemical Reactor",
"Does not lose efficiency when overclocked",
- "Accepts fluids instead of fluid cells" };
+ "Accepts fluids instead of fluid cells",
+ "Size(WxHxD): 3x2x3",
+ "Controller (Lower front centered)",
+ "1x Any Heating Coil (Bottom centered)",
+ "1x PTFE Pipe Casing (Top centered)",
+ "1x Input Bus/Hatch (Any edge casing)",
+ "1x Output Bus/Hatch (Any edge casing)",
+ "1x Maintenance Hatch (Any edge casing)",
+ "1x Energy Hatch (Any edge casing)",
+ "Chemically Inert Casings for the rest (10 at least!)" };
}
@Override
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
+ 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[0],
- new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER) };
+ Textures.BlockIcons.CASING_BLOCKS[CASING_INDEX],
+ new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE
+ : Textures.BlockIcons.OVERLAY_FRONT_IMPLOSION_COMPRESSOR) };
}
- return new ITexture[] { Textures.BlockIcons.CASING_BLOCKS[0] };
+ return new ITexture[] { Textures.BlockIcons.CASING_BLOCKS[CASING_INDEX] };
}
@Override
@@ -54,7 +71,45 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_Mu
@Override
public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
- return false;
+ int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
+ int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
+ int casingAmount = 0;
+ // i=width, j=depth, k=height
+ for (int x = -1 + xDir; x <= xDir + 1; x++) {
+ for (int z = -1 + zDir; z <= zDir + 1; z++) {
+ for (int y = 0; y <= 1; y++) {
+ IGregTechTileEntity tileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(x, y, z);
+ Block block = aBaseMetaTileEntity.getBlockOffset(x, y, z);
+ if (x == xDir && z == zDir) {
+ if (y == 0 && block != GregTech_API.sBlockCasings5) {
+ GT_Log.err.println("EPIK no Heating Coil");
+ GT_Log.err.println("EPIK found " + block);
+ return false;
+ } else if (y == 1
+ && (block != GregTech_API.sBlockCasings4 || aBaseMetaTileEntity.getMetaIDOffset(x, y, z) != 15)) {
+ GT_Log.err.println("EPIK no PTFE Pipe Casing");
+ return false;
+ }
+ } else if (x != 0 || y != 0 || z != 0) {
+ if (!addInputToMachineList(tileEntity, CASING_INDEX) && !addOutputToMachineList(tileEntity, CASING_INDEX)
+ && !addMaintenanceToMachineList(tileEntity, CASING_INDEX)
+ && !addEnergyInputToMachineList(tileEntity, CASING_INDEX)) {
+ if (block == GregTech_API.sBlockCasings2 && aBaseMetaTileEntity.getMetaIDOffset(x, y, z) == 0) {
+ casingAmount++;
+ GT_Log.err.println("EPIK correct casing at " + x + " " + y + " " + z);
+ } else {
+ GT_Log.err.println("EPIK wrong casing at " + x + " " + y + " " + z);
+ GT_Log.err.println("Found " + tileEntity);
+ return false;
+ }
+ }
+ }
+
+ }
+ }
+
+ }
+ return casingAmount >= 10;
}
@Override