update BlockColorWrapper, and fix "wraning"
This commit is contained in:
@@ -15,13 +15,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;
|
||||
|
||||
|
||||
@@ -127,7 +121,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;
|
||||
}
|
||||
|
||||
@@ -192,10 +186,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -207,11 +201,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
|
||||
@@ -223,7 +217,7 @@ public class BlockColorWrapper implements IBlockColorWrapper
|
||||
|
||||
this.foliageTint = leavesInstance() && toTint;
|
||||
|
||||
this.waterTint = waterIstance() && toTint;
|
||||
this.waterTint = waterIstance();
|
||||
|
||||
//hardcoded leaves
|
||||
if (block == Blocks.SPRUCE_LEAVES)
|
||||
|
||||
+1
-1
@@ -177,7 +177,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.");
|
||||
|
||||
Reference in New Issue
Block a user