Revert "make steam boilers not automatable"

This commit is contained in:
Dream-Master 2016-06-24 20:44:28 +02:00
parent efaa163cfe
commit 5e1720e282
3 changed files with 9 additions and 25 deletions

View file

@ -244,11 +244,11 @@ public abstract class GT_MetaTileEntity_Boiler
}
public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
return false;
return (aIndex == 1) || (aIndex == 3);
}
public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
return false;
return aIndex == 2;
}
public void doSound(byte aIndex, double aX, double aY, double aZ) {

View file

@ -10,7 +10,6 @@ import gregtech.api.util.GT_ModHandler;
import gregtech.common.gui.GT_Container_Boiler;
import gregtech.common.gui.GT_GUIContainer_Boiler;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidHandler;
@ -60,19 +59,6 @@ public class GT_MetaTileEntity_Boiler_Solar
return new GT_MetaTileEntity_Boiler_Solar(this.mName, this.mTier, this.mDescription, this.mTextures);
}
private int mRunTime = 0;
@Override
public void saveNBTData(NBTTagCompound aNBT) {
super.saveNBTData(aNBT);
aNBT.setInteger("mRunTime", this.mRunTime);
}
@Override
public void loadNBTData(NBTTagCompound aNBT) {
super.loadNBTData(aNBT);
this.mRunTime = aNBT.getInteger("mRunTime");
}
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
if ((aBaseMetaTileEntity.isServerSide()) && (aTick > 20L)) {
@ -106,18 +92,14 @@ public class GT_MetaTileEntity_Boiler_Solar
aBaseMetaTileEntity.doExplosion(2048L);
return;
}
this.mFluid.amount -= 1;
mRunTime += 1;
int tOutput = 150;
if(mRunTime > 10000){
tOutput = Math.max(50, 150 - ((mRunTime-10000)/100));
}
if (this.mSteam == null) {
this.mSteam = GT_ModHandler.getSteam(tOutput);
this.mSteam = GT_ModHandler.getSteam(150L);
} else if (GT_ModHandler.isSteam(this.mSteam)) {
this.mSteam.amount += tOutput;
this.mSteam.amount += 150;
} else {
this.mSteam = GT_ModHandler.getSteam(tOutput);
this.mSteam = GT_ModHandler.getSteam(150L);
}
}
} else {
@ -140,4 +122,4 @@ public class GT_MetaTileEntity_Boiler_Solar
aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0);
}
}
}

View file

@ -180,6 +180,7 @@ public class GT_MachineRecipeLoader
GT_Values.RA.addMixerRecipe(EnumCube.COKE_BLOCK.getItem(), ItemList.SFMixture.get(1, new Object[]{}), null, null, Materials.NitroFuel.getFluid(250), null, ItemList.Block_SSFUEL.get(1, new Object[]{}), 120, 96);
GT_Values.RA.addMixerRecipe(EnumCube.COKE_BLOCK.getItem(), ItemList.SFMixture.get(1, new Object[]{}), null, null, Materials.HeavyFuel.getFluid(375), null, ItemList.Block_SSFUEL.get(1, new Object[]{}), 120, 96);
GT_Values.RA.addMixerRecipe(EnumCube.COKE_BLOCK.getItem(), ItemList.SFMixture.get(1, new Object[]{}), null, null, Materials.LPG.getFluid(375), null, ItemList.Block_SSFUEL.get(1, new Object[]{}), 120, 96);
if(Loader.isModLoaded("Thaumcraft"))
{
GT_Values.RA.addMixerRecipe(EnumCube.COKE_BLOCK.getItem(), ItemList.MSFMixture.get(1, new Object[]{}), GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 4), null, Materials.NitroFuel.getFluid(250), null, ItemList.Block_MSSFUEL.get(1, new Object[]{}), 120, 96);
@ -187,6 +188,7 @@ public class GT_MachineRecipeLoader
GT_Values.RA.addMixerRecipe(EnumCube.COKE_BLOCK.getItem(), ItemList.MSFMixture.get(1, new Object[]{}), GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 4), null, Materials.LPG.getFluid(375), null, ItemList.Block_MSSFUEL.get(1, new Object[]{}), 120, 96);
}
}
GT_Values.RA.addExtruderRecipe(ItemList.FR_Wax.get(1L, new Object[0]), ItemList.Shape_Extruder_Cell.get(0L, new Object[0]), ItemList.FR_WaxCapsule.get(1L, new Object[0]), 64, 16);
GT_Values.RA.addExtruderRecipe(ItemList.FR_RefractoryWax.get(1L, new Object[0]), ItemList.Shape_Extruder_Cell.get(0L, new Object[0]), ItemList.FR_RefractoryCapsule.get(1L, new Object[0]), 128, 16);