I am making a Storage Cell which uses the RF API.
My SC all works fine I can add energy into its storage which it will hold and retain on saving, it will also pass the energy it holds to something that accepts RF which is connected to it.
My problem starts when I try and update my Blockstate.
My chkFill() method checks how much energy is stored and as it changes it sets the variable fillLevel up or down depending if its going in or out.
If I trigger this method the storage goes up and when the condition is met to change to next fillLevel the fillLevel value goes up and then the blockstate is changed then out of nowhere it resets its storage & fillLevel and starts again.
I'm baffled as there is nothing in the chkFill() to reset the storage and the fillLevel should only be changed if specific conditions are met, without chkFill() it works but no blockstate change.
My TileEntity for the Storage Cell is here: http://pastebin.com/FRtj7YtF
Any help on this would be really great.