Little things

This commit is contained in:
Gig 2015-05-21 00:42:44 +01:00
parent 1446237236
commit 7b1b131b23
4 changed files with 8 additions and 4 deletions

View file

@ -135,6 +135,7 @@ public class RecipeCrafter {
this.energy.setEnergyStored(this.energy.getEnergyStored() - currentRecipe.euPerTick()); this.energy.setEnergyStored(this.energy.getEnergyStored() - currentRecipe.euPerTick());
} }
currentTickTime++; currentTickTime++;
parentTile.syncWithAll();
} }
} }
} }

View file

@ -65,7 +65,7 @@ public class BlockAlloySmelter extends BlockMachineBase {
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) { public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
int metadata = blockAccess.getBlockMetadata(x, y, z); int metadata = blockAccess.getBlockMetadata(x, y, z);
TileAlloySmelter tileAlloySmelter = (TileAlloySmelter) blockAccess.getTileEntity(x, y, z); TileAlloySmelter tileAlloySmelter = (TileAlloySmelter) blockAccess.getTileEntity(x, y, z);
if(side == metadata && tileAlloySmelter.crafter.currentRecipe != null){ if(side == metadata && tileAlloySmelter.crafter.currentRecipe != null && tileAlloySmelter.crafter.currentTickTime !=0){
return this.iconFrontOn; return this.iconFrontOn;
} }

View file

@ -19,10 +19,11 @@ public class TileAlloySmelter extends TileMachineBase implements IWrenchable, IE
public BasicSink energy; public BasicSink energy;
public Inventory inventory = new Inventory(8, "TileAlloySmelter", 64); public Inventory inventory = new Inventory(8, "TileAlloySmelter", 64);
public RecipeCrafter crafter; public RecipeCrafter crafter;
public int capacity = 1000;
public TileAlloySmelter(){ public TileAlloySmelter(){
//TODO configs //TODO configs
energy = new BasicSink(this, 1000, 2); energy = new BasicSink(this, capacity, 1);
//Input slots //Input slots
int[] inputs = new int[2]; int[] inputs = new int[2];
inputs[0] = 0; inputs[0] = 0;
@ -94,6 +95,8 @@ public class TileAlloySmelter extends TileMachineBase implements IWrenchable, IE
@Override @Override
public void invalidate(){ public void invalidate(){
energy.invalidate(); energy.invalidate();
super.invalidate();
} }
@Override @Override
public void onChunkUnload(){ public void onChunkUnload(){
@ -103,7 +106,7 @@ public class TileAlloySmelter extends TileMachineBase implements IWrenchable, IE
@Override @Override
public void addWailaInfo(List<String> info){ public void addWailaInfo(List<String> info){
super.addWailaInfo(info); super.addWailaInfo(info);
info.add("Power Stored " + energy.getEnergyStored() +" EU"); info.add("Power Stored " + energy.getEnergyStored() + "/" + energy.getCapacity() +" EU");
if(crafter.currentRecipe !=null){ if(crafter.currentRecipe !=null){
info.add("Power Usage " + crafter.currentRecipe.euPerTick() + " EU/t"); info.add("Power Usage " + crafter.currentRecipe.euPerTick() + " EU/t");
} }