Little things
This commit is contained in:
parent
1446237236
commit
7b1b131b23
4 changed files with 8 additions and 4 deletions
|
@ -135,6 +135,7 @@ public class RecipeCrafter {
|
|||
this.energy.setEnergyStored(this.energy.getEnergyStored() - currentRecipe.euPerTick());
|
||||
}
|
||||
currentTickTime++;
|
||||
parentTile.syncWithAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ public class TileMachineBase extends TileEntity {
|
|||
public void updateEntity() {
|
||||
super.updateEntity();
|
||||
// TODO make this happen less
|
||||
// syncWithAll();
|
||||
// syncWithAll();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
|
Loading…
Reference in a new issue