From 95d9c17e4977879947f1ad5c63a120f9e053b63b Mon Sep 17 00:00:00 2001 From: Leonardo Date: Mon, 13 Sep 2021 01:19:39 +0200 Subject: [PATCH] Added new colors for the torches --- .../com/seibel/lod/builders/LodBuilder.java | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/seibel/lod/builders/LodBuilder.java b/src/main/java/com/seibel/lod/builders/LodBuilder.java index 41ef198fe..8af31d10b 100644 --- a/src/main/java/com/seibel/lod/builders/LodBuilder.java +++ b/src/main/java/com/seibel/lod/builders/LodBuilder.java @@ -373,6 +373,11 @@ public class LodBuilder colorInt = getColorForBlock(xRel, zRel, blockState, biome); } + if (colorInt == 0 && yAbs > 0) + { + //invisible case + colorInt = generateLodColor(chunk, config, xRel, yAbs - 1, zRel); + } } return colorInt; } @@ -381,6 +386,7 @@ public class LodBuilder { int lightBlock; + //*TODO choose the best one between those options*/ //lightBlock = MinecraftWrapper.INSTANCE.getPlayer().level.getLightEngine().getLayerListener(LightType.BLOCK).getLightValue(blockPos); //lightBlock = (byte) MinecraftWrapper.INSTANCE.getPlayer().level.getLightEngine().blockEngine.getLightValue(blockPos); lightBlock = (byte) MinecraftWrapper.INSTANCE.getPlayer().level.getBrightness(LightType.BLOCK, blockPos); @@ -410,8 +416,21 @@ public class LodBuilder } else if (blockState == Blocks.MYCELIUM.defaultBlockState()) { colorInt = LodUtil.MYCELIUM_COLOR_INT; + } else if (blockState == Blocks.SOUL_TORCH.defaultBlockState() + || blockState == Blocks.SOUL_WALL_TORCH.defaultBlockState()) + { + colorInt = Blocks.WARPED_PLANKS.defaultMaterialColor().col; + } else if (blockState == Blocks.TORCH.defaultBlockState() + || blockState == Blocks.WALL_TORCH.defaultBlockState()) + { + colorInt = Blocks.OAK_PLANKS.defaultMaterialColor().col; + } else if (blockState == Blocks.REDSTONE_TORCH.defaultBlockState() + || blockState == Blocks.REDSTONE_WALL_TORCH.defaultBlockState()) + { + colorInt = Blocks.CRIMSON_PLANKS.defaultMaterialColor().col; } + // plant life else if (blockState.getBlock() instanceof LeavesBlock || blockState.getBlock() == Blocks.VINE) { @@ -436,7 +455,7 @@ public class LodBuilder // everything else else { - colorInt = blockState.materialColor.col; + colorInt = blockState.getBlock().defaultMaterialColor().col; } return colorInt;