aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2022-01-06 14:22:19 +0000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2022-01-06 14:22:19 +0000
commit580024a4f982602974bfbeb639067e93ec41d2fa (patch)
treea5f00de638aff7f408dd23bc9d5d06baab654b17 /src/main
parentc18bcd3ed50cee3c10470b93a45714c775888fcc (diff)
downloadGT5-Unofficial-580024a4f982602974bfbeb639067e93ec41d2fa.tar.gz
GT5-Unofficial-580024a4f982602974bfbeb639067e93ec41d2fa.tar.bz2
GT5-Unofficial-580024a4f982602974bfbeb639067e93ec41d2fa.zip
Finished work on multiblock Molecular Transformer.
Added single use API for adding MT recipes.
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/gtPlusPlus/api/helpers/GregtechPlusPlus_API.java10
-rw-r--r--src/main/java/gtPlusPlus/core/block/ModBlocks.java1
-rw-r--r--src/main/java/gtPlusPlus/core/config/ConfigHandler.java1
-rw-r--r--src/main/java/gtPlusPlus/core/lib/CORE.java1
-rw-r--r--src/main/java/gtPlusPlus/nei/GT_NEI_MolecularTransformer.java2
-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
-rw-r--r--src/main/resources/assets/miscutils/textures/blocks/special/block_1.pngbin0 -> 532 bytes
-rw-r--r--src/main/resources/assets/miscutils/textures/blocks/special/block_2.pngbin0 -> 552 bytes
-rw-r--r--src/main/resources/assets/miscutils/textures/blocks/special/block_3.pngbin0 -> 535 bytes
-rw-r--r--src/main/resources/assets/miscutils/textures/blocks/special/block_4.pngbin0 -> 545 bytes
-rw-r--r--src/main/resources/assets/miscutils/textures/blocks/special/block_5.pngbin0 -> 722 bytes
-rw-r--r--src/main/resources/assets/miscutils/textures/blocks/special/block_6.pngbin0 -> 725 bytes
-rw-r--r--src/main/resources/assets/miscutils/textures/blocks/special/block_7.pngbin0 -> 716 bytes
-rw-r--r--src/main/resources/assets/miscutils/textures/blocks/special/block_8.pngbin0 -> 730 bytes
19 files changed, 257 insertions, 162 deletions
diff --git a/src/main/java/gtPlusPlus/api/helpers/GregtechPlusPlus_API.java b/src/main/java/gtPlusPlus/api/helpers/GregtechPlusPlus_API.java
index 6fe4209efe..5cf323c7e2 100644
--- a/src/main/java/gtPlusPlus/api/helpers/GregtechPlusPlus_API.java
+++ b/src/main/java/gtPlusPlus/api/helpers/GregtechPlusPlus_API.java
@@ -5,6 +5,7 @@ import java.util.HashMap;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.api.objects.data.WeightedCollection;
import gtPlusPlus.api.objects.minecraft.multi.SpecialMultiBehaviour;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy_RTG;
import gtPlusPlus.xmod.gregtech.api.util.SpecialBehaviourTooltipHandler;
@@ -12,6 +13,15 @@ import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
public class GregtechPlusPlus_API {
+
+
+ public static class MolecularTransformer_API {
+
+ public static boolean addRecipe(ItemStack aInput, ItemStack aOutput, int aDuration, int aEU) {
+ return CORE.RA.addMolecularTransformerRecipe(aInput, aOutput, aDuration, aEU, 1);
+ }
+
+ }
public static class Multiblock_API {
diff --git a/src/main/java/gtPlusPlus/core/block/ModBlocks.java b/src/main/java/gtPlusPlus/core/block/ModBlocks.java
index b51915bb7b..fdbb2bdf5b 100644
--- a/src/main/java/gtPlusPlus/core/block/ModBlocks.java
+++ b/src/main/java/gtPlusPlus/core/block/ModBlocks.java
@@ -50,6 +50,7 @@ public final class ModBlocks {
public static Block blockCasings5Misc;
public static Block blockCasingsTieredGTPP;
public static Block blockSpecialMultiCasings;
+ public static Block blockSpecialMultiCasings2;
public static Block blockCustomMachineCasings;
public static Block blockMetaTileEntity;
diff --git a/src/main/java/gtPlusPlus/core/config/ConfigHandler.java b/src/main/java/gtPlusPlus/core/config/ConfigHandler.java
index 94193e8dab..0e88a20aac 100644
--- a/src/main/java/gtPlusPlus/core/config/ConfigHandler.java
+++ b/src/main/java/gtPlusPlus/core/config/ConfigHandler.java
@@ -229,6 +229,7 @@ public class ConfigHandler {
pollutionPerSecondMultiTreeFarm = config.get("pollution", "pollutionPerSecondMultiTreeFarm", pollutionPerSecondMultiTreeFarm,"pollution rate in gibbl/s for the Tree growth simulator").getInt(pollutionPerSecondMultiTreeFarm);
pollutionPerSecondMultiFrothFlotationCell = config.get("pollution", "pollutionPerSecondMultiFrothFlotationCell", pollutionPerSecondMultiFrothFlotationCell,"pollution rate in gibbl/s for the Flotation cell regulator").getInt(pollutionPerSecondMultiFrothFlotationCell);
pollutionPerSecondMultiAutoCrafter = config.get("pollution", "pollutionPerSecondMultiAutoCrafter", pollutionPerSecondMultiAutoCrafter,"pollution rate in gibbl/s for the Large-Scale auto assembler v1.01").getInt(pollutionPerSecondMultiAutoCrafter);
+ pollutionPerSecondMultiMolecularTransformer = config.get("pollution", "pollutionPerSecondMultiMolecularTransformer", pollutionPerSecondMultiMolecularTransformer,"pollution rate in gibbl/s for the Multiblock Molecular Transformer").getInt(pollutionPerSecondMultiMolecularTransformer);
pollutionPerSecondMultiThermalBoiler = config.get("pollution", "pollutionPerSecondMultiThermalBoiler", pollutionPerSecondMultiThermalBoiler,"pollution rate in gibbl/s for the Thermal boiler").getInt(pollutionPerSecondMultiThermalBoiler);
pollutionPerSecondMultiAlgaePond = config.get("pollution", "pollutionPerSecondMultiAlgaePond", pollutionPerSecondMultiAlgaePond,"pollution rate in gibbl/s for the Algae farm").getInt(pollutionPerSecondMultiAlgaePond);
basePollutionPerSecondSemiFluidGenerator = config.get("pollution", "basePollutionPerSecondSemiFluidGenerator", basePollutionPerSecondSemiFluidGenerator, "base pollution rate in gibbl/s for the single block semi fluid generators").getInt(basePollutionPerSecondSemiFluidGenerator);
diff --git a/src/main/java/gtPlusPlus/core/lib/CORE.java b/src/main/java/gtPlusPlus/core/lib/CORE.java
index cf5539e572..d805375e2d 100644
--- a/src/main/java/gtPlusPlus/core/lib/CORE.java
+++ b/src/main/java/gtPlusPlus/core/lib/CORE.java
@@ -300,6 +300,7 @@ public class CORE {
public static int pollutionPerSecondMultiFrothFlotationCell = 0;
public static int pollutionPerSecondMultiAutoCrafter = 500;
public static int pollutionPerSecondMultiThermalBoiler = 700;
+ public static int pollutionPerSecondMultiMolecularTransformer = 1000;
public static int pollutionPerSecondMultiAlgaePond = 0;
//pollution single blocks
public static int basePollutionPerSecondSemiFluidGenerator = 40;
diff --git a/src/main/java/gtPlusPlus/nei/GT_NEI_MolecularTransformer.java b/src/main/java/gtPlusPlus/nei/GT_NEI_MolecularTransformer.java
index 33672b8a76..fc2c16b423 100644
--- a/src/main/java/gtPlusPlus/nei/GT_NEI_MolecularTransformer.java
+++ b/src/main/java/gtPlusPlus/nei/GT_NEI_MolecularTransformer.java
@@ -28,7 +28,7 @@ public class GT_NEI_MolecularTransformer extends GTPP_NEI_DefaultHandler {
drawText(10, 103, "Amperage: " + aRecipe.mSpecialValue, -16777216);
}
if (tDuration > 0) {
- drawText(10, 113, "Time: " + (tDuration < 20 ? "< 1" : MathUtils.formatNumbers(Long.valueOf(tDuration / 20 / aRecipe.mSpecialValue))) + " secs", -16777216);
+ drawText(10, 113, "Time: " + (tDuration < 20 ? "< 1" : MathUtils.formatNumbers(Long.valueOf(tDuration / 20))) + " secs", -16777216);
}
}
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();
}
diff --git a/src/main/resources/assets/miscutils/textures/blocks/special/block_1.png b/src/main/resources/assets/miscutils/textures/blocks/special/block_1.png
new file mode 100644
index 0000000000..2d497c1f81
--- /dev/null
+++ b/src/main/resources/assets/miscutils/textures/blocks/special/block_1.png
Binary files differ
diff --git a/src/main/resources/assets/miscutils/textures/blocks/special/block_2.png b/src/main/resources/assets/miscutils/textures/blocks/special/block_2.png
new file mode 100644
index 0000000000..efec483a20
--- /dev/null
+++ b/src/main/resources/assets/miscutils/textures/blocks/special/block_2.png
Binary files differ
diff --git a/src/main/resources/assets/miscutils/textures/blocks/special/block_3.png b/src/main/resources/assets/miscutils/textures/blocks/special/block_3.png
new file mode 100644
index 0000000000..c6376014e2
--- /dev/null
+++ b/src/main/resources/assets/miscutils/textures/blocks/special/block_3.png
Binary files differ
diff --git a/src/main/resources/assets/miscutils/textures/blocks/special/block_4.png b/src/main/resources/assets/miscutils/textures/blocks/special/block_4.png
new file mode 100644
index 0000000000..55c42584ba
--- /dev/null
+++ b/src/main/resources/assets/miscutils/textures/blocks/special/block_4.png
Binary files differ
diff --git a/src/main/resources/assets/miscutils/textures/blocks/special/block_5.png b/src/main/resources/assets/miscutils/textures/blocks/special/block_5.png
new file mode 100644
index 0000000000..6b2c6a77b1
--- /dev/null
+++ b/src/main/resources/assets/miscutils/textures/blocks/special/block_5.png
Binary files differ
diff --git a/src/main/resources/assets/miscutils/textures/blocks/special/block_6.png b/src/main/resources/assets/miscutils/textures/blocks/special/block_6.png
new file mode 100644
index 0000000000..446478f1de
--- /dev/null
+++ b/src/main/resources/assets/miscutils/textures/blocks/special/block_6.png
Binary files differ
diff --git a/src/main/resources/assets/miscutils/textures/blocks/special/block_7.png b/src/main/resources/assets/miscutils/textures/blocks/special/block_7.png
new file mode 100644
index 0000000000..a8f51c0b68
--- /dev/null
+++ b/src/main/resources/assets/miscutils/textures/blocks/special/block_7.png
Binary files differ
diff --git a/src/main/resources/assets/miscutils/textures/blocks/special/block_8.png b/src/main/resources/assets/miscutils/textures/blocks/special/block_8.png
new file mode 100644
index 0000000000..08afad396a
--- /dev/null
+++ b/src/main/resources/assets/miscutils/textures/blocks/special/block_8.png
Binary files differ