Improve stone color

This commit is contained in:
James Seibel
2021-08-29 21:09:30 -05:00
parent 42da213ea9
commit 2dcdc854e3
2 changed files with 14 additions and 6 deletions
@@ -46,7 +46,6 @@ import net.minecraft.world.biome.Biome;
import net.minecraft.world.chunk.ChunkSection;
import net.minecraft.world.chunk.IChunk;
import net.minecraft.world.gen.Heightmap;
import org.lwjgl.system.CallbackI;
/**
* This object is in charge of creating Lod related objects. (specifically: Lod
@@ -54,7 +53,7 @@ import org.lwjgl.system.CallbackI;
*
* @author Leonardo Amato
* @author James Seibel
* @version 8-26-2021
* @version 8-29-2021
*/
public class LodBuilder
{
@@ -421,7 +420,7 @@ public class LodBuilder
}
/**
* Returns a color int for a given block.
* Returns a color int for the given block.
*/
private int getColorForBlock(int x, int z, BlockState blockState, Biome biome)
{
@@ -433,7 +432,12 @@ public class LodBuilder
Color tmp = LodUtil.intToColor(biome.getGrassColor(x, z));
tmp = tmp.darker();
colorInt = LodUtil.colorToInt(tmp);
} else if (blockState == Blocks.MYCELIUM.defaultBlockState())
}
else if (blockState == Blocks.STONE.defaultBlockState())
{
colorInt = LodUtil.STONE_COLOR_INT;
}
else if (blockState == Blocks.MYCELIUM.defaultBlockState())
{
colorInt = LodUtil.MYCELIUM_COLOR_INT;
}
@@ -21,9 +21,9 @@ import java.awt.Color;
import java.io.File;
import java.util.HashSet;
import com.seibel.lod.objects.LevelPos.LevelPos;
import com.seibel.lod.objects.LodDimension;
import com.seibel.lod.objects.RegionPos;
import com.seibel.lod.objects.LevelPos.LevelPos;
import net.minecraft.client.Minecraft;
import net.minecraft.client.multiplayer.ServerData;
@@ -43,7 +43,7 @@ import net.minecraft.world.server.ServerWorld;
* This class holds methods and constants that may be used in multiple places.
*
* @author James Seibel
* @version 8-11-2021
* @version 8-29-2021
*/
public class LodUtil
{
@@ -58,6 +58,10 @@ public class LodUtil
/** a gray-purple color */
public static final int MYCELIUM_COLOR_INT = LodUtil.colorToInt(Color.decode("#6E6166"));
/** TODO, add a better way to override material colors
* and/or add a method to generate colors based on texture
* issue #64 */
public static final int STONE_COLOR_INT = LodUtil.colorToInt(new Color(150, 150, 150));
/**
* In order of nearest to farthest: <br>