|
17 | 17 | import net.minecraft.text.Text; |
18 | 18 | import net.minecraft.util.Identifier; |
19 | 19 | import net.minecraft.util.math.RotationAxis; |
| 20 | +import net.minecraft.util.math.Vec3d; |
20 | 21 | import org.jetbrains.annotations.NotNull; |
21 | 22 | import org.jetbrains.annotations.Nullable; |
22 | 23 | import org.joml.Matrix4f; |
@@ -168,7 +169,7 @@ public static void renderErrCode(int code, ScreenBlockEntity entity, float width |
168 | 169 | float txt_width = width * 0.95f; |
169 | 170 | float txt_gap = width * 0.05f; |
170 | 171 |
|
171 | | - matrices.translate(txt_width/2f - (txt_gap/2f), height/2f - (lineHeight/2f), -.01f); // Upper-Left corner |
| 172 | + matrices.translate(txt_width/2f - (txt_gap/2f), height/2f - (lineHeight/2f), -.1f); // Upper-Left corner |
172 | 173 | matrices.scale(-font_scale, -font_scale, -.1f); |
173 | 174 |
|
174 | 175 | // Alt-Text |
@@ -242,7 +243,7 @@ private void renderTextCentered(String text, int color, float scr_width, float s |
242 | 243 |
|
243 | 244 | // Apply |
244 | 245 | matrices.scale(-font_scale_factor, -font_scale_factor, -0.1f); |
245 | | - matrices.translate(-textRenderer.getWidth(text)/2f, -textRenderer.fontHeight/2f, .05f); // Remove offset of string |
| 246 | + matrices.translate(-textRenderer.getWidth(text)/2f, -textRenderer.fontHeight/2f, -.1f); // Remove offset of string |
246 | 247 |
|
247 | 248 | textRenderer.draw(text, 0, 0, color, true, matrices.peek().getPositionMatrix(), vertexConsumers, TextRenderer.TextLayerType.NORMAL, 0, light); |
248 | 249 | } |
@@ -303,4 +304,9 @@ private static void renderFilledRectangle(int color, float x1, float x2, float y |
303 | 304 | public boolean rendersOutsideBoundingBox(ScreenBlockEntity blockEntity) { |
304 | 305 | return true; |
305 | 306 | } |
| 307 | + |
| 308 | + @Override |
| 309 | + public boolean isInRenderDistance(ScreenBlockEntity blockEntity, Vec3d pos) { |
| 310 | + return true; |
| 311 | + } |
306 | 312 | } |
0 commit comments