Posted September 2, 201312 yr Hello, I have a problem. When i put a item in my gui and i do stackSize-- a ghost item remains in the gui. I solved that problem with packets, but i think there is a easier way to do this. This is how i do it: http://gw.minecraftforge.net/M2nX My second problem is that the power and the progress that's displayed on the gui wouldn't saved in the nbt data: http://gw.minecraftforge.net/XsgM ss7 You sir are a god damn hero.
September 3, 201312 yr Author Hello, I don't really understand you. Where should i do the check if the stack size is 0? Sorry i'm bad at packets. What do you mean with logic? Heres is my (now modified) TileEntity: http://gw.minecraftforge.net/ave4 ss7 You sir are a god damn hero.
September 3, 201312 yr Author Hello, Because when i put in a item in the generator, it burns down and creates power. But when i put a item in, it doesn't decrease the stack size, so the item burns forever. And when i take the item out and right-click with it, it's gone! And i thought this has something to do with desync. ss7 You sir are a god damn hero.
September 3, 201312 yr Author Hello, The isRemote does nothing :'(. And i don't know what methods in ContainerFurnace are for the progress bar. There are so many! ss7 You sir are a god damn hero.
September 3, 201312 yr Author Hello, if (worldObj.isRemote) { if (inventory[0] != null && progress == 0) { if (inventory[0].stackSize > 1) { inventory[0].stackSize--; } if (inventory[0].stackSize == 0) { inventory[0] = null; } progress = 13; power++; } } ss7 You sir are a god damn hero.
September 3, 201312 yr Author Hello, Oh, sorry for that, my mistake. My updateProgressBar, etc... code: http://gw.minecraftforge.net/U7Fz So can i remove my progress bar code in the updateEntity() method now? EDIT: When i check for isRemote == false, it does nothing. I doesn't even burn. ss7 You sir are a god damn hero.
September 3, 201312 yr Author Hello, With burn, i mean that the item is consumed and the generator starts to generate power. With progress bar code i mean this in updateEntity(): if (progressticks == 10) { progressticks = 0; if (progress != 0) { progress--; power++; } } ss7 You sir are a god damn hero.
September 3, 201312 yr Author Hello, Here is my code: http://gw.minecraftforge.net/UF28 BTW: Now it burns, but the stack size is not decreased. ss7 You sir are a god damn hero.
September 4, 201312 yr Author Hello, I really don't know what i should do next. ss7 You sir are a god damn hero.
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.