skruffysdeveloper Posted January 23, 2016 Posted January 23, 2016 I want to update the Forge x-ray mod that is posted on MCForums, yet the way that author is doing it is by using GL. I was wondering if there was a more simple way to do it such as just getting all the blocks around the player and hiding them? I've been looking at the docs for an hour now. Quote
Ernio Posted January 23, 2016 Posted January 23, 2016 On 1/23/2016 at 3:40 AM, skruffysdeveloper said: ...author is doing it is by using GL. Quote just getting all the blocks around the player and hiding them? ( hiding == not rendering ) => (not) using GL => GL PLAYS ROLE Not rendering blocks is the only logical thing to do. Even if you don't need to see them, you still need to have them (to e.g walk), so removing would be stupid. Also - I doubt many here approve cheat mods, but do as you like As to how and what - Forge doesn't provide per-block rendering events so only option would be to hook into vanilla with AT (bytecode). Without it, only way to do stuff like this would be to rewrite (replace) world renderer or dynamically replace block textures to transparent (which is possible without mod, but whatever). P.S: Don't bump soo early... jeez Quote Quote 1.7.10 is no longer supported by forge, you are on your own.
Zaerudath Posted January 23, 2016 Posted January 23, 2016 Getting blocks to not render isn't too difficult: place a non-colliding block that says it occludes neighboring faces and then don't render it. But this isn't actually very helpful in 1.8 because it is much smarted at culling caves and other faces that aren't visible to the player. So you can do it, but there isn't much to see. If you want to highlight hidden blocks with an outline, you could render that as an overlay, but it will still require OpenGL as Ernio points out. Rendering anything other than pre-defined block/item models is likely going to require OpenGL. Also, X-Ray mods are lame. Quote
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.