added isActive to the crafter

This commit is contained in:
modmuss50 2015-05-21 21:27:16 +01:00
parent 9eb7735c10
commit 74e16510aa
3 changed files with 6 additions and 2 deletions

View file

@ -234,4 +234,8 @@ public class RecipeCrafter {
tag.setTag("Crater", data);
}
public boolean isActive(){
return currentRecipe != null && currentTickTime != 0;
}
}

View file

@ -65,7 +65,7 @@ public class BlockAssemblingMachine extends BlockMachineBase {
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
int metadata = blockAccess.getBlockMetadata(x, y, z);
TileAssemblingMachine tileAssemblingMachine = (TileAssemblingMachine) blockAccess.getTileEntity(x, y, z);
if(side == metadata && tileAssemblingMachine.crafter.currentRecipe != null){
if(side == metadata && tileAssemblingMachine.crafter.isActive()){
return this.iconFrontOn;
}
return metadata == 0 && side == 3 ? this.iconFront

View file

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