diff --git a/common/buildcraft/builders/BlockBuilder.java b/common/buildcraft/builders/BlockBuilder.java index f567b4b2..98d6f281 100644 --- a/common/buildcraft/builders/BlockBuilder.java +++ b/common/buildcraft/builders/BlockBuilder.java @@ -12,6 +12,7 @@ package buildcraft.builders; import java.util.ArrayList; import net.minecraft.src.BlockContainer; +import net.minecraft.src.CreativeTabs; import net.minecraft.src.EntityLiving; import net.minecraft.src.EntityPlayer; import net.minecraft.src.Item; @@ -41,6 +42,7 @@ public class BlockBuilder extends BlockContainer { blockTextureTop = 3 * 16 + 6; blockTextureFront = 3 * 16 + 7; setHardness(0.7F); + setCreativeTab(CreativeTabs.tabRedstone); } @Override diff --git a/common/buildcraft/builders/gui/ContainerBlueprintLibrary.java b/common/buildcraft/builders/gui/ContainerBlueprintLibrary.java index 6e58b1dc..a311a77c 100644 --- a/common/buildcraft/builders/gui/ContainerBlueprintLibrary.java +++ b/common/buildcraft/builders/gui/ContainerBlueprintLibrary.java @@ -16,6 +16,7 @@ import buildcraft.core.blueprints.BptBase; import buildcraft.core.gui.BuildCraftContainer; import net.minecraft.src.EntityPlayer; +import net.minecraft.src.ICrafting; import net.minecraft.src.IInventory; import net.minecraft.src.Slot; @@ -25,6 +26,8 @@ public class ContainerBlueprintLibrary extends BuildCraftContainer { protected IInventory playerInventory; protected TileBlueprintLibrary library; + + private int progressIn, progressOut; public ContainerBlueprintLibrary(EntityPlayer player, TileBlueprintLibrary library) { super(library.getSizeInventory()); @@ -48,6 +51,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);