Posted May 1, 201411 yr Making a grinder - basically, it turns ores into dusts (not original, deal with it), but anyway, it smelts fine and whatnot (not changed it from the furnace code) but there is ONE thing I cannot figure out: The progress bars don't update. Here's the GuiGrinderBlock.java code: https://gist.github.com/anonymous/cf9d3555889a9aa302d6 And here's the actual image (for co-ordinates reference): http://puu.sh/8tGzs.png It's 256x256 and I can't see what my issue is. If you need any more code, please ask and it'll be provided.
May 1, 201411 yr Making a grinder - basically, it turns ores into dusts (not original, deal with it), but anyway, it smelts fine and whatnot (not changed it from the furnace code) but there is ONE thing I cannot figure out: The progress bars don't update. Here's the GuiGrinderBlock.java code: https://gist.github.com/anonymous/cf9d3555889a9aa302d6 And here's the actual image (for co-ordinates reference): http://puu.sh/8tGzs.png It's 256x256 and I can't see what my issue is. If you need any more code, please ask and it'll be provided. Looks like server and client aren't synced...(Made the same mistake ) Try to add something like this to your container: (simpleController is my tileEntity, you will have to change it to match your entity) public void detectAndSendChanges(){ super.detectAndSendChanges(); for (int i = 0; i < this.crafters.size(); ++i) { ICrafting icrafting = (ICrafting)this.crafters.get(i); if (this.lastDimensionEnergy != this.simpleController.dimensionEnergy) { icrafting.sendProgressBarUpdate(this, 0, this.simpleController.dimensionEnergy); } if (this.lastEnergy != this.simpleController.energy) { icrafting.sendProgressBarUpdate(this, 1, this.simpleController.energy); } if (this.lastTimeUntillTp != this.simpleController.timeUntillTp) { icrafting.sendProgressBarUpdate(this, 2, this.simpleController.timeUntillTp); } } this.lastDimensionEnergy = this.simpleController.dimensionEnergy; this.lastEnergy = this.simpleController.energy; this.lastTimeUntillTp =this.simpleController.timeUntillTp; //this.lastItemBurnTime = this.tileFurnace.currentItemBurnTime; } @SideOnly(Side.CLIENT) public void updateProgressBar(int slot, int value){ if(slot==0)this.simpleController.dimensionEnergy=value; if(slot==1)this.simpleController.energy=value; if(slot==2)this.simpleController.timeUntillTp=value; } If you tried to do this and it doesn't work could you please post your code? IF it works, don't forget to press the thank you button. Here could be your advertisement!
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.