|
1 | 1 | package wtf.choco.veinminer.client.render; |
2 | 2 |
|
| 3 | +import com.google.common.base.Suppliers; |
3 | 4 | import com.mojang.blaze3d.vertex.PoseStack; |
4 | 5 | import com.mojang.blaze3d.vertex.PoseStack.Pose; |
5 | 6 | import com.mojang.blaze3d.vertex.VertexConsumer; |
@@ -33,15 +34,15 @@ public final class WireframeShapeRenderer { |
33 | 34 | private static final int WIREFRAME_COLOR_SOLID = ARGB.color(255, WIREFRAME_COLOR); |
34 | 35 | private static final int WIREFRAME_COLOR_TRANSLUCENT = ARGB.color(20, WIREFRAME_COLOR); |
35 | 36 |
|
36 | | - private static final Supplier<VoxelShape> DEBUG_SHAPE = () -> Shapes.or( |
| 37 | + private static final Supplier<VoxelShape> DEBUG_SHAPE = Suppliers.memoize(() -> Shapes.or( |
37 | 38 | Shapes.block(), |
38 | 39 | Shapes.block().move(0, 1, 0), |
39 | 40 | Shapes.block().move(0, -1, 0), |
40 | 41 | Shapes.block().move(1, 0, 0), |
41 | 42 | Shapes.block().move(-1, 0, 0), |
42 | 43 | Shapes.block().move(0, 0, 1), |
43 | 44 | Shapes.block().move(0, 0, -1) |
44 | | - ); |
| 45 | + )); |
45 | 46 |
|
46 | 47 | private final VeinMinerClient client; |
47 | 48 |
|
|
0 commit comments