I'm working on a 2D minecraft-like game, I use chunks to save my world and each chunk has 128*128 blocks in it.
And infinite chunks can create an infinite world.

Memory should never be infinite and only several chunks near the character shown in the screen can be loaded into memory. How can I handle logic based blocks like red stone signals when they are in chunks far away and so not loaded in memory?


Question: Hide "Close Window" option from taskbar
Answer: The Taskbar button uses the same menu that is assigned to the window itself.  There is no way to differentiate whether the menu is being invoked by clicking on the Taskbar versus clicking on the window (or even if it is being invoked by mouse or keyboard, for that matter).  If you disable the "Close" item, the user would not be able to close the window at all.  So just don't do it.