ArtFect / BlockHighlight

https://www.spigotmc.org/resources/blockhighlight.91087/
MIT License
10 stars 1 forks source link

Everything is green on 1.18.1 #7

Open ryantheleach opened 2 years ago

ryantheleach commented 2 years ago

It's not your fault, btw.

Mojang have added a shader :-(

    RenderSystem.setShaderColor(0.0f, 1.0f, 0.0f, 0.75f);

I wish it were different, just figured I'd let you know.


    private void renderMarker(BlockPos $$0, GameTestDebugRenderer.Marker $$1) {
        RenderSystem.enableBlend();
        RenderSystem.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
        RenderSystem.setShaderColor(0.0f, 1.0f, 0.0f, 0.75f);
        RenderSystem.disableTexture();
        DebugRenderer.renderFilledBox($$0, 0.02f, $$1.getR(), $$1.getG(), $$1.getB(), $$1.getA());
        if (!$$1.text.isEmpty()) {
            double $$2 = (double)$$0.getX() + 0.5;
            double $$3 = (double)$$0.getY() + 1.2;
            double $$4 = (double)$$0.getZ() + 0.5;
            DebugRenderer.renderFloatingText($$1.text, $$2, $$3, $$4, -1, 0.01f, true, 0.0f, true);
        }
        RenderSystem.enableTexture();
        RenderSystem.disableBlend();
    }