Tweaked thermal generator, closes #100
This commit is contained in:
parent
5b2bc53cfc
commit
ccb028a202
2 changed files with 17 additions and 2 deletions
|
@ -117,13 +117,20 @@ public class RecipesIC2 implements ICompatModule {
|
|||
'I', "plateInvar",
|
||||
'H', IC2Items.getItem("reinforcedGlass"),
|
||||
'C', "circuitBasic",
|
||||
'G', IC2Items.getItem("geothermalGenerator"));
|
||||
'G', new ItemStack(ModBlocks.heatGenerator));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.thermalGenerator),
|
||||
"AAA", "AHA", "CGC",
|
||||
'A', "plateAluminum",
|
||||
'H', IC2Items.getItem("reinforcedGlass"),
|
||||
'C', "circuitBasic",
|
||||
'G', new ItemStack(ModBlocks.heatGenerator));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.heatGenerator),
|
||||
"III", "IHI", "CGC",
|
||||
'I', "plateIron",
|
||||
'H', new ItemStack(Blocks.iron_bars),
|
||||
'C', "circuitBasic",
|
||||
'G', IC2Items.getItem("geothermalGenerator"));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.Gasturbine),
|
||||
|
|
|
@ -3,6 +3,7 @@ package techreborn.tiles;
|
|||
import ic2.api.energy.tile.IEnergyTile;
|
||||
import ic2.api.tile.IWrenchable;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
@ -136,8 +137,15 @@ public class TileThermalGenerator extends TilePowerAcceptor implements IWrenchab
|
|||
@Override
|
||||
public void updateEntity() {
|
||||
super.updateEntity();
|
||||
if (!worldObj.isRemote)
|
||||
if (!worldObj.isRemote){
|
||||
FluidUtils.drainContainers(this, inventory, 0, 1);
|
||||
for(ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS){
|
||||
if (worldObj.getBlock(xCoord + direction.offsetX, yCoord + direction.offsetY, zCoord + direction.offsetZ) == Blocks.lava) {
|
||||
addEnergy(euTick);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (tank.getFluidAmount() > 0
|
||||
&& getMaxPower() - getEnergy() >= euTick) {
|
||||
tank.drain(1, true);
|
||||
|
|
Loading…
Reference in a new issue