Tweaks
This commit is contained in:
parent
00c69b5a39
commit
b374cf7a70
6 changed files with 60 additions and 43 deletions
|
@ -42,7 +42,7 @@ public class GT_MetaTileEntity_PlasmaGenerator
|
|||
}
|
||||
|
||||
public void onConfigLoad() {
|
||||
this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "PlasmaGenerator.efficiency.tier." + this.mTier, (10 + (this.mTier * 10)));
|
||||
this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "PlasmaGenerator.efficiency.tier." + this.mTier, Math.max(10,10 + Math.min(90,this.mTier * 10)));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlock
|
|||
|
||||
fuelValue = aFuel.mSpecialValue;
|
||||
fuelRemaining = hatchFluid1.amount; //Record available fuel
|
||||
this.mEUt = mEfficiency < 2000 ? 0 : (int) (2048 * ((float) mEfficiency / 10000)); //Output 0 if startup is less than 20%
|
||||
this.mEUt = mEfficiency < 2000 ? 0 : (int) ((2048L * mEfficiency) / 10000L); //Output 0 if startup is less than 20%
|
||||
this.mProgresstime = 1;
|
||||
this.mMaxProgresstime = 1;
|
||||
this.mEfficiencyIncrease = 15;
|
||||
|
|
|
@ -92,7 +92,9 @@ public class GT_MetaTileEntity_ImplosionCompressor
|
|||
//In case recipe is too OP for that machine
|
||||
if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1)
|
||||
return false;
|
||||
this.mEUt = (-tRecipe.mEUt);
|
||||
if (this.mEUt > 0) {
|
||||
this.mEUt = (-this.mEUt);
|
||||
}
|
||||
this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0), tRecipe.getOutput(1)};
|
||||
sendLoopStart((byte) 20);
|
||||
updateSlots();
|
||||
|
|
|
@ -92,7 +92,12 @@ public class GT_MetaTileEntity_MultiFurnace
|
|||
if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1)
|
||||
return false;
|
||||
|
||||
this.mEUt = -GT_Utility.safeInt(((long)mEUt) * this.mLevel / (long)this.mCostDiscount);
|
||||
this.mEUt = GT_Utility.safeInt(((long)mEUt) * this.mLevel / (long)this.mCostDiscount,1);
|
||||
if (mEUt == Integer.MAX_VALUE - 1)
|
||||
return false;
|
||||
if (this.mEUt > 0) {
|
||||
this.mEUt = (-this.mEUt);
|
||||
}
|
||||
}
|
||||
updateSlots();
|
||||
return true;
|
||||
|
|
|
@ -48,7 +48,7 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl
|
|||
"1x Energy Hatch (Any casing)",
|
||||
"Robust Tungstensteel Casings for the rest (16 at least!)",
|
||||
"Place up to 64 Single Block GT Machines into the GUI Inventory",
|
||||
"Maximal tier of machines inside: 9"};
|
||||
"Maximal overclockedness of machines inside: Tier 9"};
|
||||
}
|
||||
|
||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
|
||||
|
@ -62,6 +62,29 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl
|
|||
return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "ProcessingArray.png");
|
||||
}
|
||||
|
||||
//TODO: Expand so it also does the non recipe map recipes
|
||||
/*
|
||||
public void remoteRecipeCheck() {
|
||||
if (mInventory[1] == null) return;
|
||||
String tmp = mInventory[1].getUnlocalizedName().replaceAll("gt.blockmachines.basicmachine.", "");
|
||||
if (tmp.startsWith("replicator")) {
|
||||
|
||||
} else if (tmp.startsWith("brewery")) {
|
||||
|
||||
} else if (tmp.startsWith("packer")) {
|
||||
|
||||
} else if (tmp.startsWith("printer")) {
|
||||
|
||||
} else if (tmp.startsWith("disassembler")) {
|
||||
|
||||
} else if (tmp.startsWith("massfab")) {
|
||||
|
||||
} else if (tmp.startsWith("scanner")) {
|
||||
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
public GT_Recipe.GT_Recipe_Map getRecipeMap() {
|
||||
if (mInventory[1] == null) return null;
|
||||
String tmp = mInventory[1].getUnlocalizedName().replaceAll("gt.blockmachines.basicmachine.", "");
|
||||
|
@ -172,51 +195,36 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl
|
|||
}
|
||||
ArrayList<ItemStack> tInputList = getStoredInputs();
|
||||
int tTier = 0;
|
||||
/* Better dont
|
||||
if (mInventory[1].getUnlocalizedName().endsWith("10")) {
|
||||
tTier = 10;
|
||||
}
|
||||
if (mInventory[1].getUnlocalizedName().endsWith("11")) {
|
||||
tTier = 11;
|
||||
}
|
||||
if (mInventory[1].getUnlocalizedName().endsWith("12")) {
|
||||
tTier = 12;
|
||||
}
|
||||
if (mInventory[1].getUnlocalizedName().endsWith("13")) {
|
||||
tTier = 13;
|
||||
}
|
||||
if (mInventory[1].getUnlocalizedName().endsWith("14")) {
|
||||
tTier = 14;
|
||||
}
|
||||
if (mInventory[1].getUnlocalizedName().endsWith("15")) {
|
||||
tTier = 15;
|
||||
}
|
||||
*/
|
||||
if (mInventory[1].getUnlocalizedName().endsWith("01")) {
|
||||
|
||||
if (mInventory[1].getUnlocalizedName().endsWith("10")) {
|
||||
tTier = 9;
|
||||
}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")) {
|
||||
tTier = 9;
|
||||
}else if (mInventory[1].getUnlocalizedName().endsWith("1")) {
|
||||
tTier = 1;
|
||||
}
|
||||
if (mInventory[1].getUnlocalizedName().endsWith("02")) {
|
||||
}else if (mInventory[1].getUnlocalizedName().endsWith("2")) {
|
||||
tTier = 2;
|
||||
}
|
||||
if (mInventory[1].getUnlocalizedName().endsWith("03")) {
|
||||
}else if (mInventory[1].getUnlocalizedName().endsWith("3")) {
|
||||
tTier = 3;
|
||||
}
|
||||
if (mInventory[1].getUnlocalizedName().endsWith("04")) {
|
||||
}else if (mInventory[1].getUnlocalizedName().endsWith("4")) {
|
||||
tTier = 4;
|
||||
}
|
||||
if (mInventory[1].getUnlocalizedName().endsWith("05")) {
|
||||
}else if (mInventory[1].getUnlocalizedName().endsWith("5")) {
|
||||
tTier = 5;
|
||||
}
|
||||
if (mInventory[1].getUnlocalizedName().endsWith("06")) {
|
||||
}else if (mInventory[1].getUnlocalizedName().endsWith("6")) {
|
||||
tTier = 6;
|
||||
}
|
||||
if (mInventory[1].getUnlocalizedName().endsWith("07")) {
|
||||
}else if (mInventory[1].getUnlocalizedName().endsWith("7")) {
|
||||
tTier = 7;
|
||||
}
|
||||
if (mInventory[1].getUnlocalizedName().endsWith("08")) {
|
||||
}else if (mInventory[1].getUnlocalizedName().endsWith("8")) {
|
||||
tTier = 8;
|
||||
}
|
||||
if (mInventory[1].getUnlocalizedName().endsWith("09")) {
|
||||
}else if (mInventory[1].getUnlocalizedName().endsWith("9")) {
|
||||
tTier = 9;
|
||||
}
|
||||
|
||||
|
@ -303,7 +311,10 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl
|
|||
this.mOutputFluids = new FluidStack[]{tFOut};
|
||||
updateSlots();
|
||||
return true;
|
||||
}/* else{
|
||||
...remoteRecipeCheck()
|
||||
}
|
||||
*/
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -74,7 +74,6 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlock
|
|||
if (this.mEUt > 0) {
|
||||
this.mEUt = (-this.mEUt);
|
||||
}
|
||||
this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
|
||||
if (tRecipe.mOutputs.length > 0) this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0)};
|
||||
if (tRecipe.mFluidOutputs.length > 0)
|
||||
this.mOutputFluids = new FluidStack[]{tRecipe.getFluidOutput(0)};
|
||||
|
|
Loading…
Reference in a new issue