From 7b1b131b2347d45793e9fd90f22c7fe4862709c4 Mon Sep 17 00:00:00 2001 From: Gig Date: Thu, 21 May 2015 00:42:44 +0100 Subject: [PATCH] Little things --- src/main/java/techreborn/api/recipe/RecipeCrafter.java | 1 + .../java/techreborn/blocks/machine/BlockAlloySmelter.java | 2 +- src/main/java/techreborn/tiles/TileAlloySmelter.java | 7 +++++-- src/main/java/techreborn/tiles/TileMachineBase.java | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/techreborn/api/recipe/RecipeCrafter.java b/src/main/java/techreborn/api/recipe/RecipeCrafter.java index c3dc15daa..2ac48d83d 100644 --- a/src/main/java/techreborn/api/recipe/RecipeCrafter.java +++ b/src/main/java/techreborn/api/recipe/RecipeCrafter.java @@ -135,6 +135,7 @@ public class RecipeCrafter { this.energy.setEnergyStored(this.energy.getEnergyStored() - currentRecipe.euPerTick()); } currentTickTime++; + parentTile.syncWithAll(); } } } diff --git a/src/main/java/techreborn/blocks/machine/BlockAlloySmelter.java b/src/main/java/techreborn/blocks/machine/BlockAlloySmelter.java index 8ae7fc83d..e634a8eac 100644 --- a/src/main/java/techreborn/blocks/machine/BlockAlloySmelter.java +++ b/src/main/java/techreborn/blocks/machine/BlockAlloySmelter.java @@ -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; } diff --git a/src/main/java/techreborn/tiles/TileAlloySmelter.java b/src/main/java/techreborn/tiles/TileAlloySmelter.java index 30eaf4152..8550f1c4d 100644 --- a/src/main/java/techreborn/tiles/TileAlloySmelter.java +++ b/src/main/java/techreborn/tiles/TileAlloySmelter.java @@ -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 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"); } diff --git a/src/main/java/techreborn/tiles/TileMachineBase.java b/src/main/java/techreborn/tiles/TileMachineBase.java index f6f78fdee..9f30ca0b8 100644 --- a/src/main/java/techreborn/tiles/TileMachineBase.java +++ b/src/main/java/techreborn/tiles/TileMachineBase.java @@ -18,7 +18,7 @@ public class TileMachineBase extends TileEntity { public void updateEntity() { super.updateEntity(); // TODO make this happen less - // syncWithAll(); +// syncWithAll(); } @SideOnly(Side.CLIENT)