#Rendering text in-world

4 messages · Page 1 of 1 (latest)

frank tartan
#

Unsure when this changed, but I used to be able to render text in-world above an object using TextRenderer.draw() within a BlockEntityRenderer<> but this no longer seems to be the case, and the text simply is not rendered. Short code snippet below.

int backgroundOpacity = ConfigManager.labelBackgroundOpacity() << 24;
float x = -(textRenderer.getWidth(text) / 2f);
textRenderer.draw(text, x, 0, ConfigManager.textColor(), false, matrix4f, vertexConsumerProvider, TextRenderer.TextLayerType.NORMAL, backgroundOpacity, light);```

What am I doing wrong now?
rotund wedge
#

does your color have an alpha value?

frank tartan
#

Yes, it does

#

Sorry for the slow reply, was expecting a notification