diff --git a/src/main/java/carpet/script/utils/ShapesRenderer.java b/src/main/java/carpet/script/utils/ShapesRenderer.java index 820244d49..6d3a8c8c0 100644 --- a/src/main/java/carpet/script/utils/ShapesRenderer.java +++ b/src/main/java/carpet/script/utils/ShapesRenderer.java @@ -47,6 +47,7 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.LightLayer; import net.minecraft.world.level.block.EntityBlock; +import net.minecraft.world.level.block.LeavesBlock; import net.minecraft.world.level.block.RenderShape; import net.minecraft.world.level.block.ShulkerBoxBlock; import net.minecraft.world.level.block.entity.BlockEntity; @@ -407,7 +408,13 @@ public void renderLines(PoseStack matrices, Tesselator tessellator, BufferBuilde float red = (color >> 16 & 0xFF) / 255.0F; float green = (color >> 8 & 0xFF) / 255.0F; float blue = (color & 0xFF) / 255.0F; - client.getBlockRenderer().getModelRenderer().renderModel(matrices.last(), immediate.getBuffer(ItemBlockRenderTypes.getChunkRenderType(blockState)), blockState, bakedModel, red, green, blue, light, OverlayTexture.NO_OVERLAY); + RenderType type; + if (blockState.getBlock() instanceof LeavesBlock && !Minecraft.useFancyGraphics()) { + type = RenderType.solid(); + } else { + type = ItemBlockRenderTypes.getRenderType(blockState, false); + } + client.getBlockRenderer().getModelRenderer().renderModel(matrices.last(), immediate.getBuffer(type), blockState, bakedModel, red, green, blue, light, OverlayTexture.NO_OVERLAY); } // draw the block`s entity part