aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTechnus <daniel112092@gmail.com>2016-10-19 10:23:50 +0200
committerTechnus <daniel112092@gmail.com>2016-10-19 10:23:50 +0200
commitf7e840460251c6330f86fc8ec33781f61323142c (patch)
treebe356968b5dc3b06650b530b5c551ca08c0643fd /src
parent6ad32da70f5df81665ca530c3877edfa72d35ba7 (diff)
downloadGT5-Unofficial-f7e840460251c6330f86fc8ec33781f61323142c.tar.gz
GT5-Unofficial-f7e840460251c6330f86fc8ec33781f61323142c.tar.bz2
GT5-Unofficial-f7e840460251c6330f86fc8ec33781f61323142c.zip
Changes to scaner (will i ever stop...)
added some neat mechanics to proc array (some possibility to utilize tier 10+ machines)
Diffstat (limited to 'src')
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java4
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java4
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java4
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java69
4 files changed, 61 insertions, 20 deletions
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java
index 9b75551f1e..21e88573ef 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java
@@ -868,8 +868,8 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
EnumChatFormatting.YELLOW + Long.toString(getBaseMetaTileEntity().getEUCapacity()) + EnumChatFormatting.RESET +" EU",
"Probably uses: "+
EnumChatFormatting.RED + Integer.toString(mEUt) + EnumChatFormatting.RESET + " EU/t",
- "Maximum total EU/t (to all Energy Hatches, not single ones)",
- EnumChatFormatting.YELLOW+Long.toString(getMaxInputVoltage())+EnumChatFormatting.RESET,
+ "Maximum total power (to all Energy Hatches, not single ones): ",
+ EnumChatFormatting.YELLOW+Long.toString(getMaxInputVoltage())+EnumChatFormatting.RESET+ " EU/t",
"Problems: "+
EnumChatFormatting.RED+ (getIdealStatus() - getRepairStatus())+EnumChatFormatting.RESET+
" Efficiency: "+
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java
index cc16776ffe..e68060fbe7 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java
@@ -276,8 +276,8 @@ public class GT_MetaTileEntity_ElectricBlastFurnace
EnumChatFormatting.YELLOW + Long.toString(getBaseMetaTileEntity().getEUCapacity()) + EnumChatFormatting.RESET +" EU",
"Probably uses: "+
EnumChatFormatting.RED + Integer.toString(mEUt) + EnumChatFormatting.RESET + " EU/t",
- "Maximum total EU/t (to all Energy Hatches, not single ones)",
- EnumChatFormatting.YELLOW+Long.toString(getMaxInputVoltage())+EnumChatFormatting.RESET,
+ "Maximum total power (to all Energy Hatches, not single ones): ",
+ EnumChatFormatting.YELLOW+Long.toString(getMaxInputVoltage())+EnumChatFormatting.RESET+ " EU/t",
"Problems: "+
EnumChatFormatting.RED+ (getIdealStatus() - getRepairStatus())+EnumChatFormatting.RESET+
" Efficiency: "+
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java
index d8526ab3bc..f3ea1cc930 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java
@@ -250,8 +250,8 @@ public class GT_MetaTileEntity_MultiFurnace
EnumChatFormatting.YELLOW + Long.toString(getBaseMetaTileEntity().getEUCapacity()) + EnumChatFormatting.RESET +" EU",
"Probably uses: "+
EnumChatFormatting.RED + Integer.toString(mEUt) + EnumChatFormatting.RESET + " EU/t",
- "Maximum total EU/t (to all Energy Hatches, not single ones)",
- EnumChatFormatting.YELLOW+Long.toString(getMaxInputVoltage())+EnumChatFormatting.RESET,
+ "Maximum total power (to all Energy Hatches, not single ones): ",
+ EnumChatFormatting.YELLOW+Long.toString(getMaxInputVoltage())+EnumChatFormatting.RESET+ " EU/t",
"Problems: "+
EnumChatFormatting.RED+ (getIdealStatus() - getRepairStatus())+EnumChatFormatting.RESET+
" Efficiency: "+
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java
index d5ef058deb..3bc1edaccf 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java
@@ -13,6 +13,7 @@ import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
+import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;
import org.apache.commons.lang3.ArrayUtils;
@@ -22,7 +23,9 @@ import java.util.List;
public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBlockBase {
- GT_Recipe mLastRecipe;
+ private GT_Recipe mLastRecipe;
+ private int tTier = 0;
+ private int mMult = 0;
public GT_MetaTileEntity_ProcessingArray(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
@@ -45,7 +48,7 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl
"1x Output Hatch/Bus (Any casing)",
"1x Maintenance Hatch (Any casing)",
"1x Energy Hatch (Any casing)",
- "Robust Tungstensteel Casings for the rest (16 at least!)",
+ "Robust Tungstensteel Casings for the rest (14 at least!)",
"Place up to 64 Single Block GT Machines into the GUI Inventory",
"Maximal overclockedness of machines inside: Tier 9"};
}
@@ -183,7 +186,7 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl
return aFacing > 1;
}
- public String mMachine = "";
+ private String mMachine = "";
public boolean checkRecipe(ItemStack aStack) {
if (!isCorrectMachinePart(mInventory[1])) {
return false;
@@ -193,38 +196,49 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl
return false;
}
ArrayList<ItemStack> tInputList = getStoredInputs();
- int tTier = 0;
if (mInventory[1].getUnlocalizedName().endsWith("10")) {
tTier = 9;
+ mMult=2;//u need 4x less machines and they will use 4x less power
}else if (mInventory[1].getUnlocalizedName().endsWith("11")) {
tTier = 9;
- }else if (mInventory[1].getUnlocalizedName().endsWith("12")) {
- tTier = 9;
- }else if (mInventory[1].getUnlocalizedName().endsWith("13")) {
- tTier = 9;
- }else if (mInventory[1].getUnlocalizedName().endsWith("14")) {
- tTier = 9;
- }else if (mInventory[1].getUnlocalizedName().endsWith("15")) {
+ mMult=4;//u need 16x less machines and they will use 16x less power
+ }else if (mInventory[1].getUnlocalizedName().endsWith("12") ||
+ mInventory[1].getUnlocalizedName().endsWith("13") ||
+ mInventory[1].getUnlocalizedName().endsWith("14") ||
+ mInventory[1].getUnlocalizedName().endsWith("15")) {
tTier = 9;
+ mMult=6;//u need 64x less machines and they will use 64x less power
}else if (mInventory[1].getUnlocalizedName().endsWith("1")) {
tTier = 1;
+ mMult=0;//*1
}else if (mInventory[1].getUnlocalizedName().endsWith("2")) {
tTier = 2;
+ mMult=0;//*1
}else if (mInventory[1].getUnlocalizedName().endsWith("3")) {
tTier = 3;
+ mMult=0;//*1
}else if (mInventory[1].getUnlocalizedName().endsWith("4")) {
tTier = 4;
+ mMult=0;//*1
}else if (mInventory[1].getUnlocalizedName().endsWith("5")) {
tTier = 5;
+ mMult=0;//*1
}else if (mInventory[1].getUnlocalizedName().endsWith("6")) {
tTier = 6;
+ mMult=0;//*1
}else if (mInventory[1].getUnlocalizedName().endsWith("7")) {
tTier = 7;
+ mMult=0;//*1
}else if (mInventory[1].getUnlocalizedName().endsWith("8")) {
tTier = 8;
+ mMult=0;//*1
}else if (mInventory[1].getUnlocalizedName().endsWith("9")) {
tTier = 9;
+ mMult=0;//*1
+ }else{
+ tTier = 0;
+ mMult=0;//*1
}
if(!mMachine.equals(mInventory[1].getUnlocalizedName()))mLastRecipe=null;
@@ -241,7 +255,7 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl
this.mEUt = 0;
this.mOutputItems = null;
this.mOutputFluids = null;
- int machines = Math.min(64, mInventory[1].stackSize); //Upped max Cap to 64
+ int machines = Math.min(64, mInventory[1].stackSize<<mMult); //Upped max Cap to 64
int i = 0;
for (; i < machines; i++) {
if (!tRecipe.isRecipeInputEqual(true, tFluids, tInputs)) {
@@ -258,7 +272,7 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl
//In case recipe is too OP for that machine
if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1)
return false;
- this.mEUt = GT_Utility.safeInt((long)this.mEUt*i,1);
+ this.mEUt = GT_Utility.safeInt(((long)this.mEUt*i)>>mMult,1);
if (mEUt == Integer.MAX_VALUE - 1)
return false;
@@ -340,7 +354,7 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl
}
}
}
- return tAmount >= 16;
+ return tAmount >= 14;
}
public int getMaxEfficiency(ItemStack aStack) {
@@ -362,4 +376,31 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl
public boolean explodesOnComponentBreak(ItemStack aStack) {
return false;
}
+
+
+ @Override
+ public String[] getInfoData() {
+ return new String[]{
+ "Progress:",
+ EnumChatFormatting.GREEN + Integer.toString(mProgresstime/20) + EnumChatFormatting.RESET +" s / "+
+ EnumChatFormatting.YELLOW + Integer.toString(mMaxProgresstime/20) + EnumChatFormatting.RESET +" s",
+ "Stored Energy:",
+ EnumChatFormatting.GREEN + Long.toString(getBaseMetaTileEntity().getStoredEU()) + EnumChatFormatting.RESET +" EU / "+
+ EnumChatFormatting.YELLOW + Long.toString(getBaseMetaTileEntity().getEUCapacity()) + EnumChatFormatting.RESET +" EU",
+ "Probably uses: "+
+ EnumChatFormatting.RED + Integer.toString(mEUt) + EnumChatFormatting.RESET + " EU/t",
+ "Maximum total power (to all Energy Hatches, not single ones): ",
+ EnumChatFormatting.YELLOW+Long.toString(getMaxInputVoltage())+EnumChatFormatting.RESET+ " EU/t",
+ "Problems: "+
+ EnumChatFormatting.RED+ (getIdealStatus() - getRepairStatus())+EnumChatFormatting.RESET+
+ " Efficiency: "+
+ EnumChatFormatting.YELLOW+Float.toString(mEfficiency / 100.0F)+EnumChatFormatting.RESET + " %",
+ "Machine tier installed: "+
+ EnumChatFormatting.GREEN+tTier+EnumChatFormatting.RESET+
+ " Discount: "+
+ EnumChatFormatting.GREEN+(1<<mMult)+EnumChatFormatting.RESET + " x",
+ "Parallel processing: "+EnumChatFormatting.GREEN+(mInventory[1].stackSize<<mMult)+EnumChatFormatting.RESET
+ };
+ }
+
}