Fix biome coloring

This commit is contained in:
Jesse Boyd 2017-05-01 04:10:07 +10:00
parent b756f93361
commit 40e7e0d290
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F
2 changed files with 4 additions and 16 deletions

View File

@ -293,20 +293,8 @@ public class HeightMapMCAGenerator extends MCAWriter implements Extent {
BaseBlock block = textureUtil.getNearestBlock(color);
TextureUtil.BiomeColor biome = textureUtil.getNearestBiome(color);
int blockColor = textureUtil.getColor(block);
if (textureUtil.colorDistance(biome.grass, color) - biomePriority <= textureUtil.colorDistance(blockColor, color)) {
byte biomeByte = (byte) biome.id;
biomes[index] = biomeByte;
if (yBiome && x > 0 && x < widthIndex) {
setBiomeIfZero(index + 1, biomeByte);
setBiomeIfZero(index - 1, biomeByte);
setBiomeIfZero(index + getWidth(), biomeByte);
setBiomeIfZero(index + getWidth() + 1, biomeByte);
setBiomeIfZero(index + getWidth() - 1, biomeByte);
setBiomeIfZero(index - getWidth(), biomeByte);
setBiomeIfZero(index - getWidth() + 1, biomeByte);
setBiomeIfZero(index - getWidth() - 1, biomeByte);
}
} else {
biomes[index] = (byte) biome.id;
if (textureUtil.colorDistance(biome.grass, color) - biomePriority > textureUtil.colorDistance(blockColor, color)) {
char combined = (char) block.getCombined();
main[index] = combined;
floor[index] = combined;

View File

@ -145,8 +145,8 @@ public class CreateFromImage extends Command {
fp.sendMessage(BBC.getPrefix() + "/2 cfi ore[s]");
fp.sendMessage(BBC.getPrefix() + "/2 cfi schem <mask> <schem> <rarity> <rotate>");
fp.sendMessage(BBC.getPrefix() + "/2 cfi height <image-url|height>");
fp.sendMessage(BBC.getPrefix() + "/2 cfi waterheight <height>");
fp.sendMessage(BBC.getPrefix() + "/2 cfi waterid <number-id>");
fp.sendMessage(BBC.getPrefix() + "/2 cfi waterHeight <height>");
fp.sendMessage(BBC.getPrefix() + "/2 cfi waterId <number-id>");
fp.sendMessage(BBC.getPrefix() + "/2 cfi color <image-url>");
fp.sendMessage(BBC.getPrefix() + "/2 cfi glass <image-url>");
fp.sendMessage(BBC.getPrefix() + "/2 cfi biomeColor <image-url>");