aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod')
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java4
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java15
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java99
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java10
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMolecularTransformer.java275
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java1
6 files changed, 243 insertions, 161 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
index fd5d1fcff2..c5c4de002d 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
@@ -414,7 +414,9 @@ public enum GregtechItemList implements GregtechItemContainer {
// Molecular Transformer
Controller_MolecularTransformer,
- Casing_MolecularTransformer,
+ Casing_Molecular_Transformer_1,
+ Casing_Molecular_Transformer_2,
+ Casing_Molecular_Transformer_3,
// Big Steam Macerator
Controller_SteamMaceratorMulti,
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java
index 0eccd75b66..38d8b38f88 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java
@@ -52,9 +52,9 @@ public class GregtechMetaSpecialMultiCasings extends GregtechMetaCasingBlocksAbs
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Thermally Insulated Casing");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Flotation Cell Casings");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Reinforced Engine Casing");
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", ""); // Unused
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", ""); // Unused
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", ""); // Unused
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Molecular Containment Casing");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", "High Voltage Current Capacitor");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "Particle Containment Casing");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); // Unused
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", ""); // Unused
@@ -69,6 +69,9 @@ public class GregtechMetaSpecialMultiCasings extends GregtechMetaCasingBlocksAbs
GregtechItemList.Casing_SolarTower_HeatContainment.set(new ItemStack(this, 1, 8));
GregtechItemList.Casing_Flotation_Cell.set(new ItemStack(this, 1, 9));
GregtechItemList.Casing_Reinforced_Engine_Casing.set(new ItemStack(this, 1, 10));
+ GregtechItemList.Casing_Molecular_Transformer_1.set(new ItemStack(this, 1, 11));
+ GregtechItemList.Casing_Molecular_Transformer_2.set(new ItemStack(this, 1, 12));
+ GregtechItemList.Casing_Molecular_Transformer_3.set(new ItemStack(this, 1, 13));
}
@Override
@@ -105,6 +108,12 @@ public class GregtechMetaSpecialMultiCasings extends GregtechMetaCasingBlocksAbs
return TexturesGtBlock.TEXTURE_CASING_FLOTATION.getIcon();
case 10:
return TexturesGtBlock.Casing_Material_Talonite.getIcon();
+ case 11:
+ return Textures.BlockIcons.MACHINE_CASING_RADIATIONPROOF.getIcon();
+ case 12:
+ return TexturesGtBlock.Casing_Redox_5.getIcon();
+ case 13:
+ return TexturesGtBlock.TEXTURE_MAGIC_PANEL_A.getIcon();
}
return Textures.BlockIcons.RENDERING_ERROR.getIcon();
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java
new file mode 100644
index 0000000000..7ec655dca5
--- /dev/null
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java
@@ -0,0 +1,99 @@
+package gtPlusPlus.xmod.gregtech.common.blocks;
+
+import java.util.List;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gregtech.api.enums.Textures;
+import gregtech.api.util.GT_LanguageManager;
+import gregtech.common.blocks.GT_Material_Casings;
+import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.IIcon;
+import net.minecraft.world.IBlockAccess;
+
+
+public class GregtechMetaSpecialMultiCasings2 extends GregtechMetaCasingBlocksAbstract {
+
+ public static class SpecialCasingItemBlock extends GregtechMetaCasingItems {
+
+ public SpecialCasingItemBlock(Block par1) {
+ super(par1);
+ }
+
+ @Override
+ public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) {
+ int aMeta = aStack.getItemDamage();
+ if (aMeta < 4) {
+ aList.add("Provides quantum stability");
+ }
+ if (aMeta >= 4 && aMeta < 8) {
+ aList.add("Provides quantum modulation");
+ }
+ super.addInformation(aStack, aPlayer, aList, aF3_H);
+ }
+ }
+
+ public GregtechMetaSpecialMultiCasings2() {
+ super(SpecialCasingItemBlock.class, "gtplusplus.blockspecialcasings.3", GT_Material_Casings.INSTANCE);
+ for (byte i = 0; i < 16; i = (byte) (i + 1)) {
+ //TAE.registerTextures(new GT_CopiedBlockTexture(this, 6, i));
+ // Don't register these Textures, They already exist within vanilla GT. (May not exist in 5.08)
+ }
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Resonance Chamber I");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Resonance Chamber II");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Resonance Chamber III");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Resonance Chamber IV");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Modulator I");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Modulator II");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Modulator III");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Modulator IV");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", ""); // Unused
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", ""); // Unused
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", ""); // Unused
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); // Unused
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", ""); // Unused
+
+ //GregtechItemList.Casing_Turbine_Shaft.set(new ItemStack(this, 1, 0));
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide) {
+ return getStaticIcon((byte) aSide, (byte) aWorld.getBlockMetadata(xCoord, yCoord, zCoord));
+ }
+
+ @Override
+ public IIcon getIcon(final int aSide, final int aMeta) {
+ return getStaticIcon((byte) aSide, (byte) aMeta);
+ }
+
+ public static IIcon getStaticIcon(final byte aSide, final byte aMeta) {
+ switch (aMeta) {
+ case 0:
+ return TexturesGtBlock.Casing_Resonance_1.getIcon();
+ case 1:
+ return TexturesGtBlock.Casing_Resonance_2.getIcon();
+ case 2:
+ return TexturesGtBlock.Casing_Resonance_3.getIcon();
+ case 3:
+ return TexturesGtBlock.Casing_Resonance_4.getIcon();
+ case 4:
+ return TexturesGtBlock.Casing_Modulator_1.getIcon();
+ case 5:
+ return TexturesGtBlock.Casing_Modulator_2.getIcon();
+ case 6:
+ return TexturesGtBlock.Casing_Modulator_3.getIcon();
+ case 7:
+ return TexturesGtBlock.Casing_Modulator_4.getIcon();
+
+ }
+ return Textures.BlockIcons.RENDERING_ERROR.getIcon();
+ }
+
+}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java
index 59e4f2e4b3..246f016202 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java
@@ -247,6 +247,16 @@ public class TexturesGtBlock {
public static final CustomIcon Casing_Redox_6 = new CustomIcon("redox/redox6");
//public static final CustomIcon Casing_Redox_7 = new CustomIcon("redox/redox7");
//public static final CustomIcon Casing_Redox_8 = new CustomIcon("redox/redox8");
+
+ // Special Block 2
+ public static final CustomIcon Casing_Resonance_1 = new CustomIcon("special/block_1");
+ public static final CustomIcon Casing_Resonance_2 = new CustomIcon("special/block_2");
+ public static final CustomIcon Casing_Resonance_3 = new CustomIcon("special/block_3");
+ public static final CustomIcon Casing_Resonance_4 = new CustomIcon("special/block_4");
+ public static final CustomIcon Casing_Modulator_1 = new CustomIcon("special/block_5");
+ public static final CustomIcon Casing_Modulator_2 = new CustomIcon("special/block_6");
+ public static final CustomIcon Casing_Modulator_3 = new CustomIcon("special/block_7");
+ public static final CustomIcon Casing_Modulator_4 = new CustomIcon("special/block_8");
//Centrifuge Casing
private static final CustomIcon Internal_Casing_Centrifuge = new CustomIcon("TileEntities/MACHINE_CASING_CENTRIFUGE");
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMolecularTransformer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMolecularTransformer.java
index b8e8a904b7..edbf0813ae 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMolecularTransformer.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMolecularTransformer.java
@@ -1,21 +1,21 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.lazy;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass;
-import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
-import gregtech.api.enums.TAE;
+import gregtech.api.GregTech_API;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.IIconContainer;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus;
@@ -32,24 +32,20 @@ import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
+import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidStack;
public class GregtechMetaTileEntity_IndustrialMolecularTransformer extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialMolecularTransformer> {
- public static int CASING_TEXTURE_ID;
- private int mCasing;
- private IStructureDefinition<GregtechMetaTileEntity_IndustrialMolecularTransformer> STRUCTURE_DEFINITION = null;
-
+ private static final int CASING_TEXTURE_ID = 48;
+ private int mCasing = 0;
public GregtechMetaTileEntity_IndustrialMolecularTransformer(final int aID, final String aName, final String aNameRegional) {
super(aID, aName, aNameRegional);
- CASING_TEXTURE_ID = TAE.getIndexFromPage(2, 10);
}
public GregtechMetaTileEntity_IndustrialMolecularTransformer(final String aName) {
super(aName);
- CASING_TEXTURE_ID = TAE.getIndexFromPage(2, 10);
}
public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
@@ -66,95 +62,149 @@ public class GregtechMetaTileEntity_IndustrialMolecularTransformer extends Gregt
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
tt.addMachineType(getMachineType())
- .addInfo("Factory Grade Advanced Vacuum Freezer")
- .addInfo("Speed: 200% | Eu Usage: 100% | Parallel: 4")
+ .addInfo("Changes the structure of items to produce new ones")
+ .addInfo("Speed: 100% | Eu Usage: 100%")
+ .addInfo("This multiblock cannot be overclocked")
+ .addInfo("Maximum 1x of each bus/hatch.")
.addPollutionAmount(getPollutionPerSecond(null))
.addSeparator()
- .beginStructureBlock(3, 3, 3, true)
- .addController("Front Center")
- .addCasingInfo("CASING", 10)
- .addInputBus("Any Casing", 1)
- .addOutputBus("Any Casing", 1)
- .addInputHatch("Any Casing", 1)
- .addOutputHatch("Any Casing", 1)
- .addEnergyHatch("Any Casing", 1)
- .addMaintenanceHatch("Any Casing", 1)
- .addMufflerHatch("Any Casing", 1)
+ .beginStructureBlock(7, 7, 7, false)
+ .addController("Top Center")
+ .addCasingInfo("Robust Tungstensteel Machine Casing", 40)
+ .addCasingInfo("Tungstensteel Coils", 16)
+ .addCasingInfo("Molecular Containment Casing", 52)
+ .addCasingInfo("High Voltage Current Capacitor", 32)
+ .addCasingInfo("Particle Containment Casing", 4)
+ .addCasingInfo("Resonance Chamber I", 5)
+ .addCasingInfo("Modulator I", 4)
+ .addInputBus("Any Robust Tungstensteel Machine Casing", 1)
+ .addOutputBus("Any Robust Tungstensteel Machine Casing", 1)
+ .addEnergyHatch("Any Robust Tungstensteel Machine Casing", 1)
+ .addMaintenanceHatch("Any Robust Tungstensteel Machine Casing", 1)
+ .addMufflerHatch("Any Robust Tungstensteel Machine Casing", 1)
.toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
+
+ private static final String STRUCTURE_PIECE_MAIN = "main";
+ private IStructureDefinition<GregtechMetaTileEntity_IndustrialMolecularTransformer> STRUCTURE_DEFINITION = null;
+
@Override
public IStructureDefinition<GregtechMetaTileEntity_IndustrialMolecularTransformer> getStructureDefinition() {
+ STRUCTURE_DEFINITION = null;
if (STRUCTURE_DEFINITION == null) {
STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_IndustrialMolecularTransformer>builder()
- .addShape(mName, transpose(new String[][]{
- {"CCC", "CCC", "CCC"},
- {"C~C", "C-C", "CCC"},
- {"CCC", "CCC", "CCC"},
- }))
- .addElement(
- 'C',
- ofChain(
- ofHatchAdder(
- GregtechMetaTileEntity_IndustrialMolecularTransformer::addIndustrialVacuumFreezerList, CASING_TEXTURE_ID, 1
- ),
- onElementPass(
- x -> ++x.mCasing,
- ofBlock(
- ModBlocks.blockCasings3Misc, 10
- )
- )
- )
- )
- .build();
+ .addShape(STRUCTURE_PIECE_MAIN, (new String[][]{
+ {" ", " ", " xxx ", " x~x ", " xxx ", " ", " "},
+ {" ", " xxx ", " xyyyx ", " xyzyx ", " xyyyx ", " xxx ", " "},
+ {" ", " xxx ", " xyyyx ", " xyzyx ", " xyyyx ", " xxx ", " "},
+ {" ", " xxx ", " xyyyx ", " xyzyx ", " xyyyx ", " xxx ", " "},
+ {" t ", " ttxtt ", " tyyyt ", "txyzyxt", " tyyyt ", " ttxtt ", " t "},
+ {" c ", " ccecc ", " cxfxc ", "cefefec", " cxfxc ", " ccecc ", " c "},
+ {" h ", " hhhhh ", " hhhhh ", "hhhhhhh", " hhhhh ", " hhhhh ", " h "},
+ }))
+
+ .addElement('x', ofBlock(getCasingBlock(), getCasingMeta()))
+ .addElement('y', ofBlock(getCasingBlock(), getCasingMeta2()))
+ .addElement('z', ofBlock(getCasingBlock(), getCasingMeta3()))
+ .addElement('e', ofBlock(getCasingBlock2(), 0))
+ .addElement('f', ofBlock(getCasingBlock2(), 4))
+ .addElement('c', ofBlock(getCoilBlock(), 3))
+ .addElement('t', lazy(t -> onElementPass(x -> ++x.mCasing, ofBlock(getCasingBlock3(), getTungstenCasingMeta()))))
+ .addElement('h', lazy(t -> ofChain(
+ ofHatchAdder(GregtechMetaTileEntity_IndustrialMolecularTransformer::addGenericHatch, getCasingTextureIndex(), 1),
+ onElementPass(x -> ++x.mCasing, ofBlock(getCasingBlock3(), getTungstenCasingMeta()))
+ )))
+ .build();
}
return STRUCTURE_DEFINITION;
}
-
+
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- buildPiece(mName , stackSize, hintsOnly, 1, 1, 0);
+ buildPiece(STRUCTURE_PIECE_MAIN , stackSize, hintsOnly, 3, 3, 0);
}
@Override
public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
mCasing = 0;
- return checkPiece(mName, 1, 1, 0) && mCasing >= 10 && checkHatch();
+ boolean aDidBuild = checkPiece(STRUCTURE_PIECE_MAIN, 3, 3, 0);
+ if (this.mInputBusses.size() != 1 || this.mOutputBusses.size() != 1 || this.mEnergyHatches.size() != 1) {
+ return false;
+ }
+ return aDidBuild && mCasing >= 40 && checkHatch();
+ }
+
+ protected static int getCasingTextureIndex() {
+ return CASING_TEXTURE_ID;
}
- public final boolean addIndustrialVacuumFreezerList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
+ protected static Block getCasingBlock() {
+ return ModBlocks.blockSpecialMultiCasings;
+ }
+
+ protected static Block getCasingBlock2() {
+ return ModBlocks.blockSpecialMultiCasings2;
+ }
+
+ protected static Block getCasingBlock3() {
+ return GregTech_API.sBlockCasings4;
+ }
+
+ protected static Block getCoilBlock() {
+ return GregTech_API.sBlockCasings5;
+ }
+
+ protected static int getCasingMeta() {
+ return 11;
+ }
+
+ protected static int getCasingMeta2() {
+ return 12;
+ }
+
+ protected static int getCasingMeta3() {
+ return 13;
+ }
+
+ protected static int getTungstenCasingMeta() {
+ return 0;
+ }
+
+ public final boolean addGenericHatch(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
if (aTileEntity == null) {
return false;
- } else {
+ }
+ else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){
- return addToMachineList(aTileEntity, aBaseCasingIndex);
- } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
return addToMachineList(aTileEntity, aBaseCasingIndex);
- } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){
- return addToMachineList(aTileEntity, aBaseCasingIndex);
- } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
+ }
+ else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
return addToMachineList(aTileEntity, aBaseCasingIndex);
- } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
+ }
+ else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) {
return addToMachineList(aTileEntity, aBaseCasingIndex);
- } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
+ }
+ else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
return addToMachineList(aTileEntity, aBaseCasingIndex);
- } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) {
+ }
+ else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy) {
return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
+ log("Bad Hatch");
return false;
}
-
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.getCasingTextureForId(CASING_TEXTURE_ID),
+ return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(44),
new GT_RenderedTexture((IIconContainer) (aActive ? TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active : TexturesGtBlock.Overlay_Machine_Controller_Advanced))};
}
- return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID)};
+ return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(44)};
}
@Override
@@ -182,65 +232,7 @@ public class GregtechMetaTileEntity_IndustrialMolecularTransformer extends Gregt
@Override
public boolean checkRecipe(final ItemStack aStack) {
- return this.checkRecipeGeneric(4, 100, 100);
- }
-
- @Override
- public boolean checkRecipeGeneric(
- ItemStack[] aItemInputs, FluidStack[] aFluidInputs,
- int aMaxParallelRecipes, int aEUPercent,
- int aSpeedBonusPercent, int aOutputChanceRoll, GT_Recipe aRecipe, boolean isPerpectOC) {
- // Based on the Processing Array. A bit overkill, but very flexible.
-
- // Reset outputs and progress stats
- this.mEUt = 0;
- this.mMaxProgresstime = 0;
- this.mOutputItems = new ItemStack[]{};
- this.mOutputFluids = new FluidStack[]{};
-
- ItemStack[] tInputs = getCompactedInputs();
- FluidStack[] tFluids = new FluidStack[] {};
-
- if (tInputs.length <= 0) {
- log("Error 1");
- return false;
- }
-
- long tVoltage = getMaxInputVoltage();
- log("Voltage: "+tVoltage);
- byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
- log("Tier: "+tTier);
- GT_Recipe tRecipe = getRecipeMap().findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs);
-
- if (tRecipe == null || !tRecipe.isRecipeInputEqual(true, tFluids, tInputs)) {
- log("Error 2");
- return false;
- }
-
- this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
- this.mEfficiencyIncrease = 10000;
-
- calculateOverclockedNessMulti(tRecipe.mEUt*tRecipe.mSpecialValue, tRecipe.mDuration, 1, tVoltage);
- //In case recipe is too OP for that machine
- if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) {
- log("Error 3");
- return false;
- }
- if (this.mEUt > 0) {
- this.mEUt = (-this.mEUt);
- }
- log("EU/t: "+this.mEUt);
- this.mMaxProgresstime = Math.max(mMaxProgresstime/tRecipe.mSpecialValue, 1);
- log("Total Time: "+this.mMaxProgresstime);
- if (tRecipe.mOutputs.length > 0) {
- this.mOutputItems = tRecipe.mOutputs.clone();
- }
- updateSlots();
- // Play sounds (GT++ addition - GT multiblocks play no sounds)
- startProcess();
-
- log("Running");
- return true;
+ return checkRecipeGeneric(1, 100, 100);
}
@Override
@@ -258,7 +250,7 @@ public class GregtechMetaTileEntity_IndustrialMolecularTransformer extends Gregt
}
public int getPollutionPerSecond(final ItemStack aStack) {
- return CORE.ConfigSwitches.pollutionPerSecondMultiIndustrialVacuumFreezer;
+ return CORE.ConfigSwitches.pollutionPerSecondMultiMolecularTransformer;
}
public int getDamageToComponent(final ItemStack aStack) {
@@ -270,43 +262,12 @@ public class GregtechMetaTileEntity_IndustrialMolecularTransformer extends Gregt
}
@Override
- public boolean drainEnergyInput(long aEU) {
- if (aEU <= 0) {
- return true;
- }
- for (GT_MetaTileEntity_Hatch tHatch : this.mAllEnergyHatches) {
- if (isValidMetaTileEntity(tHatch)) {
- if (tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(aEU, false)) {
- return true;
- }
- }
- }
- return false;
- }
-
- @Override
- public long getMaxInputVoltage() {
- long rVoltage = 0;
- for (GT_MetaTileEntity_Hatch tHatch : mAllEnergyHatches) {
- if (isValidMetaTileEntity(tHatch)) {
- rVoltage += tHatch.getBaseMetaTileEntity().getInputVoltage();
- }
- }
- return rVoltage;
- }
-
- /**
- * Called every tick the Machine runs
- */
- @Override
- public boolean onRunningTick(ItemStack aStack) {
- if (mEUt < 0) {
- if (!drainEnergyInput(((long) -mEUt * 10000) / Math.max(1000, mEfficiency))) {
- criticalStopMachine();
- return false;
- }
- }
- return true;
- }
+ public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ super.onPreTick(aBaseMetaTileEntity, aTick);
+ // Fix GT bug
+ if (this.getBaseMetaTileEntity().getFrontFacing() != 1) {
+ this.getBaseMetaTileEntity().setFrontFacing((byte) 1);
+ }
+ }
} \ No newline at end of file
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java
index e918d8015e..d2fb97010a 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java
@@ -16,6 +16,7 @@ public class Gregtech_Blocks {
ModBlocks.blockCasingsTieredGTPP = new GregtechMetaTieredCasingBlocks1();
ModBlocks.blockSpecialMultiCasings = new GregtechMetaSpecialMultiCasings();
+ ModBlocks.blockSpecialMultiCasings2 = new GregtechMetaSpecialMultiCasings2();
ModBlocks.blockCustomMachineCasings = new GregtechMetaSpecialMachineCasings();
}