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());
}
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) {
int metadata = blockAccess.getBlockMetadata(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;
}

View file

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

View file

@ -18,7 +18,7 @@ public class TileMachineBase extends TileEntity {
public void updateEntity() {
super.updateEntity();
// TODO make this happen less
// syncWithAll();
// syncWithAll();
}
@SideOnly(Side.CLIENT)