mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-03-04 17:23:33 +01:00
Distinguish grass and foliage green in block types
This commit is contained in:
parent
60bff1fb34
commit
4ffa28dd63
6 changed files with 622 additions and 619 deletions
|
@ -10,7 +10,7 @@
|
||||||
"texture": "acacia_planks"
|
"texture": "acacia_planks"
|
||||||
},
|
},
|
||||||
"acacia_leaves": {
|
"acacia_leaves": {
|
||||||
"green": true
|
"foliage": true
|
||||||
},
|
},
|
||||||
"acacia_log": {
|
"acacia_log": {
|
||||||
"texture": "acacia_log_top"
|
"texture": "acacia_log_top"
|
||||||
|
@ -43,10 +43,10 @@
|
||||||
"texture": "anvil_top"
|
"texture": "anvil_top"
|
||||||
},
|
},
|
||||||
"attached_melon_stem": {
|
"attached_melon_stem": {
|
||||||
"green": true
|
"grass": true
|
||||||
},
|
},
|
||||||
"attached_pumpkin_stem": {
|
"attached_pumpkin_stem": {
|
||||||
"green": true
|
"grass": true
|
||||||
},
|
},
|
||||||
"azure_bluet": null,
|
"azure_bluet": null,
|
||||||
"barrier": null,
|
"barrier": null,
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
"texture": "birch_planks"
|
"texture": "birch_planks"
|
||||||
},
|
},
|
||||||
"birch_leaves": {
|
"birch_leaves": {
|
||||||
"green": true
|
"foliage": true
|
||||||
},
|
},
|
||||||
"birch_log": {
|
"birch_log": {
|
||||||
"texture": "birch_log_top"
|
"texture": "birch_log_top"
|
||||||
|
@ -317,7 +317,7 @@
|
||||||
"texture": "dark_oak_planks"
|
"texture": "dark_oak_planks"
|
||||||
},
|
},
|
||||||
"dark_oak_leaves": {
|
"dark_oak_leaves": {
|
||||||
"green": true
|
"foliage": true
|
||||||
},
|
},
|
||||||
"dark_oak_log": {
|
"dark_oak_log": {
|
||||||
"texture": "dark_oak_log_top"
|
"texture": "dark_oak_log_top"
|
||||||
|
@ -455,7 +455,7 @@
|
||||||
},
|
},
|
||||||
"grass_block": {
|
"grass_block": {
|
||||||
"texture": "grass_block_top",
|
"texture": "grass_block_top",
|
||||||
"green": true
|
"grass": true
|
||||||
},
|
},
|
||||||
"grass": null,
|
"grass": null,
|
||||||
"grass_path": {
|
"grass_path": {
|
||||||
|
@ -571,7 +571,7 @@
|
||||||
"texture": "jungle_planks"
|
"texture": "jungle_planks"
|
||||||
},
|
},
|
||||||
"jungle_leaves": {
|
"jungle_leaves": {
|
||||||
"green": true
|
"foliage": true
|
||||||
},
|
},
|
||||||
"jungle_log": {
|
"jungle_log": {
|
||||||
"texture": "jungle_log_top"
|
"texture": "jungle_log_top"
|
||||||
|
@ -604,7 +604,7 @@
|
||||||
},
|
},
|
||||||
"large_fern": {
|
"large_fern": {
|
||||||
"texture": "large_fern_top",
|
"texture": "large_fern_top",
|
||||||
"green": true
|
"grass": true
|
||||||
},
|
},
|
||||||
"lava": {
|
"lava": {
|
||||||
"texture": "lava_still"
|
"texture": "lava_still"
|
||||||
|
@ -663,7 +663,7 @@
|
||||||
"texture": "lilac_top"
|
"texture": "lilac_top"
|
||||||
},
|
},
|
||||||
"lily_pad": {
|
"lily_pad": {
|
||||||
"green": true
|
"grass": true
|
||||||
},
|
},
|
||||||
"lime_banner": null,
|
"lime_banner": null,
|
||||||
"lime_bed": null,
|
"lime_bed": null,
|
||||||
|
@ -718,7 +718,7 @@
|
||||||
"texture": "melon_top"
|
"texture": "melon_top"
|
||||||
},
|
},
|
||||||
"melon_stem": {
|
"melon_stem": {
|
||||||
"green": true
|
"grass": true
|
||||||
},
|
},
|
||||||
"mossy_cobblestone": {
|
"mossy_cobblestone": {
|
||||||
},
|
},
|
||||||
|
@ -768,7 +768,7 @@
|
||||||
"texture": "oak_planks"
|
"texture": "oak_planks"
|
||||||
},
|
},
|
||||||
"oak_leaves": {
|
"oak_leaves": {
|
||||||
"green": true
|
"foliage": true
|
||||||
},
|
},
|
||||||
"oak_log": {
|
"oak_log": {
|
||||||
"texture": "oak_log_top"
|
"texture": "oak_log_top"
|
||||||
|
@ -906,7 +906,7 @@
|
||||||
},
|
},
|
||||||
"potted_fern": {
|
"potted_fern": {
|
||||||
"texture": "fern",
|
"texture": "fern",
|
||||||
"green": true
|
"grass": true
|
||||||
},
|
},
|
||||||
"potted_jungle_sapling": {
|
"potted_jungle_sapling": {
|
||||||
"texture": "jungle_sapling"
|
"texture": "jungle_sapling"
|
||||||
|
@ -960,7 +960,7 @@
|
||||||
"texture": "pumpkin_top"
|
"texture": "pumpkin_top"
|
||||||
},
|
},
|
||||||
"pumpkin_stem": {
|
"pumpkin_stem": {
|
||||||
"green": true
|
"grass": true
|
||||||
},
|
},
|
||||||
"purple_banner": null,
|
"purple_banner": null,
|
||||||
"purple_bed": null,
|
"purple_bed": null,
|
||||||
|
@ -1126,7 +1126,7 @@
|
||||||
"texture": "spruce_planks"
|
"texture": "spruce_planks"
|
||||||
},
|
},
|
||||||
"spruce_leaves": {
|
"spruce_leaves": {
|
||||||
"green": true
|
"foliage": true
|
||||||
},
|
},
|
||||||
"spruce_log": {
|
"spruce_log": {
|
||||||
"texture": "spruce_log_top"
|
"texture": "spruce_log_top"
|
||||||
|
@ -1215,11 +1215,10 @@
|
||||||
},
|
},
|
||||||
"tall_grass": {
|
"tall_grass": {
|
||||||
"texture": "tall_grass_top",
|
"texture": "tall_grass_top",
|
||||||
"green": true
|
"grass": true
|
||||||
},
|
},
|
||||||
"tall_seagrass": {
|
"tall_seagrass": {
|
||||||
"texture": "tall_seagrass_top",
|
"texture": "tall_seagrass_top"
|
||||||
"green": false
|
|
||||||
},
|
},
|
||||||
"terracotta": {
|
"terracotta": {
|
||||||
},
|
},
|
||||||
|
@ -1240,7 +1239,7 @@
|
||||||
"turtle_egg": {
|
"turtle_egg": {
|
||||||
},
|
},
|
||||||
"vine": {
|
"vine": {
|
||||||
"green": true
|
"grass": true
|
||||||
},
|
},
|
||||||
"void_air": null,
|
"void_air": null,
|
||||||
"wall_sign": null,
|
"wall_sign": null,
|
||||||
|
|
|
@ -40,7 +40,8 @@ for name, info in blocks.items():
|
||||||
output[id] = {
|
output[id] = {
|
||||||
'color': {'r': 0, 'g': 0, 'b': 0},
|
'color': {'r': 0, 'g': 0, 'b': 0},
|
||||||
'opaque': False,
|
'opaque': False,
|
||||||
'green': False,
|
'grass': False,
|
||||||
|
'foliage': False,
|
||||||
'blue': False,
|
'blue': False,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,7 +52,8 @@ for name, info in blocks.items():
|
||||||
if color:
|
if color:
|
||||||
output[id]['color'] = color
|
output[id]['color'] = color
|
||||||
output[id]['opaque'] = True
|
output[id]['opaque'] = True
|
||||||
output[id]['green'] = info.get('green', False)
|
output[id]['grass'] = info.get('grass', False)
|
||||||
|
output[id]['foliage'] = info.get('foliage', False)
|
||||||
output[id]['blue'] = info.get('blue', False)
|
output[id]['blue'] = info.get('blue', False)
|
||||||
|
|
||||||
with open(sys.argv[3], 'w') as f:
|
with open(sys.argv[3], 'w') as f:
|
||||||
|
|
|
@ -15,12 +15,13 @@ output = {}
|
||||||
|
|
||||||
with open(sys.argv[2], 'w') as f:
|
with open(sys.argv[2], 'w') as f:
|
||||||
for name, info in colors.items():
|
for name, info in colors.items():
|
||||||
print('{"%s", {%s, %s, %s, {%u, %u, %u}}},' % (
|
print('{"%s", {%s, %s, %s, %s, {%u, %u, %u}}},' % (
|
||||||
name,
|
name,
|
||||||
['false', 'true'][info['opaque']],
|
['false', 'true'][info['opaque']],
|
||||||
['false', 'true'][info['green']],
|
['false', 'true'][info['grass']],
|
||||||
|
['false', 'true'][info['foliage']],
|
||||||
['false', 'true'][info['blue']],
|
['false', 'true'][info['blue']],
|
||||||
info['color']['r'],
|
info['color']['r'],
|
||||||
info['color']['g'],
|
info['color']['g'],
|
||||||
info['color']['b'],
|
info['color']['b'],
|
||||||
), file=f)
|
), file=f)
|
||||||
|
|
|
@ -41,7 +41,8 @@ public:
|
||||||
static const BlockType * lookup(const std::string &name);
|
static const BlockType * lookup(const std::string &name);
|
||||||
|
|
||||||
bool opaque;
|
bool opaque;
|
||||||
bool green;
|
bool grass;
|
||||||
|
bool foliage;
|
||||||
bool blue;
|
bool blue;
|
||||||
struct {
|
struct {
|
||||||
uint8_t r, g, b;
|
uint8_t r, g, b;
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -45,7 +45,7 @@ Block::Color Block::getColor() const {
|
||||||
g *= heightCoef;
|
g *= heightCoef;
|
||||||
b *= heightCoef;
|
b *= heightCoef;
|
||||||
|
|
||||||
if (type->green) {
|
if (type->grass || type->foliage) {
|
||||||
const Resource::Biome &biomeDef = Resource::BIOMES[biome];
|
const Resource::Biome &biomeDef = Resource::BIOMES[biome];
|
||||||
|
|
||||||
r *= biomeDef.r;
|
r *= biomeDef.r;
|
||||||
|
|
Loading…
Add table
Reference in a new issue