mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-03-04 17:23:33 +01:00
Add correct foliage colors for birch and spruce
This commit is contained in:
parent
ef4b6eac02
commit
685a4959f1
6 changed files with 19 additions and 5 deletions
|
@ -96,7 +96,7 @@
|
||||||
"texture": "birch_planks"
|
"texture": "birch_planks"
|
||||||
},
|
},
|
||||||
"birch_leaves": {
|
"birch_leaves": {
|
||||||
"foliage": true
|
"birch": true
|
||||||
},
|
},
|
||||||
"birch_log": {
|
"birch_log": {
|
||||||
"texture": "birch_log_top"
|
"texture": "birch_log_top"
|
||||||
|
@ -1251,7 +1251,7 @@
|
||||||
"texture": "spruce_planks"
|
"texture": "spruce_planks"
|
||||||
},
|
},
|
||||||
"spruce_leaves": {
|
"spruce_leaves": {
|
||||||
"foliage": true
|
"spruce": true
|
||||||
},
|
},
|
||||||
"spruce_log": {
|
"spruce_log": {
|
||||||
"texture": "spruce_log_top"
|
"texture": "spruce_log_top"
|
||||||
|
|
|
@ -42,6 +42,8 @@ for name, info in blocks.items():
|
||||||
'opaque': False,
|
'opaque': False,
|
||||||
'grass': False,
|
'grass': False,
|
||||||
'foliage': False,
|
'foliage': False,
|
||||||
|
'birch': False,
|
||||||
|
'spruce': False,
|
||||||
'water': False,
|
'water': False,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,6 +56,8 @@ for name, info in blocks.items():
|
||||||
output[id]['opaque'] = True
|
output[id]['opaque'] = True
|
||||||
output[id]['grass'] = info.get('grass', False)
|
output[id]['grass'] = info.get('grass', False)
|
||||||
output[id]['foliage'] = info.get('foliage', False)
|
output[id]['foliage'] = info.get('foliage', False)
|
||||||
|
output[id]['birch'] = info.get('birch', False)
|
||||||
|
output[id]['spruce'] = info.get('spruce', False)
|
||||||
output[id]['water'] = info.get('water', False)
|
output[id]['water'] = info.get('water', False)
|
||||||
|
|
||||||
with open(sys.argv[3], 'w') as f:
|
with open(sys.argv[3], 'w') as f:
|
||||||
|
|
|
@ -22,6 +22,10 @@ with open(sys.argv[2], 'w') as f:
|
||||||
flags.append('BLOCK_GRASS')
|
flags.append('BLOCK_GRASS')
|
||||||
if info['foliage']:
|
if info['foliage']:
|
||||||
flags.append('BLOCK_FOLIAGE')
|
flags.append('BLOCK_FOLIAGE')
|
||||||
|
if info['birch']:
|
||||||
|
flags.append('BLOCK_BIRCH')
|
||||||
|
if info['spruce']:
|
||||||
|
flags.append('BLOCK_SPRUCE')
|
||||||
if info['water']:
|
if info['water']:
|
||||||
flags.append('BLOCK_WATER')
|
flags.append('BLOCK_WATER')
|
||||||
if flags:
|
if flags:
|
||||||
|
|
|
@ -103,6 +103,10 @@ Color Biome::getBlockColor(const BlockType *type, unsigned height) const {
|
||||||
c *= getGrassColor(t, r);
|
c *= getGrassColor(t, r);
|
||||||
if (type->flags & BLOCK_FOLIAGE)
|
if (type->flags & BLOCK_FOLIAGE)
|
||||||
c *= getFoliageColor(t, r);
|
c *= getFoliageColor(t, r);
|
||||||
|
if (type->flags & BLOCK_BIRCH)
|
||||||
|
c *= FloatColor {0.380f, 0.600f, 0.380f};
|
||||||
|
if (type->flags & BLOCK_SPRUCE)
|
||||||
|
c *= FloatColor {0.502f, 0.655f, 0.333f};
|
||||||
if (type->flags & BLOCK_WATER)
|
if (type->flags & BLOCK_WATER)
|
||||||
c *= getWaterColor(t, r);
|
c *= getWaterColor(t, r);
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,9 @@ namespace Resource {
|
||||||
#define BLOCK_OPAQUE (1u << 0)
|
#define BLOCK_OPAQUE (1u << 0)
|
||||||
#define BLOCK_GRASS (1u << 1)
|
#define BLOCK_GRASS (1u << 1)
|
||||||
#define BLOCK_FOLIAGE (1u << 2)
|
#define BLOCK_FOLIAGE (1u << 2)
|
||||||
#define BLOCK_WATER (1u << 3)
|
#define BLOCK_BIRCH (1u << 3)
|
||||||
|
#define BLOCK_SPRUCE (1u << 4)
|
||||||
|
#define BLOCK_WATER (1u << 5)
|
||||||
|
|
||||||
struct BlockType {
|
struct BlockType {
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
{"minecraft:birch_door", {BLOCK_OPAQUE, {220, 209, 176}}},
|
{"minecraft:birch_door", {BLOCK_OPAQUE, {220, 209, 176}}},
|
||||||
{"minecraft:birch_fence", {BLOCK_OPAQUE, {192, 175, 121}}},
|
{"minecraft:birch_fence", {BLOCK_OPAQUE, {192, 175, 121}}},
|
||||||
{"minecraft:birch_fence_gate", {BLOCK_OPAQUE, {192, 175, 121}}},
|
{"minecraft:birch_fence_gate", {BLOCK_OPAQUE, {192, 175, 121}}},
|
||||||
{"minecraft:birch_leaves", {BLOCK_OPAQUE|BLOCK_FOLIAGE, {130, 129, 130}}},
|
{"minecraft:birch_leaves", {BLOCK_OPAQUE|BLOCK_BIRCH, {130, 129, 130}}},
|
||||||
{"minecraft:birch_log", {BLOCK_OPAQUE, {193, 179, 135}}},
|
{"minecraft:birch_log", {BLOCK_OPAQUE, {193, 179, 135}}},
|
||||||
{"minecraft:birch_planks", {BLOCK_OPAQUE, {192, 175, 121}}},
|
{"minecraft:birch_planks", {BLOCK_OPAQUE, {192, 175, 121}}},
|
||||||
{"minecraft:birch_pressure_plate", {BLOCK_OPAQUE, {192, 175, 121}}},
|
{"minecraft:birch_pressure_plate", {BLOCK_OPAQUE, {192, 175, 121}}},
|
||||||
|
@ -649,7 +649,7 @@
|
||||||
{"minecraft:spruce_door", {BLOCK_OPAQUE, {106, 80, 48}}},
|
{"minecraft:spruce_door", {BLOCK_OPAQUE, {106, 80, 48}}},
|
||||||
{"minecraft:spruce_fence", {BLOCK_OPAQUE, {114, 84, 48}}},
|
{"minecraft:spruce_fence", {BLOCK_OPAQUE, {114, 84, 48}}},
|
||||||
{"minecraft:spruce_fence_gate", {BLOCK_OPAQUE, {114, 84, 48}}},
|
{"minecraft:spruce_fence_gate", {BLOCK_OPAQUE, {114, 84, 48}}},
|
||||||
{"minecraft:spruce_leaves", {BLOCK_OPAQUE|BLOCK_FOLIAGE, {126, 126, 126}}},
|
{"minecraft:spruce_leaves", {BLOCK_OPAQUE|BLOCK_SPRUCE, {126, 126, 126}}},
|
||||||
{"minecraft:spruce_log", {BLOCK_OPAQUE, {108, 80, 46}}},
|
{"minecraft:spruce_log", {BLOCK_OPAQUE, {108, 80, 46}}},
|
||||||
{"minecraft:spruce_planks", {BLOCK_OPAQUE, {114, 84, 48}}},
|
{"minecraft:spruce_planks", {BLOCK_OPAQUE, {114, 84, 48}}},
|
||||||
{"minecraft:spruce_pressure_plate", {BLOCK_OPAQUE, {114, 84, 48}}},
|
{"minecraft:spruce_pressure_plate", {BLOCK_OPAQUE, {114, 84, 48}}},
|
||||||
|
|
Loading…
Add table
Reference in a new issue