Vswe's Summer Courses | You're not logged in. Sign up or log in | Server time: | Donate
One can now see other persons' badge hunts. Simply head over to their profiles to access them.

Go back to course page

Climbing the interface ladder

From basic graphical interfaces to very advanced ones

progress bar not updating

  • 2013-12-13 15:53:04
    my progress bar doesn't update. it only calculates the size of the bar once. i guess drawGuiContainerBackground doesn't update?

    here is the method: http://pastebin.com/hGRprV8t
  • 2013-12-13 23:31:23
    Are you sure that "woodworker.time" is updated on the client?
  • 2013-12-14 06:51:09
    it should be. it gets calculated every world tick. and i use the whole update progress bar thing in the container.
    i will add those as well

    container: http://pastebin.com/tebKJ84z
    gui: http://pastebin.com/wQfe1pra
    tileentity: http://pastebin.com/jN5tpq7N
  • 2013-12-14 09:08:13
    Your problem is that in gui you create a new TileEntity instead of making a reference to one your machine is using. Your code should look like this:

    public class GuiWoodWorker extends GuiContainer{

    WoodWorkerTileEntity woodworker;

    public GuiWoodWorker(InventoryPlayer playerInventory, WoodWorkerTileEntity WoodWorkerTE) {
    super(new ContainerWoodWorker(playerInventory, WoodWorkerTE));

    woodworker = WoodWorkerTE;
    xSize = 176;
    ySize = 218;

  • 2013-12-14 12:33:08
    aaah that works. thanks alot!
  • Log in or sign up to reply to this thread