Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 75193d76a3 | |||
| aa24fd341e | |||
| d669b2a1fe | |||
| 2bd8dab240 | |||
| 2b423c2edd | |||
| 1a4faf4bdd | |||
| b70829aceb | |||
| bba771d376 |
@@ -14,13 +14,7 @@ import com.seibel.lod.core.wrapperInterfaces.block.IBlockColorWrapper;
|
||||
import net.minecraft.client.renderer.block.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.BushBlock;
|
||||
import net.minecraft.world.level.block.FlowerBlock;
|
||||
import net.minecraft.world.level.block.GrassBlock;
|
||||
import net.minecraft.world.level.block.LeavesBlock;
|
||||
import net.minecraft.world.level.block.TallGrassBlock;
|
||||
import net.minecraft.world.level.block.*;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
|
||||
@@ -125,7 +119,7 @@ public class BlockColorWrapper implements IBlockColorWrapper
|
||||
for (Direction direction : directions)
|
||||
{
|
||||
quads = mc.getModelManager().getBlockModelShaper().getBlockModel(block.defaultBlockState()).getQuads(blockState, direction, random);
|
||||
if (!quads.isEmpty())
|
||||
if (!quads.isEmpty() && !(block instanceof RotatedPillarBlock && direction == Direction.UP))
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -152,7 +146,7 @@ public class BlockColorWrapper implements IBlockColorWrapper
|
||||
|
||||
// generate the block's color
|
||||
// for (int frameIndex = 0; frameIndex < texture.getFrameCount(); frameIndex++)
|
||||
boolean lookForTint = grassInstance() || leavesInstance() || waterIstance();
|
||||
boolean lookForTint = grassInstance() || leavesInstance() || waterInstance();
|
||||
|
||||
int frameIndex = 0; // TODO
|
||||
{
|
||||
@@ -170,7 +164,7 @@ public class BlockColorWrapper implements IBlockColorWrapper
|
||||
{
|
||||
// determine if this pixel is gray
|
||||
int colorMax = Math.max(Math.max(ColorUtil.getBlue(tempColor), ColorUtil.getGreen(tempColor)), ColorUtil.getRed(tempColor));
|
||||
int colorMin = 4 + Math.min(Math.min(ColorUtil.getBlue(tempColor), ColorUtil.getGreen(tempColor)), ColorUtil.getRed(tempColor));
|
||||
int colorMin = 16 + Math.min(Math.min(ColorUtil.getBlue(tempColor), ColorUtil.getGreen(tempColor)), ColorUtil.getRed(tempColor));
|
||||
boolean isGray = colorMax < colorMin;
|
||||
if (isGray)
|
||||
numberOfGreyPixel++;
|
||||
@@ -186,10 +180,10 @@ public class BlockColorWrapper implements IBlockColorWrapper
|
||||
|
||||
// add to the running averages
|
||||
count += colorMultiplier;
|
||||
alpha += ColorUtil.getAlpha(tempColor) * colorMultiplier;
|
||||
red += ColorUtil.getBlue(tempColor) * colorMultiplier;
|
||||
green += ColorUtil.getGreen(tempColor) * colorMultiplier;
|
||||
blue += ColorUtil.getRed(tempColor) * colorMultiplier;
|
||||
alpha += ColorUtil.getAlpha(tempColor) * ColorUtil.getAlpha(tempColor) * colorMultiplier;
|
||||
red += ColorUtil.getBlue(tempColor) * ColorUtil.getBlue(tempColor) * colorMultiplier;
|
||||
green += ColorUtil.getGreen(tempColor) * ColorUtil.getGreen(tempColor) * colorMultiplier;
|
||||
blue += ColorUtil.getRed(tempColor) * ColorUtil.getRed(tempColor) * colorMultiplier;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -201,11 +195,11 @@ public class BlockColorWrapper implements IBlockColorWrapper
|
||||
else
|
||||
{
|
||||
// determine the average color
|
||||
alpha /= count;
|
||||
red /= count;
|
||||
green /= count;
|
||||
blue /= count;
|
||||
tempColor = ColorUtil.rgbToInt(alpha, red, green, blue);
|
||||
tempColor = ColorUtil.rgbToInt(
|
||||
(int) Math.sqrt(alpha / count),
|
||||
(int) Math.sqrt(red / count),
|
||||
(int) Math.sqrt(green / count),
|
||||
(int) Math.sqrt(blue / count));
|
||||
}
|
||||
|
||||
// determine if this block should use the biome color tint
|
||||
@@ -217,7 +211,7 @@ public class BlockColorWrapper implements IBlockColorWrapper
|
||||
|
||||
this.foliageTint = leavesInstance() && toTint;
|
||||
|
||||
this.waterTint = waterIstance() && toTint;
|
||||
this.waterTint = waterInstance();
|
||||
|
||||
//hardcoded leaves
|
||||
if (block == Blocks.SPRUCE_LEAVES)
|
||||
@@ -248,7 +242,7 @@ public class BlockColorWrapper implements IBlockColorWrapper
|
||||
}
|
||||
|
||||
/** determine if the given block should use the biome's foliage color */
|
||||
private boolean waterIstance()
|
||||
private boolean waterInstance()
|
||||
{
|
||||
return block == Blocks.WATER;
|
||||
}
|
||||
|
||||
+1
-1
@@ -178,7 +178,7 @@ public class MinecraftRenderWrapper implements IMinecraftRenderWrapper
|
||||
} catch (LinkageError e) {
|
||||
try {
|
||||
MinecraftWrapper.INSTANCE.sendChatMessage(
|
||||
"\u00A7e\u00A7l\u00A7uWRANING: Distant Horizons: getVanillaRenderedChunks method failed."
|
||||
"\u00A7e\u00A7l\u00A7uWARNING: Distant Horizons: getVanillaRenderedChunks method failed."
|
||||
+ " Using Backup Method.");
|
||||
MinecraftWrapper.INSTANCE.sendChatMessage(
|
||||
"\u00A7eOverdraw prevention will be worse than normal.");
|
||||
|
||||
+1
-1
Submodule core updated: 2ba7c6be6e...fd81a8e067
+1
-1
@@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx2048M
|
||||
minecraft_version=1.18.1
|
||||
|
||||
archives_base_name=DistantHorizons
|
||||
mod_version=1.6.1a
|
||||
mod_version=1.6.2a
|
||||
maven_group=com.seibel.lod
|
||||
toml_version=3.6.4
|
||||
|
||||
|
||||
Reference in New Issue
Block a user