Skip to content

Commit

Permalink
cherry pick
Browse files Browse the repository at this point in the history
Fixed Mufflers and Large Boiler Fuels. (#1319)
92bcce8
Blood-Asp/GT5-Unofficial@92bcce8
  • Loading branch information
draknyte1 authored and Dream-Master committed Aug 19, 2018
1 parent 5f460c7 commit 8644538
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 18 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 @@ -1280,7 +1280,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 @@ -55,8 +55,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()+" Fire Boxes (Bottom layer, Min 3)",
"3x4x3 of "+getCasingMaterial()+" Casings (Above Fireboxes, hollow, Min 24!)",
"3x4x3 of "+getCasingMaterial()+" " +getCasingBlockType()+ " Casings (Above Fireboxes, hollow, Min 24!)",
"3 "+getCasingMaterial()+" Pipe Casing Blocks (Inside the Hollow Casing)",
"1x Input Fuel Hatch/Bus (Any Firebox)",
"1x Input Water Hatch (Any Firebox)",
Expand All @@ -58,6 +60,8 @@ public String[] getDescription() {

public abstract Block getCasingBlock();

public abstract String getCasingBlockType();

public abstract byte getCasingMeta();

public abstract byte getCasingTextureIndex();
Expand Down Expand Up @@ -136,21 +140,23 @@ 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;
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;
}
return true;
}
}
}
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 8644538

Please sign in to comment.