diff options
author | Draknyte1 <Draknyte1@hotmail.com> | 2017-08-24 23:01:52 +1000 |
---|---|---|
committer | Draknyte1 <Draknyte1@hotmail.com> | 2017-08-24 23:01:52 +1000 |
commit | 9a05bf4c86396c58b4545aca9e9d8ff4994ab2d0 (patch) | |
tree | 389c91e734f7d61777a8486638ff06398425d740 | |
parent | 9fd5cc60a2bbf7042be4ff2383b37943c5e5d0a0 (diff) | |
download | GT5-Unofficial-9a05bf4c86396c58b4545aca9e9d8ff4994ab2d0.tar.gz GT5-Unofficial-9a05bf4c86396c58b4545aca9e9d8ff4994ab2d0.tar.bz2 GT5-Unofficial-9a05bf4c86396c58b4545aca9e9d8ff4994ab2d0.zip |
+ Added the ability for the Autocrafter to assemble and Disassemble things.
+ Added a casing for the Autocrafter.
4 files changed, 25 insertions, 21 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java index 7462451c91..6332e1d98b 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java @@ -171,7 +171,7 @@ public enum GregtechItemList implements GregtechItemContainer { Casing_ThermalContainment, - Casing_PlaceHolder12, + Casing_Autocrafter, Casing_PlaceHolder13, Casing_PlaceHolder14, Casing_PlaceHolder15, diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java index 62398931b9..d0690fabc7 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java @@ -31,7 +31,7 @@ extends GregtechMetaCasingBlocksAbstract { GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Cyclotron Coil"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Cyclotron Outer Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Thermal Containment Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", "Placeholder Casing"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", "Autocrafter Frame"); 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 "); @@ -47,7 +47,7 @@ extends GregtechMetaCasingBlocksAbstract { GregtechItemList.Casing_Cyclotron_Coil.set(new ItemStack(this, 1, 9)); GregtechItemList.Casing_Cyclotron_External.set(new ItemStack(this, 1, 10)); GregtechItemList.Casing_ThermalContainment.set(new ItemStack(this, 1, 11)); - GregtechItemList.Casing_PlaceHolder12.set(new ItemStack(this, 1, 12)); + GregtechItemList.Casing_Autocrafter.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)); 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 e3ccfeadec..83c09203cf 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler2.java @@ -47,7 +47,7 @@ public class CasingTextureHandler2 { return TexturesGtBlock.Casing_Material_Tantalloy61.getIcon(); //Reactor Casing I case 12: - return TexturesGtBlock._PlaceHolder.getIcon(); + return TexturesGtBlock.Casing_Machine_Advanced.getIcon(); //Reactor Casing II case 13: return TexturesGtBlock._PlaceHolder.getIcon(); diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GT4Entity_AutoCrafter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GT4Entity_AutoCrafter.java index faff26c896..6ca2b0fb4c 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GT4Entity_AutoCrafter.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GT4Entity_AutoCrafter.java @@ -2,7 +2,6 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi; import java.util.ArrayList; -import gregtech.api.GregTech_API; import gregtech.api.enums.*; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -11,6 +10,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockB import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.util.Utils; import net.minecraft.entity.player.EntityPlayer; @@ -106,10 +106,10 @@ extends GT_MetaTileEntity_MultiBlockBase @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[TAE.GTPP_INDEX(31)], + return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[TAE.GTPP_INDEX(28)], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER)}; } - return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[TAE.GTPP_INDEX(31)]}; + return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[TAE.GTPP_INDEX(28)]}; } @Override @@ -124,17 +124,15 @@ extends GT_MetaTileEntity_MultiBlockBase 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, TAE.GTPP_INDEX(31)) - && !this.addInputToMachineList(tTileEntity, TAE.GTPP_INDEX(31)) - && !this.addOutputToMachineList(tTileEntity, TAE.GTPP_INDEX(31)) - && !this.addEnergyInputToMachineList(tTileEntity, TAE.GTPP_INDEX(31))) { - if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, - zDir + j) != GregTech_API.sBlockCasings2) { + final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j); + if (!this.addToMachineList(tTileEntity, TAE.GTPP_INDEX(28))) { + if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasings2Misc) { + Utils.LOG_INFO("Bad Block. Found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) .getLocalizedName()); + Utils.LOG_INFO("Block Found at x:"+(aBaseMetaTileEntity.getXCoord()+xDir+i)+" | y:"+(aBaseMetaTileEntity.getYCoord()+h)+" | z:"+(aBaseMetaTileEntity.getZCoord()+zDir+j)); return false; } - if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 1) { + if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 12) { + Utils.LOG_INFO("Bad Meta."); return false; } ++tAmount; @@ -161,9 +159,11 @@ extends GT_MetaTileEntity_MultiBlockBase @Override public boolean checkRecipe(final ItemStack aStack) { if (this.isDisassembling){ + Utils.LOG_INFO("Breaking things down."); return doDisassembly(); } else { + Utils.LOG_INFO("Putting the pieces together."); final ArrayList<ItemStack> tInputList = this.getStoredInputs(); for (int tInputList_sS = tInputList.size(), i = 0; i < tInputList_sS - 1; ++i) { for (int j = i + 1; j < tInputList_sS; ++j) { @@ -195,20 +195,21 @@ extends GT_MetaTileEntity_MultiBlockBase } final FluidStack[] tFluids = tFluidList.toArray(new FluidStack[tFluidList.size()]); if (tInputList.size() > 0) { + Utils.LOG_INFO("test1"); final long tVoltage = this.getMaxInputVoltage(); final byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); - final GT_Recipe tRecipe = this.getRecipeMap().findRecipe( - this.getBaseMetaTileEntity(), false, GT_Values.V[tTier], tFluids, - tInputs); - if (tRecipe != null && this.mHeatingCapacity >= tRecipe.mSpecialValue - && tRecipe.isRecipeInputEqual(true, tFluids, tInputs)) { + final GT_Recipe tRecipe = this.getRecipeMap().findRecipe(this.getBaseMetaTileEntity(), false, GT_Values.V[this.mTier], tFluids, tInputs); + if (tRecipe != null && tRecipe.isRecipeInputEqual(true, tFluids, tInputs)) { + Utils.LOG_INFO("test2"); this.mEfficiency = 10000 - (this.getIdealStatus() - this.getRepairStatus()) * 1000; this.mEfficiencyIncrease = 10000; final int tHeatCapacityDivTiers = (this.mHeatingCapacity - tRecipe.mSpecialValue) / 900; if (tRecipe.mEUt <= 16) { + Utils.LOG_INFO("test3"); this.mEUt = tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1); this.mMaxProgresstime = tRecipe.mDuration / (1 << tTier - 1); } else { + Utils.LOG_INFO("test4"); this.mEUt = tRecipe.mEUt; this.mMaxProgresstime = tRecipe.mDuration; int m = 2; @@ -219,14 +220,17 @@ extends GT_MetaTileEntity_MultiBlockBase } } if (tHeatCapacityDivTiers > 0) { + Utils.LOG_INFO("test5"); this.mEUt *= (int) Math.pow(0.95, tHeatCapacityDivTiers); } if (this.mEUt > 0) { + Utils.LOG_INFO("test6"); this.mEUt = -this.mEUt; } this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0), tRecipe.getOutput(1)}; this.updateSlots(); + Utils.LOG_INFO("test7"); return true; } } |