Synched Blueprint Library progress bars

This commit is contained in:
tcooc 2012-09-10 20:10:29 -05:00
parent 450ca9e59e
commit a65b768f34

View file

@ -48,6 +48,30 @@ public class ContainerBlueprintLibrary extends BuildCraftContainer {
addSlotToContainer(new Slot(playerInventory, i1, 8 + i1 * 18, 198));
}
@Override
public void updateCraftingResults() {
super.updateCraftingResults();
for (int i = 0; i < crafters.size(); i++) {
ICrafting icrafting = (ICrafting) crafters.get(i);
if (progressIn != library.progressIn)
icrafting.updateCraftingInventoryInfo(this, 0, library.progressIn);
if (progressOut != library.progressOut)
icrafting.updateCraftingInventoryInfo(this, 1, library.progressOut);
}
progressIn = library.progressIn;
progressOut = library.progressOut;
}
@Override
public void updateProgressBar(int i, int j) {
if (i == 0)
library.progressIn = j;
else if(i == 1)
library.progressOut = j;
}
@Override
public boolean canInteractWith(EntityPlayer entityplayer) {
return library.isUseableByPlayer(entityplayer);