Skip to content

Commit

Permalink
Fixed Mufflers and Large Boiler Fuels. (#1319)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
draknyte1 authored and Blood-Asp committed Feb 10, 2018
1 parent 65930a2 commit 92bcce8
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 20 deletions.
1 change: 0 additions & 1 deletion src/main/java/gregtech/GT_Mod.java
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,6 @@ private void addSolidFakeLargeBoilerFuels(){
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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ public boolean isSimpleMachine() {

@Override
public boolean isFacingValid(byte aFacing) {
return true;
}
return aFacing != 0;
}

@Override
public boolean isAccessAllowed(EntityPlayer aPlayer) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

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;
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;
Expand Down Expand Up @@ -42,7 +44,7 @@ public String[] getDescription() {
"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)",
Expand All @@ -57,6 +59,8 @@ public String[] getDescription() {
public abstract String getCasingMaterial();

public abstract Block getCasingBlock();

public abstract String getCasingBlockType();

public abstract byte getCasingMeta();

Expand Down Expand Up @@ -136,22 +140,24 @@ public boolean checkRecipe(ItemStack aStack) {
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ public String getCasingMaterial(){
return "Bronze";
}

@Override
public String getCasingBlockType() {
return "Plated Bricks";
}

public Block getCasingBlock() {
return GregTech_API.sBlockCasings1;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ public String getCasingMaterial(){
return "Steel";
}

@Override
public String getCasingBlockType() {
return "Machine Casings";
}

public Block getCasingBlock() {
return GregTech_API.sBlockCasings2;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ public String getCasingMaterial(){
return "Titanium";
}

@Override
public String getCasingBlockType() {
return "Machine Casings";
}

public Block getCasingBlock() {
return GregTech_API.sBlockCasings4;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ public String getCasingMaterial(){
return "TungstenSteel";
}

@Override
public String getCasingBlockType() {
return "Machine Casings";
}

public Block getCasingBlock() {
return GregTech_API.sBlockCasings4;
}
Expand Down

0 comments on commit 92bcce8

Please sign in to comment.