aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech
diff options
context:
space:
mode:
authorJordan Byrne <draknyte1@hotmail.com>2018-02-22 19:57:32 +1000
committerJordan Byrne <draknyte1@hotmail.com>2018-02-22 19:57:32 +1000
commitcb2fe66fc1e0af40f23209398727faa08c330f20 (patch)
tree156d7d43fcd9838205e6a5534586f684754313fb /src/Java/gtPlusPlus/xmod/gregtech
parent42613eb707cd96f281ca5b1bba285d8b9270d56f (diff)
downloadGT5-Unofficial-cb2fe66fc1e0af40f23209398727faa08c330f20.tar.gz
GT5-Unofficial-cb2fe66fc1e0af40f23209398727faa08c330f20.tar.bz2
GT5-Unofficial-cb2fe66fc1e0af40f23209398727faa08c330f20.zip
+ Added Industrial Extruder.
+ Added new textures for casings. % Improved Large Wiremill tooltip.
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/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.java5
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialExtruder.java232
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialWireMill.java2
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialExtruder.java27
7 files changed, 272 insertions, 5 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
index 1a9dbffa0b..fc23403f9e 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
@@ -287,7 +287,10 @@ public enum GregtechItemList implements GregtechItemContainer {
Casing_FishPond, Industrial_FishingPond,
//Chunkloader
- GT_Chunkloader_HV, GT_Chunkloader_EV, GT_Chunkloader_IV,
+ GT_Chunkloader_HV, GT_Chunkloader_EV, GT_Chunkloader_IV,
+
+ //Large Extruder
+ Industrial_Extruder, Casing_Extruder,
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java
index 37f7f2cb16..21acbed330 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks3.java
@@ -21,7 +21,7 @@ extends GregtechMetaCasingBlocksAbstract {
TAE.registerTextures(new GT_CopiedBlockTexture(this, 6, i));
}
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Aquatic Casing");
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Placeholder");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Inconel Reinforced Casing");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Placeholder");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Placeholder");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Placeholder");
@@ -37,7 +37,7 @@ extends GregtechMetaCasingBlocksAbstract {
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", "Placeholder");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Placeholder");
GregtechItemList.Casing_FishPond.set(new ItemStack(this, 1, 0));
- //GregtechItemList.Casing_Refinery_External.set(new ItemStack(this, 1, 1));
+ GregtechItemList.Casing_Extruder.set(new ItemStack(this, 1, 1));
//GregtechItemList.Casing_Refinery_Structural.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));
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 1bd59724fb..be14f1f0e9 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/CasingTextureHandler3.java
@@ -13,7 +13,7 @@ public class CasingTextureHandler3 {
return TexturesGtBlock.TEXTURE_METAL_PANEL_B.getIcon();
//Coke Oven Frame
case 1:
- return TexturesGtBlock._PlaceHolder.getIcon();
+ return TexturesGtBlock.TEXTURE_METAL_PANEL_D.getIcon();
//Coke Oven Casing Tier 1
case 2:
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 dfe7d15bb7..497ea8b905 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java
@@ -235,10 +235,15 @@ public class TexturesGtBlock {
//Metroid related
public static final CustomIcon TEXTURE_METAL_PANEL_A = new CustomIcon("metro/TEXTURE_METAL_PANEL_A");
public static final CustomIcon TEXTURE_METAL_PANEL_B = new CustomIcon("metro/TEXTURE_METAL_PANEL_B");
+ public static final CustomIcon TEXTURE_METAL_PANEL_C = new CustomIcon("metro/TEXTURE_METAL_PANEL_C");
+ public static final CustomIcon TEXTURE_METAL_PANEL_D = new CustomIcon("metro/TEXTURE_METAL_PANEL_D");
+ public static final CustomIcon TEXTURE_METAL_PANEL_E = new CustomIcon("metro/TEXTURE_METAL_PANEL_E");
+ public static final CustomIcon TEXTURE_MAGIC_PANEL_A = new CustomIcon("metro/TEXTURE_MAGIC_A");
public static final CustomIcon TEXTURE_ORGANIC_PANEL_A = new CustomIcon("metro/TEXTURE_ORGANIC_PANEL_A");
public static final CustomIcon TEXTURE_STONE_BIRD_A = new CustomIcon("metro/TEXTURE_STONE_BIRD_A");
public static final CustomIcon TEXTURE_STONE_BIRD_A_LEFT = new CustomIcon("metro/TEXTURE_STONE_BIRD_A_LEFT");
public static final CustomIcon TEXTURE_STONE_BIRD_A_RIGHT = new CustomIcon("metro/TEXTURE_STONE_BIRD_A_RIGHT");
+ public static final CustomIcon TEXTURE_STONE_RED_A = new CustomIcon("metro/TEXTURE_STONE_RED_A");
public static final CustomIcon TEXTURE_STONE_BLUE_A = new CustomIcon("metro/TEXTURE_STONE_BLUE_A");
public static final CustomIcon TEXTURE_STONE_GREEN_A = new CustomIcon("metro/TEXTURE_STONE_GREEN_A");
public static final CustomIcon TEXTURE_STONE_TABLET_A = new CustomIcon("metro/TEXTURE_STONE_TABLET_A");
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialExtruder.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialExtruder.java
new file mode 100644
index 0000000000..c8b6b3a716
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialExtruder.java
@@ -0,0 +1,232 @@
+package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi;
+
+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_InputBus;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Maintenance;
+import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.block.ModBlocks;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine;
+import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.FluidStack;
+
+import java.util.ArrayList;
+
+public class GregtechMetaTileEntity_IndustrialExtruder
+extends GregtechMeta_MultiBlockBase {
+
+ public GregtechMetaTileEntity_IndustrialExtruder(final int aID, final String aName, final String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ public GregtechMetaTileEntity_IndustrialExtruder(final String aName) {
+ super(aName);
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntity_IndustrialExtruder(this.mName);
+ }
+
+ @Override
+ public String[] getDescription() {
+ return new String[]{"Controller Block for the Material Extruder",
+ "500% faster than using single block machines of the same voltage",
+ "Processes four items per voltage tier",
+ "Extrusion Shape for recipe goes in the Input Bus",
+ "Each Input Bus can have a different Circuit!",
+ "You can use several input busses per multiblock",
+ "Size: 3x3x5 [WxHxL] (Hollow)", "Controller (front centered)",
+ "Controller (front centered)",
+ "1x Input Bus (anywhere)",
+ "1x Output Bus (anywhere)",
+ "1x Energy Hatch (anywhere)",
+ "1x Maintenance Hatch (anywhere)",
+ "1x Muffler Hatch (anywhere)",
+ "Material Press Machine Casings for the rest (16 at least!)",
+ 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[TAE.GTPP_INDEX(33)], 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(33)]};
+ }
+
+ @Override
+ public boolean hasSlotInGUI() {
+ return true;
+ }
+
+ @Override
+ public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GUI_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "WireFactory.png");
+ }
+
+ @Override
+ public GT_Recipe.GT_Recipe_Map getRecipeMap() {
+ return GT_Recipe.GT_Recipe_Map.sExtruderRecipes;
+ }
+
+ @Override
+ public boolean isFacingValid(final byte aFacing) {
+ return aFacing > 1;
+ }
+
+ @Override
+ public boolean checkRecipe(final ItemStack aStack) {
+ for (GT_MetaTileEntity_Hatch_InputBus tBus : mInputBusses) {
+ ArrayList<ItemStack> tBusItems = new ArrayList<ItemStack>();
+ tBus.mRecipeMap = getRecipeMap();
+ if (isValidMetaTileEntity(tBus)) {
+ for (int i = tBus.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) {
+ if (tBus.getBaseMetaTileEntity().getStackInSlot(i) != null)
+ tBusItems.add(tBus.getBaseMetaTileEntity().getStackInSlot(i));
+ }
+ }
+
+ if (checkRecipeGeneric(tBusItems.toArray(new ItemStack[]{}), new FluidStack[]{}, (4*Utils.calculateVoltageTier(this.getMaxInputVoltage())), 100, 500, 10000)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public void startProcess() {
+ this.sendLoopStart((byte) 1);
+ }
+
+ @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)))) {
+ int tAirCount = 0;
+ for (byte i = -1; i < 2; i = (byte) (i + 1)) {
+ for (byte j = -1; j < 2; j = (byte) (j + 1)) {
+ for (byte k = -1; k < 2; k = (byte) (k + 1)) {
+ if (this.getBaseMetaTileEntity().getAirOffset(i, j, k)) {
+ tAirCount++;
+ }
+ }
+ }
+ }
+ if (tAirCount != 10) {
+ Logger.INFO("False 1");
+ return false;
+ }
+ 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_IndustrialWireMill))) {
+ //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 (((i == 0) || (j == 0)) && ((k == 1) || (k == 2) || (k == 3))) {
+ 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.INFO("False 2");
+ return false;
+ }
+ }
+ else 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 {
+ Logger.INFO("False 3");
+ return false;
+ }
+ }
+ }
+ }
+ }
+ if ((this.mInputBusses.size() == 0) || (this.mOutputBusses.size() == 0)) {
+ Logger.INFO("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.INFO("Maintenance hatch must be in the middle block on the back.");
+ return false;
+ }
+ }
+ if ((this.mMaintenanceHatches.size() != 1)) {
+ Logger.INFO("Incorrect amount of Maintenance hatches.");
+ return false;
+ }
+ } else {
+ Logger.INFO("False 5");
+ return false;
+ }
+ Logger.INFO("True");
+ return true;
+ }
+
+ @Override
+ public int getMaxEfficiency(final ItemStack aStack) {
+ return 10000;
+ }
+
+ @Override
+ public int getPollutionPerTick(final ItemStack aStack) {
+ return 0;
+ }
+
+ @Override
+ public int getAmountOfOutputs() {
+ return 1;
+ }
+
+ @Override
+ public boolean explodesOnComponentBreak(final ItemStack aStack) {
+ return false;
+ }
+
+ public Block getCasingBlock() {
+ return ModBlocks.blockCasings3Misc;
+ }
+
+
+ public byte getCasingMeta() {
+ return 1;
+ }
+
+ public byte getCasingTextureIndex() {
+ return (byte) TAE.GTPP_INDEX(33);
+ }
+}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialWireMill.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialWireMill.java
index ea2c1f3269..895e367200 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialWireMill.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialWireMill.java
@@ -42,7 +42,7 @@ extends GregtechMeta_MultiBlockBase {
"200% faster than using single block machines of the same voltage",
"Only uses 75% of the eu/t normally required",
"Processes four items per voltage tier",
- "Size: 3x5x3 [WxLxH] (Hollow)", "Controller (front centered)",
+ "Size: 3x3x5 [WxHxL] (Hollow)", "Controller (front centered)",
"2x Input Bus (side centered)",
"2x Output Bus (side centered)",
"1x Energy Hatch (top or bottom centered)",
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialExtruder.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialExtruder.java
new file mode 100644
index 0000000000..400be32978
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialExtruder.java
@@ -0,0 +1,27 @@
+package gtPlusPlus.xmod.gregtech.registration.gregtech;
+
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
+import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.GregtechMetaTileEntity_IndustrialExtruder;
+import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.GregtechMetaTileEntity_IndustrialPlatePress;
+
+public class GregtechIndustrialExtruder {
+
+ public static void run() {
+ if (gtPlusPlus.core.lib.LoadedMods.Gregtech) {
+ Logger.INFO("Gregtech5u Content | Registering Industrial Extrusion Multiblock.");
+ if (CORE.ConfigSwitches.enableMultiblock_IndustrialPlatePress) {
+ run1();
+ }
+ }
+
+ }
+
+ private static void run1() {
+ // Industrial Presser Multiblock
+ GregtechItemList.Industrial_Extruder.set(new GregtechMetaTileEntity_IndustrialExtruder(859,
+ "industrialextruder.controller.tier.single", "Industrial Extrusion Machine").getStackForm(1L));
+
+ }
+} \ No newline at end of file