Fixes the mispositioned cursor when opening inventory and container screens (MC-261980). Either centres the cursor reliably, or restores the position it had inside the same screen last time. Client-side only, cursor positioning only.