Yooooo. I'm a fairly experienced software developer learning Java by creating a custom hacked client (lol)
I'm using MCP910
I'm having issues with my x-ray not rendering properly.
Whenever I enable it, it doesn't show all the ores in the area or any but a few 5-10.
This was tested with 2-8 render distance using Optifine, zooming changes nothing.
Built by making two modules; one for x-ray and one for the utilities such as which blocks should be rendered and if it is enabled, etc, etc... I edited the shouldSideBeRendered function to check an ArrayList with the block ids. It works, but only displays a few blocks.
If anyone knows this problem and the solution or just has an idea of what could fix it and wants to share it. It would be highly appreciated.
Do you only see blocks that are within immediately adjacent chunk sections (16x16x16 cubes)? Since 1.8 the game only renders chunks if it thinks the player can see them, based on the actual block properties (e.g. opaque or not); this is hardcoded to always be enabled, unlike the "Advanced OpenGL" setting in older versions (which also worked entirely different, it used occlusion queries to check if the GPU had actually rendered any visible geometry, hence it had no effect on x-ray).
That said, I do know that 1.8 disables culling in Spectator mode, at least if you are inside an opaque block, thus you can see everything when underground. I don't know where the exact code is but you can search for all references to "spectator" in the code (I have no experience with 1.8). Also, you need to force a re-render of chunks in order to update their rendering.