onVoid Posted May 7, 2016 Posted May 7, 2016 With EnderIO items when I take it out of my custom charger, fully charged, it removes the charge and reverts to its uncharged state. But, if press a number key on the item to make it go to my hotbar, it keeps the charge. Anyone know why this is happening? Quote
onVoid Posted May 21, 2016 Author Posted May 21, 2016 Show your code. For which part? TileEntity? Gui? Container? Quote
onVoid Posted May 21, 2016 Author Posted May 21, 2016 All 3. TileEntity: http://pastebin.com/p4Bi42qg Gui: http://pastebin.com/aCGSPub9 Container: http://pastebin.com/ErQ8i332 Quote
onVoid Posted May 21, 2016 Author Posted May 21, 2016 Why in the world are charging , chargingDC , chargingDC2 and storage static? Right, because you are using them statically in GuiCharger#drawGuiContainerForegroundLayer . But GuiCharger has the TE instance available... I guess from me being oblivious. chargingDC and chargingDC2 are from a complicated method of keeping track of energy being used that I attempted. I removed static tags, running a test now. Quote
onVoid Posted May 21, 2016 Author Posted May 21, 2016 Why in the world are charging , chargingDC , chargingDC2 and storage static? Right, because you are using them statically in GuiCharger#drawGuiContainerForegroundLayer . But GuiCharger has the TE instance available... Now that I changed it, the RF doesn't show in the machine anymore. Updated Gui: http://pastebin.com/U0havBJq Quote
onVoid Posted May 21, 2016 Author Posted May 21, 2016 Well, do you have code in place to synchronize it? Probably not. In this: http://www.minecraftforge.net/forum/index.php/topic,38900.0.html post I was told energy could be synced automatically using TileEnergyHandler. Quote
Choonster Posted May 21, 2016 Posted May 21, 2016 I said nothing about syncing, I was only talking about reading from/writing to NBT. You need to handle syncing yourself. Quote Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
Recommended Posts
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.