Fixed Mufflers and Large Boiler Fuels. (#1319)

* Fixed Muffler abuse. They can no longer face downwards, into a machine.

* Lava in Large Boiler Fix.
"The Large Boiler can burn almost all forms of solid and liquid fuel, except lava." - https://ftb.gamepedia.com/Large_Boiler

* Improved Large Boiler Tooltip, Fixes #1314.
This commit is contained in:
Alkalus 2018-02-11 03:54:15 +10:00 committed by Blood-Asp
parent 65930a207b
commit 92bcce8fd5
7 changed files with 45 additions and 20 deletions

View file

@ -1198,7 +1198,6 @@ public class GT_Mod implements IGT_Mod {
GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1),
GT_OreDictUnificator.get(ItemList.Block_SSFUEL.get(1, new Object[0])),
GT_OreDictUnificator.get(ItemList.Block_MSSFUEL.get(1, new Object[0])),
GT_OreDictUnificator.get(OrePrefixes.bucket, Materials.Lava, 1),
GT_OreDictUnificator.get(OrePrefixes.rod, Materials.Blaze, 1));
if (Loader.isModLoaded("Thaumcraft")) {
GT_Recipe.GT_Recipe_Map.sLargeBoilerFakeFuels.addSolidRecipe(GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1));

View file

@ -54,8 +54,8 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch {
@Override
public boolean isFacingValid(byte aFacing) {
return true;
}
return aFacing != 0;
}
@Override
public boolean isAccessAllowed(EntityPlayer aPlayer) {

View file

@ -2,6 +2,7 @@ package gregtech.common.tileentities.machines.multi;
import gregtech.GT_Mod;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.enums.Textures;
import gregtech.api.gui.GT_GUIContainer_MultiMachine;
import gregtech.api.interfaces.ITexture;
@ -9,6 +10,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import net.minecraft.block.Block;
@ -42,7 +44,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler
"A programmed circuit in the main block throttles the boiler (-1000L/s per config)",
"Size(WxHxD): 3x5x3, Controller (Front middle in Fireboxes)",
"3x1x3 of " +getCasingMaterial()+ " Firebox Casings (Bottom layer, Min 3)",
"3x4x3 of " +getCasingMaterial()+ " Machine Casings/Plated Bricks (Above Fireboxes, hollow, Min 24!)",
"3x4x3 of " +getCasingMaterial()+ " " +getCasingBlockType()+ " (Above Fireboxes, hollow, Min 24!)",
"1x3x1 of " +getCasingMaterial()+ " Pipe Casings (Inside the Hollow Machine Casings/Plated Bricks)",
"1x Fuel Input Hatch/Bus (Any Firebox)",
"1x Water Input Hatch (Any Firebox)",
@ -57,6 +59,8 @@ public abstract class GT_MetaTileEntity_LargeBoiler
public abstract String getCasingMaterial();
public abstract Block getCasingBlock();
public abstract String getCasingBlockType();
public abstract byte getCasingMeta();
@ -136,22 +140,24 @@ public abstract class GT_MetaTileEntity_LargeBoiler
ArrayList<ItemStack> tInputList = getStoredInputs();
if (!tInputList.isEmpty()) {
for (ItemStack tInput : tInputList) {
if (GT_Utility.getFluidForFilledItem(tInput, true) == null && (this.mMaxProgresstime = GT_ModHandler.getFuelValue(tInput) / 80) > 0) {
this.excessFuel += GT_ModHandler.getFuelValue(tInput) % 80;
this.mMaxProgresstime += this.excessFuel / 80;
this.excessFuel %= 80;
this.mMaxProgresstime = adjustBurnTimeForConfig(runtimeBoost(this.mMaxProgresstime));
this.mEUt = adjustEUtForConfig(getEUt());
this.mEfficiencyIncrease = this.mMaxProgresstime * getEfficiencyIncrease();
this.mOutputItems = new ItemStack[]{GT_Utility.getContainerItem(tInput, true)};
tInput.stackSize -= 1;
updateSlots();
if (this.mEfficiencyIncrease > 5000) {
this.mEfficiencyIncrease = 0;
this.mSuperEfficencyIncrease = 20;
}
return true;
}
if (tInput != GT_OreDictUnificator.get(OrePrefixes.bucket, Materials.Lava, 1)){
if (GT_Utility.getFluidForFilledItem(tInput, true) == null && (this.mMaxProgresstime = GT_ModHandler.getFuelValue(tInput) / 80) > 0) {
this.excessFuel += GT_ModHandler.getFuelValue(tInput) % 80;
this.mMaxProgresstime += this.excessFuel / 80;
this.excessFuel %= 80;
this.mMaxProgresstime = adjustBurnTimeForConfig(runtimeBoost(this.mMaxProgresstime));
this.mEUt = adjustEUtForConfig(getEUt());
this.mEfficiencyIncrease = this.mMaxProgresstime * getEfficiencyIncrease();
this.mOutputItems = new ItemStack[]{GT_Utility.getContainerItem(tInput, true)};
tInput.stackSize -= 1;
updateSlots();
if (this.mEfficiencyIncrease > 5000) {
this.mEfficiencyIncrease = 0;
this.mSuperEfficencyIncrease = 20;
}
return true;
}
}
}
}
this.mMaxProgresstime = 0;

View file

@ -23,6 +23,11 @@ public class GT_MetaTileEntity_LargeBoiler_Bronze
return "Bronze";
}
@Override
public String getCasingBlockType() {
return "Plated Bricks";
}
public Block getCasingBlock() {
return GregTech_API.sBlockCasings1;
}

View file

@ -23,6 +23,11 @@ public class GT_MetaTileEntity_LargeBoiler_Steel
return "Steel";
}
@Override
public String getCasingBlockType() {
return "Machine Casings";
}
public Block getCasingBlock() {
return GregTech_API.sBlockCasings2;
}

View file

@ -23,6 +23,11 @@ public class GT_MetaTileEntity_LargeBoiler_Titanium
return "Titanium";
}
@Override
public String getCasingBlockType() {
return "Machine Casings";
}
public Block getCasingBlock() {
return GregTech_API.sBlockCasings4;
}

View file

@ -23,6 +23,11 @@ public class GT_MetaTileEntity_LargeBoiler_TungstenSteel
return "TungstenSteel";
}
@Override
public String getCasingBlockType() {
return "Machine Casings";
}
public Block getCasingBlock() {
return GregTech_API.sBlockCasings4;
}