diff options
author | Jordan Byrne <draknyte1@hotmail.com> | 2018-04-06 16:49:16 +1000 |
---|---|---|
committer | Jordan Byrne <draknyte1@hotmail.com> | 2018-04-06 16:49:16 +1000 |
commit | 96b66bdf2f05ae4d9fb059ec29a03b86949efce3 (patch) | |
tree | 4a69d939f2932c3daedf1c8c5f9843c4c1194fc9 /src/Java/gtPlusPlus/xmod/gregtech/common | |
parent | 65340f1b047edc2563e31f8bccc0244321bfc889 (diff) | |
download | GT5-Unofficial-96b66bdf2f05ae4d9fb059ec29a03b86949efce3.tar.gz GT5-Unofficial-96b66bdf2f05ae4d9fb059ec29a03b86949efce3.tar.bz2 GT5-Unofficial-96b66bdf2f05ae4d9fb059ec29a03b86949efce3.zip |
+ Added a casing for the Amazon Warehouse.
+ Added registration and loader for Amazon Warehouse.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/common')
4 files changed, 38 insertions, 10 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java index 0204b08b2e..0c43482d5b 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java @@ -25,7 +25,7 @@ extends GregtechMetaCasingBlocksAbstract { GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Inconel Reinforced Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Multi-Use Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Trinium Plated Mining Platform Casing"); - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Placeholder"); + GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Supply Depot Casing"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Placeholder"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Placeholder"); GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Placeholder");; @@ -41,7 +41,7 @@ extends GregtechMetaCasingBlocksAbstract { GregtechItemList.Casing_Extruder.set(new ItemStack(this, 1, 1)); GregtechItemList.Casing_Multi_Use.set(new ItemStack(this, 1, 2)); GregtechItemList.Casing_BedrockMiner.set(new ItemStack(this, 1, 3)); - //GregtechItemList.Casing_WashPlant.set(new ItemStack(this, 1, 4)); + GregtechItemList.Casing_AmazonWarehouse.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)); diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java index 51fb289b61..2087cea2df 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java @@ -21,7 +21,7 @@ public class CasingTextureHandler3 { return TexturesGtBlock.Casing_Staballoy_Firebox.getIcon(); //Material Press Casings case 4: - return TexturesGtBlock._PlaceHolder.getIcon(); + return TexturesGtBlock.TEXTURE_CASING_AMAZON.getIcon(); //Sifter Structural case 5: return TexturesGtBlock._PlaceHolder.getIcon(); diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java index a93cff61b2..0c7a388d46 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java @@ -195,6 +195,9 @@ public class TexturesGtBlock { public static final CustomIcon Overlay_Machine_Cyber_A = Internal_Overlay_Machine_Cyber_A; private static final CustomIcon Internal_Overlay_Machine_Cyber_B = new CustomIcon("chrono/CyberPanel2"); public static final CustomIcon Overlay_Machine_Cyber_B = Internal_Overlay_Machine_Cyber_B; + + + public static final CustomIcon TEXTURE_CASING_AMAZON = new CustomIcon("TileEntities/CASING_AMAZON"); //Overlays //Fan Textures diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java index a85c4f95f3..00d383551c 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java @@ -2,6 +2,7 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.misc; import java.util.ArrayList; +import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import gregtech.api.enums.*; @@ -16,7 +17,9 @@ import gregtech.api.util.GT_Utility; import gtPlusPlus.api.objects.data.AutoMap; import gtPlusPlus.api.objects.minecraft.ItemStackData; +import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; public class GMTE_AmazonPackager extends GregtechMeta_MultiBlockBase { @@ -41,7 +44,7 @@ public class GMTE_AmazonPackager extends GregtechMeta_MultiBlockBase { @Override public boolean hasSlotInGUI() { - return false; + return true; } @Override @@ -61,9 +64,9 @@ public class GMTE_AmazonPackager extends GregtechMeta_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(7)], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER)}; + return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[TAE.getIndexFromPage(2, 4)], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER)}; } - return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[TAE.GTPP_INDEX(7)]}; + return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[TAE.getIndexFromPage(2, 4)]}; } @@ -78,14 +81,12 @@ public class GMTE_AmazonPackager extends GregtechMeta_MultiBlockBase { public boolean checkRecipe(ItemStack aStack) { ArrayList<ItemStack> tItems = getStoredInputs(); AutoMap<ItemStackData> mCompleted = new AutoMap<ItemStackData>(); - for (ItemStack tInputItem : tItems) { if (tInputItem != null) { mCompleted.put(new ItemStackData(tInputItem)); checkRecipe(tInputItem, getGUIItemStack()); } } - return mCompleted != null && mCompleted.size() > 0; } @@ -163,8 +164,32 @@ public class GMTE_AmazonPackager extends GregtechMeta_MultiBlockBase { } @Override - public boolean checkMachine(IGregTechTileEntity p0, ItemStack p1) { - return false; + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack p1) { + final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; + final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; + if (!aBaseMetaTileEntity.getAirOffset(xDir, 0, zDir)) { + return false; + } + int tAmount = 0; + for (int i = -1; i < 2; i++) { + 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.addToMachineList(tTileEntity, TAE.getIndexFromPage(2, 4))) { + final Block tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j); + final byte tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j); + + if (((tBlock != ModBlocks.blockCasings3Misc) || (tMeta != 4))) { + return false; + } + tAmount++; + } + } + } + } + } + return tAmount >= 10; } @Override |