aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod
diff options
context:
space:
mode:
authorJordan Byrne <draknyte1@hotmail.com>2018-04-06 16:49:16 +1000
committerJordan Byrne <draknyte1@hotmail.com>2018-04-06 16:49:16 +1000
commit96b66bdf2f05ae4d9fb059ec29a03b86949efce3 (patch)
tree4a69d939f2932c3daedf1c8c5f9843c4c1194fc9 /src/Java/gtPlusPlus/xmod
parent65340f1b047edc2563e31f8bccc0244321bfc889 (diff)
downloadGT5-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')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java2
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java3
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java39
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedMixer.java2
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAmazonWarehouse.java21
7 files changed, 63 insertions, 12 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
index 9c3abb8625..9d5e612c6c 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
@@ -305,7 +305,9 @@ public enum GregtechItemList implements GregtechItemContainer {
//Buffer Dynamos
Hatch_Buffer_Dynamo_ULV, Hatch_Buffer_Dynamo_LV, Hatch_Buffer_Dynamo_MV, Hatch_Buffer_Dynamo_HV, Hatch_Buffer_Dynamo_EV,
- Hatch_Buffer_Dynamo_IV, Hatch_Buffer_Dynamo_LuV, Hatch_Buffer_Dynamo_ZPM, Hatch_Buffer_Dynamo_UV, Hatch_Buffer_Dynamo_MAX,
+ Hatch_Buffer_Dynamo_IV, Hatch_Buffer_Dynamo_LuV, Hatch_Buffer_Dynamo_ZPM, Hatch_Buffer_Dynamo_UV, Hatch_Buffer_Dynamo_MAX,
+
+ Amazon_Warehouse_Controller, Casing_AmazonWarehouse,
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
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedMixer.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedMixer.java
index 3a3ed1450e..dc79b3953b 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedMixer.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedMixer.java
@@ -26,7 +26,7 @@ public class GregtechAdvancedMixer {
GT_Recipe_Map oldMap = GT_Recipe.GT_Recipe_Map.sMixerRecipes;
GT_Recipe_Map map = Recipe_GT.Gregtech_Recipe_Map.sAdvancedMixerRecipes;
final Collection<GT_Recipe> x = oldMap.mRecipeList;
- Logger.INFO("Generating " + map.mUnlocalizedName + " Recipes.");
+ //Logger.INFO("Generating " + map.mUnlocalizedName + " Recipes.");
for (final GT_Recipe g : x) {
Recipe_GT.Gregtech_Recipe_Map.sAdvancedMixerRecipes.add(g);
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAmazonWarehouse.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAmazonWarehouse.java
new file mode 100644
index 0000000000..8adf580011
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAmazonWarehouse.java
@@ -0,0 +1,21 @@
+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.misc.GMTE_AmazonPackager;
+
+public class GregtechAmazonWarehouse {
+
+ public static void run() {
+ if (gtPlusPlus.core.lib.LoadedMods.Gregtech) {
+ Logger.INFO("Gregtech5u Content | Registering Amazon Warehouse Multiblock.");
+ run1();
+ }
+ }
+
+ private static void run1() {
+ // Amazon packager multiblock
+ GregtechItemList.Amazon_Warehouse_Controller.set(new GMTE_AmazonPackager(942, "amazonprime.controller.tier.single", "Amazon Warehousing Depot.").getStackForm(1L));
+
+ }
+} \ No newline at end of file