aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java5
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java8
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialArcFurnace.java237
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialArcFurnace.java22
4 files changed, 268 insertions, 4 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
index 13b6b50d98..5139ed974e 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
@@ -271,6 +271,10 @@ public enum GregtechItemList implements GregtechItemContainer {
Casing_Naq_Reactor_C,
Controller_Naq_Reactor,
Casing_Containment,
+
+ //Arc Furnace
+ Industrial_Arc_Furnace,
+ Casing_Industrial_Arc_Furnace,
@@ -502,6 +506,7 @@ public enum GregtechItemList implements GregtechItemContainer {
Cover_Overflow_ULV, Cover_Overflow_LV, Cover_Overflow_MV, Cover_Overflow_HV, Cover_Overflow_EV, Cover_Overflow_IV,
+
//----------------------------------------------------------------------------
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java
index 289424ab1b..8a17b7df31 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java
@@ -24,7 +24,7 @@ extends GregtechMetaCasingBlocksAbstract {
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Naquadah Reactor Base"); //48
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Reactor Piping");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Naquadah Containment Chamber");
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Tempered Arc Furnace Casing");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "");
@@ -40,8 +40,8 @@ extends GregtechMetaCasingBlocksAbstract {
GregtechItemList.Casing_Naq_Reactor_A.set(new ItemStack(this, 1, 0));
GregtechItemList.Casing_Naq_Reactor_B.set(new ItemStack(this, 1, 1));
GregtechItemList.Casing_Naq_Reactor_C.set(new ItemStack(this, 1, 2));
- /*GregtechItemList.Casing_Refinery_Internal.set(new ItemStack(this, 1, 3));
- GregtechItemList.Casing_WashPlant.set(new ItemStack(this, 1, 4));
+ GregtechItemList.Casing_Industrial_Arc_Furnace.set(new ItemStack(this, 1, 3));
+ /*GregtechItemList.Casing_WashPlant.set(new ItemStack(this, 1, 4));
GregtechItemList.Casing_Sifter.set(new ItemStack(this, 1, 5));
GregtechItemList.Casing_SifterGrate.set(new ItemStack(this, 1, 6));
GregtechItemList.Casing_Vanadium_Redox.set(new ItemStack(this, 1, 7));
@@ -70,7 +70,7 @@ extends GregtechMetaCasingBlocksAbstract {
return TexturesGtBlock.TEXTURE_ORGANIC_PANEL_A_GLOWING.getIcon();
//Coke Oven Casing Tier 2
case 3:
- return TexturesGtBlock.Casing_Material_Grisium.getIcon();
+ return TexturesGtBlock.Casing_Material_MaragingSteel.getIcon();
//Material Press Casings
case 4:
return TexturesGtBlock.Casing_Material_Grisium.getIcon();
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialArcFurnace.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialArcFurnace.java
new file mode 100644
index 0000000000..dd5916b80e
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialArcFurnace.java
@@ -0,0 +1,237 @@
+package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing;
+
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.EnumChatFormatting;
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.TAE;
+import gregtech.api.enums.Textures;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Maintenance;
+import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.util.GT_Recipe;
+
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.block.ModBlocks;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.core.util.minecraft.ItemUtils;
+import gtPlusPlus.core.util.minecraft.PlayerUtils;
+import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
+import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
+
+public class GregtechMetaTileEntity_IndustrialArcFurnace
+extends GregtechMeta_MultiBlockBase {
+
+ //862
+ private static final int mCasingTextureID = TAE.getIndexFromPage(3, 3);
+ public static String mCasingName = "Tempered Arc Furnace Casing";
+ private boolean mPlasmaMode = false;
+
+ public GregtechMetaTileEntity_IndustrialArcFurnace(final int aID, final String aName, final String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 3);
+ }
+
+ public GregtechMetaTileEntity_IndustrialArcFurnace(final String aName) {
+ super(aName);
+ mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 3);
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntity_IndustrialArcFurnace(this.mName);
+ }
+
+ @Override
+ public String getMachineType() {
+ return "(Plasma/Electric) Arc Furnace";
+ }
+
+ @Override
+ public String[] getDescription() {
+
+ if (mCasingName.toLowerCase().contains(".name")) {
+ mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 3);
+ }
+
+ return new String[]{
+ "Controller Block for Industrial Arc Furnace",
+ "250% faster than using single block machines of the same voltage",
+ "Processes 8 items per operation",
+ "Size: 3x3x5 [WxHxL] (Hollow)",
+ "Controller (front centered)",
+ "1x Input Bus (anywhere)",
+ "1x Output Bus (anywhere)",
+ "1x Energy Hatch (anywhere)",
+ "1x Muffler Hatch (anywhere)",
+ "1x Maintenance Hatch (Back Center)",
+ mCasingName+"s for the rest (28 at least!)",
+ getPollutionTooltip(),
+ getMachineTooltip(),
+ CORE.GT_Tooltip};
+ }
+
+ @Override
+ public String getSound() {
+ return GregTech_API.sSoundList.get(Integer.valueOf(203));
+ }
+
+ @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[mCasingTextureID], new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Default_Active : TexturesGtBlock.Overlay_Machine_Controller_Default)};
+ }
+ return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[mCasingTextureID]};
+ }
+
+ @Override
+ public boolean hasSlotInGUI() {
+ return false;
+ }
+
+ @Override
+ public String getCustomGUIResourceName() {
+ return "IndustrialExtruder";
+ }
+
+ @Override
+ public GT_Recipe.GT_Recipe_Map getRecipeMap() {
+ return mPlasmaMode ? GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes : GT_Recipe.GT_Recipe_Map.sArcFurnaceRecipes;
+ }
+
+ @Override
+ public boolean isFacingValid(final byte aFacing) {
+ return aFacing > 1;
+ }
+
+ @Override
+ public boolean checkRecipe(final ItemStack aStack) {
+ return this.checkRecipeGeneric(8, 100, 250);
+ }
+
+ @Override
+ public void startProcess() {
+ this.sendLoopStart((byte) 1);
+ }
+
+ @SuppressWarnings("deprecation")
+ @Override
+ 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)))) {
+ for (byte i = 2; i < 6; i = (byte) (i + 1)) {
+ IGregTechTileEntity tTileEntity;
+ if ((null != (tTileEntity = this.getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance(i, 2))) &&
+ (tTileEntity.getFrontFacing() == this.getBaseMetaTileEntity().getFrontFacing()) && (tTileEntity.getMetaTileEntity() != null) &&
+ ((tTileEntity.getMetaTileEntity() instanceof GregtechMetaTileEntity_IndustrialArcFurnace))) {
+ //Utils.LOG_INFO("False 1");
+ return false;
+ }
+ }
+ 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 ((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)), getCasingTextureIndex()) && (!this.addEnergyInputToMachineList(this.getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide == 4 ? -k : i), tY + j, tZ + (tSide == 2 ? -k : tSide == 3 ? k : i)), getCasingTextureIndex()))) {
+ Logger.WARNING("False 2");
+ return false;
+ }
+ }
+ }
+ }
+ }
+ if ((this.mInputBusses.size() == 0) || (this.mOutputBusses.size() == 0)) {
+ Logger.WARNING("Incorrect amount of Input || Output busses.");
+ return false;
+ }
+ this.mMaintenanceHatches.clear();
+ 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 = this.getCasingTextureIndex();
+ } else {
+ Logger.WARNING("Maintenance hatch must be in the middle block on the back.");
+ return false;
+ }
+ }
+ if ((this.mMaintenanceHatches.size() != 1)) {
+ Logger.WARNING("Incorrect amount of Maintenance hatches.");
+ return false;
+ }
+ } else {
+ Logger.WARNING("False 5");
+ return false;
+ }
+ Logger.WARNING("True");
+ return true;
+ }
+
+ @Override
+ public int getMaxEfficiency(final ItemStack aStack) {
+ return 10000;
+ }
+
+ @Override
+ public int getPollutionPerTick(final ItemStack aStack) {
+ return 120;
+ }
+
+ @Override
+ public int getAmountOfOutputs() {
+ return 1;
+ }
+
+ @Override
+ public boolean explodesOnComponentBreak(final ItemStack aStack) {
+ return false;
+ }
+
+ public Block getCasingBlock() {
+ return ModBlocks.blockCasings4Misc;
+ }
+
+
+ public byte getCasingMeta() {
+ return 3;
+ }
+
+ public byte getCasingTextureIndex() {
+ return (byte) mCasingTextureID;
+ }
+
+ @Override
+ public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
+ super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ);
+ this.mPlasmaMode = Utils.invertBoolean(mPlasmaMode);
+ if (mPlasmaMode) {
+ PlayerUtils.messagePlayer(aPlayer, "["+EnumChatFormatting.RED+"MODE"+EnumChatFormatting.RESET+"] "+EnumChatFormatting.LIGHT_PURPLE+"Plasma"+EnumChatFormatting.RESET);
+ }
+ else {
+ PlayerUtils.messagePlayer(aPlayer, "["+EnumChatFormatting.RED+"MODE"+EnumChatFormatting.RESET+"] "+EnumChatFormatting.YELLOW+"Electric"+EnumChatFormatting.RESET);
+ }
+ }
+
+ @Override
+ public void saveNBTData(NBTTagCompound aNBT) {
+ super.saveNBTData(aNBT);
+ aNBT.setBoolean("mPlasmaMode", mPlasmaMode);
+ }
+
+ @Override
+ public void loadNBTData(NBTTagCompound aNBT) {
+ super.loadNBTData(aNBT);
+ mPlasmaMode = aNBT.getBoolean("mPlasmaMode");
+ }
+}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialArcFurnace.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialArcFurnace.java
new file mode 100644
index 0000000000..fb8f69e865
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialArcFurnace.java
@@ -0,0 +1,22 @@
+package gtPlusPlus.xmod.gregtech.registration.gregtech;
+
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
+import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialArcFurnace;
+
+public class GregtechIndustrialArcFurnace {
+
+ public static void run() {
+ if (gtPlusPlus.core.lib.LoadedMods.Gregtech) {
+ Logger.INFO("Gregtech5u Content | Registering Industrial Arc Furnace Multiblock.");
+ run1();
+ }
+
+ }
+
+ private static void run1() {
+ // Industrial Arc Furnace Multiblock
+ GregtechItemList.Industrial_Arc_Furnace.set(new GregtechMetaTileEntity_IndustrialArcFurnace(862, "industrialarcfurnace.controller.tier.single", "High Current Industrial Arc Furnace").getStackForm(1L));
+
+ }
+} \ No newline at end of file