Derp
This commit is contained in:
parent
960087a0a8
commit
cddca6e2be
1 changed files with 25 additions and 24 deletions
|
@ -26,6 +26,7 @@ import java.util.Collection;
|
||||||
public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlockBase {
|
public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlockBase {
|
||||||
protected int fuelConsumption = 0;
|
protected int fuelConsumption = 0;
|
||||||
protected int fuelRemaining = 0;
|
protected int fuelRemaining = 0;
|
||||||
|
protected boolean enableTurboOut = false;
|
||||||
|
|
||||||
public GT_MetaTileEntity_DieselEngine(int aID, String aName, String aNameRegional) {
|
public GT_MetaTileEntity_DieselEngine(int aID, String aName, String aNameRegional) {
|
||||||
super(aID, aName, aNameRegional);
|
super(aID, aName, aNameRegional);
|
||||||
|
@ -70,15 +71,18 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlock
|
||||||
ArrayList<FluidStack> tFluids = getStoredFluids();
|
ArrayList<FluidStack> tFluids = getStoredFluids();
|
||||||
Collection<GT_Recipe> tRecipeList = GT_Recipe.GT_Recipe_Map.sDieselFuels.mRecipeList;
|
Collection<GT_Recipe> tRecipeList = GT_Recipe.GT_Recipe_Map.sDieselFuels.mRecipeList;
|
||||||
|
|
||||||
if(tHatches.size() > 0) {
|
|
||||||
if(tHatches.get(0).getStackInSlot(0) != null) {
|
|
||||||
ItemStack hatchStack = tHatches.get(0).getStackInSlot(0);
|
|
||||||
if(hatchStack.getItem() instanceof GT_MetaGenerated_Tool) { //Has a GT tool
|
|
||||||
GT_MetaGenerated_Tool hatchTool = (GT_MetaGenerated_Tool)tHatches.get(0).getStackInSlot(0).getItem();
|
|
||||||
|
|
||||||
//TODO Better method to detect turbine item. This will do for testing.
|
//TODO Better method to detect turbine item. This will do for testing.
|
||||||
int baseEUt = GT_MetaGenerated_Tool.getPrimaryMaterial(hatchStack).mDurability > 0 ? 8192 : 2048; //Choose base output
|
if(tHatches.size() > 0) {
|
||||||
|
if (tHatches.get(0).getStackInSlot(0) != null) {
|
||||||
|
ItemStack hatchStack = tHatches.get(0).getStackInSlot(0);
|
||||||
|
if (hatchStack.getItem() instanceof GT_MetaGenerated_Tool) { //Has a GT tool
|
||||||
|
GT_MetaGenerated_Tool hatchTool = (GT_MetaGenerated_Tool) tHatches.get(0).getStackInSlot(0).getItem();
|
||||||
|
if(GT_MetaGenerated_Tool.getPrimaryMaterial(hatchStack).mDurability > 0) enableTurboOut = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int baseEUt = enableTurboOut ? 8192 : 2048; //Choose base output
|
||||||
if(tFluids.size() > 0 && tRecipeList != null) { //Does input hatch have a diesel fuel?
|
if(tFluids.size() > 0 && tRecipeList != null) { //Does input hatch have a diesel fuel?
|
||||||
for (FluidStack hatchFluid1 : tFluids) { //Loops through hatches
|
for (FluidStack hatchFluid1 : tFluids) { //Loops through hatches
|
||||||
for(GT_Recipe aFuel : tRecipeList) { //Loops through diesel fuel recipes
|
for(GT_Recipe aFuel : tRecipeList) { //Loops through diesel fuel recipes
|
||||||
|
@ -99,9 +103,6 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlock
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue