diff --git a/src/main/java/com/seibel/lod/core/Config.java b/src/main/java/com/seibel/lod/core/Config.java index dd407d38d..c992a84e5 100644 --- a/src/main/java/com/seibel/lod/core/Config.java +++ b/src/main/java/com/seibel/lod/core/Config.java @@ -322,6 +322,11 @@ public class Config .comment(IWorldGenerator.BLOCKS_TO_AVOID_DESC) .set(IWorldGenerator.BLOCKS_TO_AVOID_DEFAULT) .build(); + + public static ConfigEntry tintWithAvoidedBlocks = new ConfigEntry.Builder() + .comment(IWorldGenerator.TINT_WITH_AVOIDED_BLOCKS_DESC) + .set(IWorldGenerator.TINT_WITH_AVOIDED_BLOCKS_DEFAULT) + .build(); } diff --git a/src/main/java/com/seibel/lod/core/builders/lodBuilding/LodBuilder.java b/src/main/java/com/seibel/lod/core/builders/lodBuilding/LodBuilder.java index 9081e31ac..7e985b039 100644 --- a/src/main/java/com/seibel/lod/core/builders/lodBuilding/LodBuilder.java +++ b/src/main/java/com/seibel/lod/core/builders/lodBuilding/LodBuilder.java @@ -393,8 +393,8 @@ public class LodBuilder if (strictEdge) { IBlockDetailWrapper blockAbove = chunk.getBlockDetail(xAbs, yAbs + 1, zAbs); - if (blockAbove != null && !blockAbove.shouldRender(config.client().worldGenerator().getBlocksToAvoid())) - { // The above block is skipped. Lets use its skipped color for currrent block + if (blockAbove != null && config.client().worldGenerator().getTintWithAvoidedBlocks() && !blockAbove.shouldRender(config.client().worldGenerator().getBlocksToAvoid())) + { // The above block is skipped. Lets use its skipped color for current block currentBlockDetail = blockAbove; } if (currentBlockDetail == null) currentBlockDetail = chunk.getBlockDetail(xAbs, yAbs, zAbs); @@ -457,7 +457,7 @@ public class LodBuilder colorInt = 0; if (chunk.blockPosInsideChunk(x, y+1, z)) { IBlockDetailWrapper blockAbove = chunk.getBlockDetail(x, y+1, z); - if (blockAbove != null && !blockAbove.shouldRender(config.client().worldGenerator().getBlocksToAvoid())) + if (blockAbove != null && config.client().worldGenerator().getTintWithAvoidedBlocks() && !blockAbove.shouldRender(config.client().worldGenerator().getBlocksToAvoid())) { // The above block is skipped. Lets use its skipped color for currrent block colorInt = blockAbove.getAndResolveFaceColor(null, chunk, FACTORY.createBlockPos(x, y+1, z)); } diff --git a/src/main/java/com/seibel/lod/core/wrapperInterfaces/config/ILodConfigWrapperSingleton.java b/src/main/java/com/seibel/lod/core/wrapperInterfaces/config/ILodConfigWrapperSingleton.java index c47344d0f..488b67318 100644 --- a/src/main/java/com/seibel/lod/core/wrapperInterfaces/config/ILodConfigWrapperSingleton.java +++ b/src/main/java/com/seibel/lod/core/wrapperInterfaces/config/ILodConfigWrapperSingleton.java @@ -742,6 +742,15 @@ public interface ILodConfigWrapperSingleton extends IBindable + " This wont't affect performance."; BlocksToAvoid getBlocksToAvoid(); void setBlockToAvoid(BlocksToAvoid newBlockToAvoid); + + //TODO: improve wording + Boolean TINT_WITH_AVOIDED_BLOCKS_DEFAULT = true; + String TINT_WITH_AVOIDED_BLOCKS_DESC = "" + + " Should the blocks underneath avoided blocks gain the color of the avoided block? \n" + + " True: a red flower on grass will tint the grass below it red" + + " False: skipped blocks will not change color of surface below them"; + Boolean getTintWithAvoidedBlocks(); + void setTintWithAvoidedBlocks(Boolean shouldTint); } diff --git a/src/main/java/com/seibel/lod/core/wrapperInterfaces/config/LodConfigWrapperSingleton.java b/src/main/java/com/seibel/lod/core/wrapperInterfaces/config/LodConfigWrapperSingleton.java index 96764d9c3..cba032b74 100644 --- a/src/main/java/com/seibel/lod/core/wrapperInterfaces/config/LodConfigWrapperSingleton.java +++ b/src/main/java/com/seibel/lod/core/wrapperInterfaces/config/LodConfigWrapperSingleton.java @@ -573,6 +573,17 @@ public class LodConfigWrapperSingleton implements ILodConfigWrapperSingleton { Config.Client.WorldGenerator.blocksToAvoid.set(newBlockToAvoid); } + + + @Override + public Boolean getTintWithAvoidedBlocks() { + return Config.Client.WorldGenerator.tintWithAvoidedBlocks.get(); + } + @Override + public void setTintWithAvoidedBlocks(Boolean shouldTint) { + Config.Client.WorldGenerator.tintWithAvoidedBlocks.set(shouldTint); + } + @Override public boolean getEnableDistantGeneration() { diff --git a/src/main/resources/assets/lod/lang/en_us.json b/src/main/resources/assets/lod/lang/en_us.json index 42a17888a..ea3ae5bc9 100644 --- a/src/main/resources/assets/lod/lang/en_us.json +++ b/src/main/resources/assets/lod/lang/en_us.json @@ -194,6 +194,10 @@ "Block to avoid", "lod.config.client.worldGenerator.blocksToAvoid.@tooltip": "Defines the types of blocks to ignore when generating fake chunks.", + "lod.config.client.worldGenerator.tintWithAvoidedBlocks": + "Tint with avoided blocks", + "lod.config.client.worldGenerator.tintWithAvoidedBlocks.@tooltip": + "§4Warning makes snow, carpet, and trapdoors look really bad§r\nShould the blocks underneath avoided blocks gain the color of the avoided block?\n§6True:§r a red flower on grass will tint the grass below it red\n§6False:§r skipped blocks will not change color of surface below them", "lod.config.client.worldGenerator.enableDistantGeneration": "Enable Distant Generation", "lod.config.client.worldGenerator.enableDistantGeneration.@tooltip":