From 450ca9e59e67d86eb373395dc2768693d4a7b68c Mon Sep 17 00:00:00 2001 From: tcooc Date: Mon, 10 Sep 2012 20:06:37 -0500 Subject: [PATCH 1/3] Added Builder to creative inventory --- common/buildcraft/builders/BlockBuilder.java | 1 + 1 file changed, 1 insertion(+) diff --git a/common/buildcraft/builders/BlockBuilder.java b/common/buildcraft/builders/BlockBuilder.java index f567b4b2..c377aa94 100644 --- a/common/buildcraft/builders/BlockBuilder.java +++ b/common/buildcraft/builders/BlockBuilder.java @@ -41,6 +41,7 @@ public class BlockBuilder extends BlockContainer { blockTextureTop = 3 * 16 + 6; blockTextureFront = 3 * 16 + 7; setHardness(0.7F); + setCreativeTab(CreativeTabs.tabRedstone); } @Override From a65b768f34644c8aec6de26bbac4f9b614c8db73 Mon Sep 17 00:00:00 2001 From: tcooc Date: Mon, 10 Sep 2012 20:10:29 -0500 Subject: [PATCH 2/3] Synched Blueprint Library progress bars --- .../gui/ContainerBlueprintLibrary.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/common/buildcraft/builders/gui/ContainerBlueprintLibrary.java b/common/buildcraft/builders/gui/ContainerBlueprintLibrary.java index 6e58b1dc..e604dd66 100644 --- a/common/buildcraft/builders/gui/ContainerBlueprintLibrary.java +++ b/common/buildcraft/builders/gui/ContainerBlueprintLibrary.java @@ -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); From 2ce657e4aa66fb3f70c346614d3452e2ac3526bd Mon Sep 17 00:00:00 2001 From: tcooc Date: Mon, 10 Sep 2012 21:29:04 -0500 Subject: [PATCH 3/3] Added missing fields and imports --- common/buildcraft/builders/BlockBuilder.java | 1 + common/buildcraft/builders/gui/ContainerBlueprintLibrary.java | 3 +++ 2 files changed, 4 insertions(+) diff --git a/common/buildcraft/builders/BlockBuilder.java b/common/buildcraft/builders/BlockBuilder.java index c377aa94..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; diff --git a/common/buildcraft/builders/gui/ContainerBlueprintLibrary.java b/common/buildcraft/builders/gui/ContainerBlueprintLibrary.java index e604dd66..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());