1 parent
2f67690ec3
commit
6e32061d8f
1 file changed
+4
-1
@@ -561,11 +561,14 @@ public class ShapesRenderer
|
|||||||
{
|
{
|
||||||
text_x = (float) (-textRenderer.width(shape.value.getString()));
|
text_x = (float) (-textRenderer.width(shape.value.getString()));
|
||||||
}
|
}
|
||||||
MultiBufferSource.BufferSource immediate = MultiBufferSource.immediate(new ByteBufferBuilder(RenderType.TRANSIENT_BUFFER_SIZE));
|
try (ByteBufferBuilder bbb = new ByteBufferBuilder(RenderType.TRANSIENT_BUFFER_SIZE))
|
||||||
|
{
|
||||||
|
MultiBufferSource.BufferSource immediate = MultiBufferSource.immediate(bbb);
|
||||||
// text doesn't appear if backgroud is set
|
// text doesn't appear if backgroud is set
|
||||||
///script run draw_shape('label', 100, 'pos', [200, 100, 200], 'text', 'Hewwo World!', 'color', 0xffffffff, 'fill', 0x33333333)
|
///script run draw_shape('label', 100, 'pos', [200, 100, 200], 'text', 'Hewwo World!', 'color', 0xffffffff, 'fill', 0x33333333)
|
||||||
textRenderer.drawInBatch(shape.value, text_x, 0.0F, shape.textcolor, false, matrices.last().pose(), immediate, Font.DisplayMode.SEE_THROUGH, shape.textbck, 15728880);
|
textRenderer.drawInBatch(shape.value, text_x, 0.0F, shape.textcolor, false, matrices.last().pose(), immediate, Font.DisplayMode.SEE_THROUGH, shape.textbck, 15728880);
|
||||||
immediate.endBatch();
|
immediate.endBatch();
|
||||||
|
}
|
||||||
matrices.popPose();
|
matrices.popPose();
|
||||||
////RenderSystem.enableCull();
|
////RenderSystem.enableCull();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user