- 
                Notifications
    
You must be signed in to change notification settings  - Fork 101
 
Fixes some error, specifically why blocks with a transparent RenderT… #499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…pe do not have a light blue tint applied when inside an oxygen bubble in the same way as other blocks. The issue was that the oxygen bubble's visual effect, a semi-transparent blue sphere, was not being applied to blocks that were themselves transparent (like glass). This happened because of how Minecraft's rendering engine layers different types of graphics. SO ! By default, the bubble was rendered in the "translucent" layer. This layer is for things like water and stained glass. Objects in this layer are sorted by distance, but they don't write to or check against the main depth buffer, which is what tells the GPU what is in front of what on a per-pixel basis. As a result, when the bubble tried to render over a glass block, it didn't have the depth information to know it should be drawn "on top" of the glass, so the effect was lost.
NOTE : THIS DOESNT HAVE TEXTURES
| 
           Please could you move the grappling hook implementation to a separate PR since it is unrelated to the oxygen bubble bugfix. In general, it is much better to try to keep each PR focused on a single task. This will make it quicker and easier for your code to be reviewed and merged, as well as reducing the chance of something being overlooked. Also, I imagine the oxygen bubble bugfix will be ready much sooner than the grappling hook implementation, so it would be nice not to have to wait unnecessarily. Also, if you haven't done already could familiarise yourself with the contributing guidelines. In particular, it would be great if you could try to use the conventional commits style to write your commit messages and pull request titles, which should only be a small adjustment and take a few seconds extra.  | 
    
| 
           Also, it doesn't compile...  | 
    
| 
           I AM SO SORRY, I FORGOT TO COMMIT AND FELL ASLEEP OUT OF EXAUSTION, AAAAAA  | 
    
| 
           compiles now  | 
    

so ...
The issue was that the oxygen bubble's visual effect, a semi-transparent blue sphere, was not being applied to blocks that were themselves transparent (like glass). This happened because of how Minecraft's rendering engine layers different types of graphics.
so i added:
- .setDepthTestState(new RenderStateShard.DepthTestStateShard("less", 513))
- .setTargetState(new RenderStateShard.TargetStateShard("translucent", () -> {}, () -> {}))
I also added a depth test to resolve some exiting errors in the shader. Should be good to go now.