This commit is contained in:
Sascha L. Teichmann 2014-10-21 01:11:37 +02:00
commit d880983abc
7 changed files with 298 additions and 255 deletions

View File

@ -14,7 +14,7 @@ A quick and dirty way to produce the binaries of `mtdbconverter`,
# the corresponding version from https://golang.org/dl/
$ wget https://storage.googleapis.com/golang/go1.3.3.linux-amd64.tar.gz
$ sha1sum https://storage.googleapis.com/golang/go1.3.3.linux-amd64.tar.gz
$ sha1sum go1.3.3.linux-amd64.tar.gz
14068fbe349db34b838853a7878621bbd2b24646 go1.3.3.linux-amd64.tar.gz
$ tar xf go1.3.3.linux-amd64.tar.gz

View File

@ -76,7 +76,7 @@ func main() {
numBlocks := 0
drawBlock := func(block *common.Block) {
if err := yOrder.RenderBlock(block, colors.NameIndex); err != nil {
if err := yOrder.RenderBlock(block, colors); err != nil {
log.Printf("WARN: rendering block failed: %s", err)
}
numBlocks++
@ -93,7 +93,7 @@ func main() {
if err = client.QueryCuboid(cuboid, drawBlock); err != nil {
log.Fatalf("query failed: %s", err)
}
if err = yOrder.Drain(colors.NameIndex); err != nil {
if err = yOrder.Drain(colors); err != nil {
log.Printf("WARN: rendering block failed: %s", err)
}
if renderer.IsFilled() {

View File

@ -56,7 +56,7 @@ default:dry_shrub 100 80 40
default:fence_wood 103 78 42
default:furnace 118 118 118
default:furnace_active 118 118 118
default:glass 183 183 222
default:glass 183 183 222 128
default:goldblock 242 217 0
default:grass_1 107 134 51
default:grass_2 107 134 51
@ -79,7 +79,7 @@ default:mossycobble 88 134 42
default:nyancat 255 153 255
default:nyancat_rainbow 102 50 255
default:obsidian 0 0 0
default:obsidian_glass 183 183 222
default:obsidian_glass 183 183 222 128
default:papyrus 58 105 18
default:rail 162 119 53
default:sand 210 194 156
@ -100,10 +100,10 @@ default:stone_with_iron 128 128 128
default:stone_with_mese 128 128 128
default:torch 255 255 0
default:tree 86 58 31
default:water_flowing 39 66 106
default:water_source 39 66 106
default:water_flowing 39 66 106 128
default:water_source 39 66 106 128
default:wood 104 78 42
doors:door_glass_t_1 183 183 222
doors:door_glass_t_1 183 183 222 128
doors:door_steel_b_1 199 199 199
doors:door_steel_b_2 199 199 199
doors:door_steel_t_1 199 199 199
@ -262,22 +262,22 @@ homedecor:door_exterior_fancy_bottom_left 150 108 89
homedecor:door_exterior_fancy_bottom_right 150 108 89
homedecor:door_exterior_fancy_top_left 150 108 89
homedecor:door_exterior_fancy_top_right 150 108 89
homedecor:door_glass_bottom_left 183 183 222
homedecor:door_glass_bottom_right 183 183 222
homedecor:door_glass_top_left 217 217 217
homedecor:door_glass_top_right 217 217 217
homedecor:door_wood_glass_bottom_left 188 156 91
homedecor:door_wood_glass_bottom_right 188 156 91
homedecor:door_wood_glass_mahogany_bottom_left 141 97 69
homedecor:door_wood_glass_mahogany_bottom_right 141 97 69
homedecor:door_wood_glass_mahogany_top_left 141 97 69
homedecor:door_wood_glass_mahogany_top_right 141 97 69
homedecor:door_wood_glass_top_left 188 156 91
homedecor:door_wood_glass_top_right 182 119 12
homedecor:door_wood_glass_white_bottom_left 254 254 254
homedecor:door_wood_glass_white_bottom_right 244 244 244
homedecor:door_wood_glass_white_top_left 244 244 244
homedecor:door_wood_glass_white_top_right 244 244 244
homedecor:door_glass_bottom_left 183 183 222 128
homedecor:door_glass_bottom_right 183 183 222 128
homedecor:door_glass_top_left 217 217 217 128
homedecor:door_glass_top_right 217 217 217 128
homedecor:door_wood_glass_bottom_left 188 156 91 128
homedecor:door_wood_glass_bottom_right 188 156 91 128
homedecor:door_wood_glass_mahogany_bottom_left 141 97 69 128
homedecor:door_wood_glass_mahogany_bottom_right 141 97 69 128
homedecor:door_wood_glass_mahogany_top_left 141 97 69 128
homedecor:door_wood_glass_mahogany_top_right 141 97 69 128
homedecor:door_wood_glass_top_left 188 156 91 128
homedecor:door_wood_glass_top_right 182 119 12 128
homedecor:door_wood_glass_white_bottom_left 254 254 254 128
homedecor:door_wood_glass_white_bottom_right 244 244 244 128
homedecor:door_wood_glass_white_top_left 244 244 244 128
homedecor:door_wood_glass_white_top_right 244 244 244 128
homedecor:door_wood_plain_bottom_left 150 110 74
homedecor:door_wood_plain_bottom_right 150 110 74
homedecor:door_wood_plain_top_left 150 110 74
@ -307,15 +307,15 @@ homedecor:gate_picket_closed 163 119 78
homedecor:gate_picket_open 163 119 78
homedecor:gate_picket_white_closed 0 0 0
homedecor:gate_picket_white_open 0 0 0
homedecor:glass_table_large_b 181 181 181
homedecor:glass_table_large_s 191 191 191
homedecor:glass_table_large_t 181 181 181
homedecor:glass_table_small_round_b 183 183 222
homedecor:glass_table_small_round_s 207 207 207
homedecor:glass_table_small_round_t 162 162 162
homedecor:glass_table_small_square_b 162 162 162
homedecor:glass_table_small_square_s 207 207 207
homedecor:glass_table_small_square_t 162 162 162
homedecor:glass_table_large_b 181 181 181 128
homedecor:glass_table_large_s 191 191 191 128
homedecor:glass_table_large_t 181 181 181 128
homedecor:glass_table_small_round_b 183 183 222 128
homedecor:glass_table_small_round_s 207 207 207 128
homedecor:glass_table_small_round_t 162 162 162 128
homedecor:glass_table_small_square_b 162 162 162 128
homedecor:glass_table_small_square_s 207 207 207 128
homedecor:glass_table_small_square_t 162 162 162 128
homedecor:glowlight_half_white 240 240 240
homedecor:glowlight_half_yellow 255 255 170
homedecor:glowlight_quarter_white 240 240 240
@ -719,16 +719,16 @@ moreblocks:cactus_brick 206 212 202
moreblocks:cactus_checker 130 138 130
moreblocks:circle_stone_bricks 91 88 87
moreblocks:circular_saw 78 64 44
moreblocks:clean_glass 192 192 227
moreblocks:clean_glass 192 192 227 128
moreblocks:coal_checker 133 133 133
moreblocks:coal_glass 130 130 130
moreblocks:coal_glass 130 130 130 128
moreblocks:coal_stone 70 70 70
moreblocks:coal_stone_bricks 79 76 75
moreblocks:empty_bookshelf 128 100 57
moreblocks:fence_jungle_wood 105 68 44
moreblocks:glow_glass 255 226 114
moreblocks:glow_glass 255 226 114 128
moreblocks:iron_checker 142 142 142
moreblocks:iron_glass 222 222 222
moreblocks:iron_glass 222 222 222 128
moreblocks:iron_stone 134 134 134
moreblocks:iron_stone_bricks 104 98 97
moreblocks:micro_brick_1 156 157 151
@ -766,13 +766,13 @@ moreblocks:micro_coal_checker_14 133 133 133
moreblocks:micro_coal_checker_15 133 133 133
moreblocks:micro_coal_checker_2 133 133 133
moreblocks:micro_coal_checker_4 133 133 133
moreblocks:micro_coal_glass_1 130 130 130
moreblocks:micro_coal_glass_12 130 130 130
moreblocks:micro_coal_glass 130 130 130
moreblocks:micro_coal_glass_14 130 130 130
moreblocks:micro_coal_glass_15 130 130 130
moreblocks:micro_coal_glass_2 130 130 130
moreblocks:micro_coal_glass_4 130 130 130
moreblocks:micro_coal_glass_1 130 130 130 128
moreblocks:micro_coal_glass_12 130 130 130 128
moreblocks:micro_coal_glass 130 130 130 128
moreblocks:micro_coal_glass_14 130 130 130 128
moreblocks:micro_coal_glass_15 130 130 130 128
moreblocks:micro_coal_glass_2 130 130 130 128
moreblocks:micro_coal_glass_4 130 130 130 128
moreblocks:micro_coal_stone_12 70 70 70
moreblocks:micro_coal_stone_14 70 70 70
moreblocks:micro_coal_stone_15 70 70 70
@ -822,20 +822,20 @@ moreblocks:micro_diamondblock_14 103 195 201
moreblocks:micro_diamondblock_15 103 195 201
moreblocks:micro_diamondblock_2 103 195 201
moreblocks:micro_diamondblock_4 103 195 201
moreblocks:micro_glass_1 192 192 227
moreblocks:micro_glass_12 192 192 227
moreblocks:micro_glass_14 192 192 227
moreblocks:micro_glass_15 192 192 227
moreblocks:micro_glass 192 192 227
moreblocks:micro_glass_2 192 192 227
moreblocks:micro_glass_4 192 192 227
moreblocks:micro_glow_glass_12 255 226 114
moreblocks:micro_glow_glass_1 255 226 114
moreblocks:micro_glow_glass_14 255 226 114
moreblocks:micro_glow_glass_15 255 226 114
moreblocks:micro_glow_glass_2 255 226 114
moreblocks:micro_glow_glass 255 226 114
moreblocks:micro_glow_glass_4 255 226 114
moreblocks:micro_glass_1 192 192 227 128
moreblocks:micro_glass_12 192 192 227 128
moreblocks:micro_glass_14 192 192 227 128
moreblocks:micro_glass_15 192 192 227 128
moreblocks:micro_glass 192 192 227 128
moreblocks:micro_glass_2 192 192 227 128
moreblocks:micro_glass_4 192 192 227 128
moreblocks:micro_glow_glass_12 255 226 114 128
moreblocks:micro_glow_glass_1 255 226 114 128
moreblocks:micro_glow_glass_14 255 226 114 128
moreblocks:micro_glow_glass_15 255 226 114 128
moreblocks:micro_glow_glass_2 255 226 114 128
moreblocks:micro_glow_glass 255 226 114 128
moreblocks:micro_glow_glass_4 255 226 114 128
moreblocks:micro_goldblock_1 126 116 35
moreblocks:micro_goldblock_12 126 116 35
moreblocks:micro_goldblock 126 116 35
@ -857,13 +857,13 @@ moreblocks:micro_iron_checker 142 142 142
moreblocks:micro_iron_checker_15 142 142 142
moreblocks:micro_iron_checker_2 142 142 142
moreblocks:micro_iron_checker_4 142 142 142
moreblocks:micro_iron_glass_1 222 222 222
moreblocks:micro_iron_glass_12 222 222 222
moreblocks:micro_iron_glass_14 222 222 222
moreblocks:micro_iron_glass_15 222 222 222
moreblocks:micro_iron_glass 222 222 222
moreblocks:micro_iron_glass_2 222 222 222
moreblocks:micro_iron_glass_4 222 222 222
moreblocks:micro_iron_glass_1 222 222 222 128
moreblocks:micro_iron_glass_12 222 222 222 128
moreblocks:micro_iron_glass_14 222 222 222 128
moreblocks:micro_iron_glass_15 222 222 222 128
moreblocks:micro_iron_glass 222 222 222 128
moreblocks:micro_iron_glass_2 222 222 222 128
moreblocks:micro_iron_glass_4 222 222 222 128
moreblocks:micro_iron_stone_1 134 134 134
moreblocks:micro_iron_stone_12 134 134 134
moreblocks:micro_iron_stone 134 134 134
@ -913,13 +913,13 @@ moreblocks:micro_obsidian_15 16 16 16
moreblocks:micro_obsidian 16 16 16
moreblocks:micro_obsidian_2 16 16 16
moreblocks:micro_obsidian_4 16 16 16
moreblocks:micro_obsidian_glass_1 16 17 17
moreblocks:micro_obsidian_glass_12 16 17 17
moreblocks:micro_obsidian_glass_14 16 17 17
moreblocks:micro_obsidian_glass_15 16 17 17
moreblocks:micro_obsidian_glass 16 17 17
moreblocks:micro_obsidian_glass_2 16 17 17
moreblocks:micro_obsidian_glass_4 16 17 17
moreblocks:micro_obsidian_glass_1 16 17 17 128
moreblocks:micro_obsidian_glass_12 16 17 17 128
moreblocks:micro_obsidian_glass_14 16 17 17 128
moreblocks:micro_obsidian_glass_15 16 17 17 128
moreblocks:micro_obsidian_glass 16 17 17 128
moreblocks:micro_obsidian_glass_2 16 17 17 128
moreblocks:micro_obsidian_glass_4 16 17 17 128
moreblocks:micro_plankstone_12 66 51 23
moreblocks:micro_plankstone_14 66 51 23
moreblocks:micro_plankstone_15 66 51 23
@ -976,13 +976,13 @@ moreblocks:micro_stone_tile_1 97 97 97
moreblocks:micro_stone_tile_2 97 97 97
moreblocks:micro_stone_tile_4 97 97 97
moreblocks:micro_stone_tile 97 97 97
moreblocks:micro_super_glow_glass_12 255 255 120
moreblocks:micro_super_glow_glass_1 255 255 120
moreblocks:micro_super_glow_glass_14 255 255 120
moreblocks:micro_super_glow_glass_15 255 255 120
moreblocks:micro_super_glow_glass_2 255 255 120
moreblocks:micro_super_glow_glass 255 255 120
moreblocks:micro_super_glow_glass_4 255 255 120
moreblocks:micro_super_glow_glass_12 255 255 120 128
moreblocks:micro_super_glow_glass_1 255 255 120 128
moreblocks:micro_super_glow_glass_14 255 255 120 128
moreblocks:micro_super_glow_glass_15 255 255 120 128
moreblocks:micro_super_glow_glass_2 255 255 120 128
moreblocks:micro_super_glow_glass 255 255 120 128
moreblocks:micro_super_glow_glass_4 255 255 120 128
moreblocks:micro_tree_12 66 52 35
moreblocks:micro_tree_14 66 52 35
moreblocks:micro_tree_15 66 52 35
@ -1053,13 +1053,13 @@ moreblocks:panel_coal_checker_14 133 133 133
moreblocks:panel_coal_checker_15 133 133 133
moreblocks:panel_coal_checker_2 133 133 133
moreblocks:panel_coal_checker_4 133 133 133
moreblocks:panel_coal_glass_1 130 130 130
moreblocks:panel_coal_glass_12 130 130 130
moreblocks:panel_coal_glass 130 130 130
moreblocks:panel_coal_glass_14 130 130 130
moreblocks:panel_coal_glass_15 130 130 130
moreblocks:panel_coal_glass_2 130 130 130
moreblocks:panel_coal_glass_4 130 130 130
moreblocks:panel_coal_glass_1 130 130 130 128
moreblocks:panel_coal_glass_12 130 130 130 128
moreblocks:panel_coal_glass 130 130 130 128
moreblocks:panel_coal_glass_14 130 130 130 128
moreblocks:panel_coal_glass_15 130 130 130 128
moreblocks:panel_coal_glass_2 130 130 130 128
moreblocks:panel_coal_glass_4 130 130 130 128
moreblocks:panel_coal_stone_12 70 70 70
moreblocks:panel_coal_stone_14 70 70 70
moreblocks:panel_coal_stone_15 70 70 70
@ -1109,20 +1109,20 @@ moreblocks:panel_diamondblock_14 103 195 201
moreblocks:panel_diamondblock_15 103 195 201
moreblocks:panel_diamondblock_2 103 195 201
moreblocks:panel_diamondblock_4 103 195 201
moreblocks:panel_glass_1 192 192 227
moreblocks:panel_glass_12 192 192 227
moreblocks:panel_glass_14 192 192 227
moreblocks:panel_glass_15 192 192 227
moreblocks:panel_glass 192 192 227
moreblocks:panel_glass_2 192 192 227
moreblocks:panel_glass_4 192 192 227
moreblocks:panel_glow_glass_12 255 226 114
moreblocks:panel_glow_glass_1 255 226 114
moreblocks:panel_glow_glass_14 255 226 114
moreblocks:panel_glow_glass_15 255 226 114
moreblocks:panel_glow_glass_2 255 226 114
moreblocks:panel_glow_glass 255 226 114
moreblocks:panel_glow_glass_4 255 226 114
moreblocks:panel_glass_1 192 192 227 128
moreblocks:panel_glass_12 192 192 227 128
moreblocks:panel_glass_14 192 192 227 128
moreblocks:panel_glass_15 192 192 227 128
moreblocks:panel_glass 192 192 227 128
moreblocks:panel_glass_2 192 192 227 128
moreblocks:panel_glass_4 192 192 227 128
moreblocks:panel_glow_glass_12 255 226 114 128
moreblocks:panel_glow_glass_1 255 226 114 128
moreblocks:panel_glow_glass_14 255 226 114 128
moreblocks:panel_glow_glass_15 255 226 114 128
moreblocks:panel_glow_glass_2 255 226 114 128
moreblocks:panel_glow_glass 255 226 114 128
moreblocks:panel_glow_glass_4 255 226 114 128
moreblocks:panel_goldblock_1 126 116 35
moreblocks:panel_goldblock_12 126 116 35
moreblocks:panel_goldblock 126 116 35
@ -1144,13 +1144,13 @@ moreblocks:panel_iron_checker 142 142 142
moreblocks:panel_iron_checker_15 142 142 142
moreblocks:panel_iron_checker_2 142 142 142
moreblocks:panel_iron_checker_4 142 142 142
moreblocks:panel_iron_glass_1 222 222 222
moreblocks:panel_iron_glass_12 222 222 222
moreblocks:panel_iron_glass_14 222 222 222
moreblocks:panel_iron_glass_15 222 222 222
moreblocks:panel_iron_glass 222 222 222
moreblocks:panel_iron_glass_2 222 222 222
moreblocks:panel_iron_glass_4 222 222 222
moreblocks:panel_iron_glass_1 222 222 222 128
moreblocks:panel_iron_glass_12 222 222 222 128
moreblocks:panel_iron_glass_14 222 222 222 128
moreblocks:panel_iron_glass_15 222 222 222 128
moreblocks:panel_iron_glass 222 222 222 128
moreblocks:panel_iron_glass_2 222 222 222 128
moreblocks:panel_iron_glass_4 222 222 222 128
moreblocks:panel_iron_stone_1 134 134 134
moreblocks:panel_iron_stone_12 134 134 134
moreblocks:panel_iron_stone 134 134 134
@ -1200,13 +1200,13 @@ moreblocks:panel_obsidian_15 16 16 16
moreblocks:panel_obsidian 16 16 16
moreblocks:panel_obsidian_2 16 16 16
moreblocks:panel_obsidian_4 16 16 16
moreblocks:panel_obsidian_glass_1 16 17 17
moreblocks:panel_obsidian_glass_12 16 17 17
moreblocks:panel_obsidian_glass_14 16 17 17
moreblocks:panel_obsidian_glass_15 16 17 17
moreblocks:panel_obsidian_glass 16 17 17
moreblocks:panel_obsidian_glass_2 16 17 17
moreblocks:panel_obsidian_glass_4 16 17 17
moreblocks:panel_obsidian_glass_1 16 17 17 128
moreblocks:panel_obsidian_glass_12 16 17 17 128
moreblocks:panel_obsidian_glass_14 16 17 17 128
moreblocks:panel_obsidian_glass_15 16 17 17 128
moreblocks:panel_obsidian_glass 16 17 17 128
moreblocks:panel_obsidian_glass_2 16 17 17 128
moreblocks:panel_obsidian_glass_4 16 17 17 128
moreblocks:panel_plankstone_12 66 51 23
moreblocks:panel_plankstone_14 66 51 23
moreblocks:panel_plankstone_15 66 51 23
@ -1263,13 +1263,13 @@ moreblocks:panel_stone_tile_1 97 97 97
moreblocks:panel_stone_tile_2 97 97 97
moreblocks:panel_stone_tile_4 97 97 97
moreblocks:panel_stone_tile 97 97 97
moreblocks:panel_super_glow_glass_12 255 255 120
moreblocks:panel_super_glow_glass_1 255 255 120
moreblocks:panel_super_glow_glass_14 255 255 120
moreblocks:panel_super_glow_glass_15 255 255 120
moreblocks:panel_super_glow_glass_2 255 255 120
moreblocks:panel_super_glow_glass 255 255 120
moreblocks:panel_super_glow_glass_4 255 255 120
moreblocks:panel_super_glow_glass_12 255 255 120 128
moreblocks:panel_super_glow_glass_1 255 255 120 128
moreblocks:panel_super_glow_glass_14 255 255 120 128
moreblocks:panel_super_glow_glass_15 255 255 120 128
moreblocks:panel_super_glow_glass_2 255 255 120 128
moreblocks:panel_super_glow_glass 255 255 120 128
moreblocks:panel_super_glow_glass_4 255 255 120 128
moreblocks:panel_tree_12 66 52 35
moreblocks:panel_tree_14 66 52 35
moreblocks:panel_tree_15 66 52 35
@ -1342,13 +1342,13 @@ moreblocks:slab_coal_checker_15 133 133 133
moreblocks:slab_coal_checker_2 133 133 133
moreblocks:slab_coal_checker_quarter 133 133 133
moreblocks:slab_coal_checker_three_quarter 133 133 133
moreblocks:slab_coal_glass_1 130 130 130
moreblocks:slab_coal_glass 130 130 130
moreblocks:slab_coal_glass_14 130 130 130
moreblocks:slab_coal_glass_15 130 130 130
moreblocks:slab_coal_glass_2 130 130 130
moreblocks:slab_coal_glass_quarter 130 130 130
moreblocks:slab_coal_glass_three_quarter 130 130 130
moreblocks:slab_coal_glass_1 130 130 130 128
moreblocks:slab_coal_glass 130 130 130 128
moreblocks:slab_coal_glass_14 130 130 130 128
moreblocks:slab_coal_glass_15 130 130 130 128
moreblocks:slab_coal_glass_2 130 130 130 128
moreblocks:slab_coal_glass_quarter 130 130 130 128
moreblocks:slab_coal_glass_three_quarter 130 130 130 128
moreblocks:slab_coal_stone_14 70 70 70
moreblocks:slab_coal_stone_15 70 70 70
moreblocks:slab_coal_stone_1 70 70 70
@ -1398,20 +1398,20 @@ moreblocks:slab_diamondblock_15 103 195 201
moreblocks:slab_diamondblock_2 103 195 201
moreblocks:slab_diamondblock_quarter 103 195 201
moreblocks:slab_diamondblock_three_quarter 103 195 201
moreblocks:slab_glass_1 192 192 227
moreblocks:slab_glass_14 192 192 227
moreblocks:slab_glass_15 192 192 227
moreblocks:slab_glass 192 192 227
moreblocks:slab_glass_2 192 192 227
moreblocks:slab_glass_quarter 192 192 227
moreblocks:slab_glass_three_quarter 192 192 227
moreblocks:slab_glow_glass_1 255 226 114
moreblocks:slab_glow_glass_14 255 226 114
moreblocks:slab_glow_glass_15 255 226 114
moreblocks:slab_glow_glass_2 255 226 114
moreblocks:slab_glow_glass 255 226 114
moreblocks:slab_glow_glass_quarter 255 226 114
moreblocks:slab_glow_glass_three_quarter 255 226 114
moreblocks:slab_glass_1 192 192 227 128
moreblocks:slab_glass_14 192 192 227 128
moreblocks:slab_glass_15 192 192 227 128
moreblocks:slab_glass 192 192 227 128
moreblocks:slab_glass_2 192 192 227 128
moreblocks:slab_glass_quarter 192 192 227 128
moreblocks:slab_glass_three_quarter 192 192 227 128
moreblocks:slab_glow_glass_1 255 226 114 128
moreblocks:slab_glow_glass_14 255 226 114 128
moreblocks:slab_glow_glass_15 255 226 114 128
moreblocks:slab_glow_glass_2 255 226 114 128
moreblocks:slab_glow_glass 255 226 114 128
moreblocks:slab_glow_glass_quarter 255 226 114 128
moreblocks:slab_glow_glass_three_quarter 255 226 114 128
moreblocks:slab_goldblock_1 126 116 35
moreblocks:slab_goldblock 126 116 35
moreblocks:slab_goldblock_14 126 116 35
@ -1433,13 +1433,13 @@ moreblocks:slab_iron_checker_15 142 142 142
moreblocks:slab_iron_checker_2 142 142 142
moreblocks:slab_iron_checker_quarter 142 142 142
moreblocks:slab_iron_checker_three_quarter 142 142 142
moreblocks:slab_iron_glass_1 222 222 222
moreblocks:slab_iron_glass_14 222 222 222
moreblocks:slab_iron_glass_15 222 222 222
moreblocks:slab_iron_glass 222 222 222
moreblocks:slab_iron_glass_2 222 222 222
moreblocks:slab_iron_glass_quarter 222 222 222
moreblocks:slab_iron_glass_three_quarter 222 222 222
moreblocks:slab_iron_glass_1 222 222 222 128
moreblocks:slab_iron_glass_14 222 222 222 128
moreblocks:slab_iron_glass_15 222 222 222 128
moreblocks:slab_iron_glass 222 222 222 128
moreblocks:slab_iron_glass_2 222 222 222 128
moreblocks:slab_iron_glass_quarter 222 222 222 128
moreblocks:slab_iron_glass_three_quarter 222 222 222 128
moreblocks:slab_iron_stone_1 134 134 134
moreblocks:slab_iron_stone 134 134 134
moreblocks:slab_iron_stone_14 134 134 134
@ -1487,13 +1487,13 @@ moreblocks:slab_obsidian_14 16 16 16
moreblocks:slab_obsidian_15 16 16 16
moreblocks:slab_obsidian 16 16 16
moreblocks:slab_obsidian_2 16 16 16
moreblocks:slab_obsidian_glass_1 16 17 17
moreblocks:slab_obsidian_glass_14 16 17 17
moreblocks:slab_obsidian_glass_15 16 17 17
moreblocks:slab_obsidian_glass 16 17 17
moreblocks:slab_obsidian_glass_2 16 17 17
moreblocks:slab_obsidian_glass_quarter 16 17 17
moreblocks:slab_obsidian_glass_three_quarter 16 17 17
moreblocks:slab_obsidian_glass_1 16 17 17 128
moreblocks:slab_obsidian_glass_14 16 17 17 128
moreblocks:slab_obsidian_glass_15 16 17 17 128
moreblocks:slab_obsidian_glass 16 17 17 128
moreblocks:slab_obsidian_glass_2 16 17 17 128
moreblocks:slab_obsidian_glass_quarter 16 17 17 128
moreblocks:slab_obsidian_glass_three_quarter 16 17 17 128
moreblocks:slab_obsidian_quarter 16 16 16
moreblocks:slab_obsidian_three_quarter 16 16 16
moreblocks:slab_plankstone_14 66 51 23
@ -1552,13 +1552,13 @@ moreblocks:slab_stone_tile_2 97 97 97
moreblocks:slab_stone_tile 97 97 97
moreblocks:slab_stone_tile_quarter 97 97 97
moreblocks:slab_stone_tile_three_quarter 97 97 97
moreblocks:slab_super_glow_glass_1 255 255 120
moreblocks:slab_super_glow_glass_14 255 255 120
moreblocks:slab_super_glow_glass_15 255 255 120
moreblocks:slab_super_glow_glass_2 255 255 120
moreblocks:slab_super_glow_glass 255 255 120
moreblocks:slab_super_glow_glass_quarter 255 255 120
moreblocks:slab_super_glow_glass_three_quarter 255 255 120
moreblocks:slab_super_glow_glass_1 255 255 120 128
moreblocks:slab_super_glow_glass_14 255 255 120 128
moreblocks:slab_super_glow_glass_15 255 255 120 128
moreblocks:slab_super_glow_glass_2 255 255 120 128
moreblocks:slab_super_glow_glass 255 255 120 128
moreblocks:slab_super_glow_glass_quarter 255 255 120 128
moreblocks:slab_super_glow_glass_three_quarter 255 255 120 128
moreblocks:slab_tree_14 66 52 35
moreblocks:slab_tree_15 66 52 35
moreblocks:slab_tree_1 66 52 35
@ -1640,15 +1640,15 @@ moreblocks:stair_coal_checker_half 133 133 133
moreblocks:stair_coal_checker_inner 133 133 133
moreblocks:stair_coal_checker_outer 133 133 133
moreblocks:stair_coal_checker_right_half 133 133 133
moreblocks:stair_coal_glass 130 130 130
moreblocks:stair_coal_glass_alt_1 130 130 130
moreblocks:stair_coal_glass_alt 130 130 130
moreblocks:stair_coal_glass_alt_2 130 130 130
moreblocks:stair_coal_glass_alt_4 130 130 130
moreblocks:stair_coal_glass_half 130 130 130
moreblocks:stair_coal_glass_inner 130 130 130
moreblocks:stair_coal_glass_outer 130 130 130
moreblocks:stair_coal_glass_right_half 130 130 130
moreblocks:stair_coal_glass 130 130 130 128
moreblocks:stair_coal_glass_alt_1 130 130 130 128
moreblocks:stair_coal_glass_alt 130 130 130 128
moreblocks:stair_coal_glass_alt_2 130 130 130 128
moreblocks:stair_coal_glass_alt_4 130 130 130 128
moreblocks:stair_coal_glass_half 130 130 130 128
moreblocks:stair_coal_glass_inner 130 130 130 128
moreblocks:stair_coal_glass_outer 130 130 130 128
moreblocks:stair_coal_glass_right_half 130 130 130 128
moreblocks:stair_coal_stone 70 70 70
moreblocks:stair_coal_stone_alt_1 70 70 70
moreblocks:stair_coal_stone_alt_2 70 70 70
@ -1712,24 +1712,24 @@ moreblocks:stair_diamondblock_half 103 195 201
moreblocks:stair_diamondblock_inner 103 195 201
moreblocks:stair_diamondblock_outer 103 195 201
moreblocks:stair_diamondblock_right_half 103 195 201
moreblocks:stair_glass 192 192 227
moreblocks:stair_glass_alt_1 192 192 227
moreblocks:stair_glass_alt 192 192 227
moreblocks:stair_glass_alt_2 192 192 227
moreblocks:stair_glass_alt_4 192 192 227
moreblocks:stair_glass_half 192 192 227
moreblocks:stair_glass_inner 192 192 227
moreblocks:stair_glass_outer 192 192 227
moreblocks:stair_glass_right_half 192 192 227
moreblocks:stair_glow_glass 255 226 114
moreblocks:stair_glow_glass_alt_1 255 226 114
moreblocks:stair_glow_glass_alt_2 255 226 114
moreblocks:stair_glow_glass_alt 255 226 114
moreblocks:stair_glow_glass_alt_4 255 226 114
moreblocks:stair_glow_glass_half 255 226 114
moreblocks:stair_glow_glass_inner 255 226 114
moreblocks:stair_glow_glass_outer 255 226 114
moreblocks:stair_glow_glass_right_half 255 226 114
moreblocks:stair_glass 192 192 227 128 128
moreblocks:stair_glass_alt_1 192 192 227 128
moreblocks:stair_glass_alt 192 192 227 128
moreblocks:stair_glass_alt_2 192 192 227 128
moreblocks:stair_glass_alt_4 192 192 227 128
moreblocks:stair_glass_half 192 192 227 128
moreblocks:stair_glass_inner 192 192 227 128
moreblocks:stair_glass_outer 192 192 227 128
moreblocks:stair_glass_right_half 192 192 227 128
moreblocks:stair_glow_glass 255 226 114 128
moreblocks:stair_glow_glass_alt_1 255 226 114 128
moreblocks:stair_glow_glass_alt_2 255 226 114 128
moreblocks:stair_glow_glass_alt 255 226 114 128
moreblocks:stair_glow_glass_alt_4 255 226 114 128
moreblocks:stair_glow_glass_half 255 226 114 128
moreblocks:stair_glow_glass_inner 255 226 114 128
moreblocks:stair_glow_glass_outer 255 226 114 128
moreblocks:stair_glow_glass_right_half 255 226 114 128
moreblocks:stair_goldblock 126 116 35
moreblocks:stair_goldblock_alt_1 126 116 35
moreblocks:stair_goldblock_alt 126 116 35
@ -1757,15 +1757,15 @@ moreblocks:stair_iron_checker_half 142 142 142
moreblocks:stair_iron_checker_inner 142 142 142
moreblocks:stair_iron_checker_outer 142 142 142
moreblocks:stair_iron_checker_right_half 142 142 142
moreblocks:stair_iron_glass 222 222 222
moreblocks:stair_iron_glass_alt_1 222 222 222
moreblocks:stair_iron_glass_alt 222 222 222
moreblocks:stair_iron_glass_alt_2 222 222 222
moreblocks:stair_iron_glass_alt_4 222 222 222
moreblocks:stair_iron_glass_half 222 222 222
moreblocks:stair_iron_glass_inner 222 222 222
moreblocks:stair_iron_glass_outer 222 222 222
moreblocks:stair_iron_glass_right_half 222 222 222
moreblocks:stair_iron_glass 222 222 222 128
moreblocks:stair_iron_glass_alt_1 222 222 222 128
moreblocks:stair_iron_glass_alt 222 222 222 128
moreblocks:stair_iron_glass_alt_2 222 222 222 128
moreblocks:stair_iron_glass_alt_4 222 222 222 128
moreblocks:stair_iron_glass_half 222 222 222 128
moreblocks:stair_iron_glass_inner 222 222 222 128
moreblocks:stair_iron_glass_outer 222 222 222 128
moreblocks:stair_iron_glass_right_half 222 222 222 128
moreblocks:stair_iron_stone 134 134 134
moreblocks:stair_iron_stone_alt_1 134 134 134
moreblocks:stair_iron_stone_alt 134 134 134
@ -1825,15 +1825,15 @@ moreblocks:stair_obsidian_alt_1 16 16 16
moreblocks:stair_obsidian_alt 16 16 16
moreblocks:stair_obsidian_alt_2 16 16 16
moreblocks:stair_obsidian_alt_4 16 16 16
moreblocks:stair_obsidian_glass 16 17 17
moreblocks:stair_obsidian_glass_alt_1 16 17 17
moreblocks:stair_obsidian_glass_alt 16 17 17
moreblocks:stair_obsidian_glass_alt_2 16 17 17
moreblocks:stair_obsidian_glass_alt_4 16 17 17
moreblocks:stair_obsidian_glass_half 16 17 17
moreblocks:stair_obsidian_glass_inner 16 17 17
moreblocks:stair_obsidian_glass_outer 16 17 17
moreblocks:stair_obsidian_glass_right_half 16 17 17
moreblocks:stair_obsidian_glass 16 17 17 128
moreblocks:stair_obsidian_glass_alt_1 16 17 17 128
moreblocks:stair_obsidian_glass_alt 16 17 17 128
moreblocks:stair_obsidian_glass_alt_2 16 17 17 128
moreblocks:stair_obsidian_glass_alt_4 16 17 17 128
moreblocks:stair_obsidian_glass_half 16 17 17 128
moreblocks:stair_obsidian_glass_inner 16 17 17 128
moreblocks:stair_obsidian_glass_outer 16 17 17 128
moreblocks:stair_obsidian_glass_right_half 16 17 17 128
moreblocks:stair_obsidian_half 16 16 16
moreblocks:stair_obsidian_inner 16 16 16
moreblocks:stair_obsidian_outer 16 16 16
@ -1910,15 +1910,15 @@ moreblocks:stair_stone_tile_half 97 97 97
moreblocks:stair_stone_tile_inner 97 97 97
moreblocks:stair_stone_tile_outer 97 97 97
moreblocks:stair_stone_tile_right_half 97 97 97
moreblocks:stair_super_glow_glass 255 255 120
moreblocks:stair_super_glow_glass_alt_1 255 255 120
moreblocks:stair_super_glow_glass_alt_2 255 255 120
moreblocks:stair_super_glow_glass_alt 255 255 120
moreblocks:stair_super_glow_glass_alt_4 255 255 120
moreblocks:stair_super_glow_glass_half 255 255 120
moreblocks:stair_super_glow_glass_inner 255 255 120
moreblocks:stair_super_glow_glass_outer 255 255 120
moreblocks:stair_super_glow_glass_right_half 255 255 120
moreblocks:stair_super_glow_glass 255 255 120 128
moreblocks:stair_super_glow_glass_alt_1 255 255 120 128
moreblocks:stair_super_glow_glass_alt_2 255 255 120 128
moreblocks:stair_super_glow_glass_alt 255 255 120 128
moreblocks:stair_super_glow_glass_alt_4 255 255 120 128
moreblocks:stair_super_glow_glass_half 255 255 120 128
moreblocks:stair_super_glow_glass_inner 255 255 120 128
moreblocks:stair_super_glow_glass_outer 255 255 120 128
moreblocks:stair_super_glow_glass_right_half 255 255 120 128
moreblocks:stair_tree 66 52 35
moreblocks:stair_tree_alt_1 66 52 35
moreblocks:stair_tree_alt_2 66 52 35
@ -1965,11 +1965,11 @@ moreblocks:stair_wood_tile_inner 78 65 44
moreblocks:stair_wood_tile_outer 78 65 44
moreblocks:stair_wood_tile_right_half 78 65 44
moreblocks:stone_tile 97 97 97
moreblocks:super_glow_glass 255 255 120
moreblocks:trap_glass 147 147 51
moreblocks:trap_glow_glass 255 226 114
moreblocks:super_glow_glass 255 255 120 128
moreblocks:trap_glass 147 147 51 128
moreblocks:trap_glow_glass 255 226 114 128
moreblocks:trap_stone 151 151 50
moreblocks:trap_super_glow_glass 255 226 114
moreblocks:trap_super_glow_glass 255 226 114 128
moreblocks:wood_tile 78 65 44
moreblocks:wood_tile_center 128 100 57
moreblocks:wood_tile_down 128 100 57
@ -2032,7 +2032,7 @@ stairs:slab_bronzeblock 116 70 26
stairs:slab_cactus_checker 130 138 130
stairs:slab_circle_stone_bricks 91 88 87
stairs:slab_coal_checker 133 133 133
stairs:slab_coal_glass 130 130 130
stairs:slab_coal_glass 130 130 130 128
stairs:slab_coal_stone 70 70 70
stairs:slab_coal_stone_bricks 79 76 75
stairs:slab_cobble 128 128 128
@ -2040,12 +2040,12 @@ stairs:slab_copperblock 110 86 60
stairs:slab_desert_stone 122 74 57
stairs:slab_desert_stonebrick 105 64 49
stairs:slab_diamondblock 103 195 201
stairs:slab_glass 192 192 227
stairs:slab_glow_glass 255 226 114
stairs:slab_glass 192 192 227 128
stairs:slab_glow_glass 255 226 114 128
stairs:slab_goldblock 126 116 35
stairs:slab_invisible 0 0 0
stairs:slab_iron_checker 142 142 142
stairs:slab_iron_glass 222 222 222
stairs:slab_iron_glass 222 222 222 128
stairs:slab_iron_stone 134 134 134
stairs:slab_iron_stone_bricks 104 98 97
stairs:slab_jungletree 120 106 78
@ -2053,7 +2053,7 @@ stairs:slab_jungle_wood 51 35 12
stairs:slab_junglewood 79 57 26
stairs:slab_mossycobble 102 116 85
stairs:slab_obsidian 16 16 16
stairs:slab_obsidian_glass 16 17 17
stairs:slab_obsidian_glass 16 17 17 128
stairs:slab_plankstone 66 51 23
stairs:slab_sandstone 200 183 143
stairs:slab_sandstonebrick 160 144 108
@ -2062,7 +2062,7 @@ stairs:slab_steelblock 153 153 153
stairs:slab_stone 128 128 128
stairs:slab_stonebrick 128 128 128
stairs:slab_stone_tile 97 97 97
stairs:slab_super_glow_glass 255 255 120
stairs:slab_super_glow_glass 255 255 120 128
stairs:slab_tree 66 52 35
stairs:slab_wood 104 78 42
stairs:slab_wood_tile 78 65 44
@ -2073,7 +2073,7 @@ stairs:stair_bronzeblock 116 70 26
stairs:stair_cactus_checker 130 138 130
stairs:stair_circle_stone_bricks 91 88 87
stairs:stair_coal_checker 133 133 133
stairs:stair_coal_glass 130 130 130
stairs:stair_coal_glass 130 130 130 128
stairs:stair_coal_stone 70 70 70
stairs:stair_coal_stone_bricks 79 76 75
stairs:stair_cobble 128 128 128
@ -2082,12 +2082,12 @@ stairs:stair_copperblock 110 86 60
stairs:stair_desert_stone 122 74 57
stairs:stair_desert_stonebrick 150 100 30
stairs:stair_diamondblock 103 195 201
stairs:stair_glass 192 192 227
stairs:stair_glow_glass 255 226 114
stairs:stair_glass 192 192 227 128
stairs:stair_glow_glass 255 226 114 128
stairs:stair_goldblock 126 116 35
stairs:stair_invisible 0 0 0
stairs:stair_iron_checker 142 142 142
stairs:stair_iron_glass 222 222 222
stairs:stair_iron_glass 222 222 222 128
stairs:stair_iron_stone 134 134 134
stairs:stair_iron_stone_bricks 104 98 97
stairs:stair_jungletree 120 106 78
@ -2096,7 +2096,7 @@ stairs:stair_junglewood 79 57 26
stairs:stair_junglewoodupside_down 79 57 26
stairs:stair_mossycobble 102 116 85
stairs:stair_obsidian 16 16 16
stairs:stair_obsidian_glass 16 17 17
stairs:stair_obsidian_glass 16 17 17 128
stairs:stair_plankstone 66 51 23
stairs:stair_sandstone 200 183 143
stairs:stair_sandstonebrick 160 144 108
@ -2106,7 +2106,7 @@ stairs:stair_stone 128 128 128
stairs:stair_stonebrick 128 128 128
stairs:stair_stonebrickupside_down 128 128 128
stairs:stair_stone_tile 97 97 97
stairs:stair_super_glow_glass 255 255 120
stairs:stair_super_glow_glass 255 255 120 128
stairs:stair_tree 66 52 35
stairs:stair_wood 104 78 42
stairs:stair_wood_tile 78 65 44
@ -2114,11 +2114,11 @@ stairs:stair_wood_tile_center 128 100 57
stairs:stair_wood_tile_full 78 64 44
tnt:tnt 255 0 0
travelnet:elevator 176 122 34
travelnet:elevator_door_glass_open 215 215 236
travelnet:elevator_door_glass_open 215 215 236 128
travelnet:elevator_top 176 122 34
travelnet:travelnet 220 180 44
vessels:drinking_glass 220 220 220
vessels:glass_bottle 211 212 211
vessels:drinking_glass 220 220 220 128
vessels:glass_bottle 211 212 211 128
vessels:steel_bottle 109 109 109
wool:black 20 20 20
wool:blue 0 78 152

View File

@ -76,7 +76,7 @@ func (btc *BaseTileCreator) CreateTile(x, z int16, i, j int) error {
btc.yOrder.Reset()
drawBlock := func(block *Block) {
if err := btc.yOrder.RenderBlock(block, btc.colors.NameIndex); err != nil {
if err := btc.yOrder.RenderBlock(block, btc.colors); err != nil {
log.Printf("WARN: rendering block failed: %s", err)
}
}
@ -109,7 +109,7 @@ func (btc *BaseTileCreator) CreateTile(x, z int16, i, j int) error {
if err := btc.client.QueryCuboid(query, drawBlock); err != nil {
return err
}
if err := btc.yOrder.Drain(btc.colors.NameIndex); err != nil {
if err := btc.yOrder.Drain(btc.colors); err != nil {
log.Printf("WARN: rendering block failed: %s", err)
}
}

View File

@ -47,6 +47,7 @@ type (
MapContent []byte
AirId int32
IgnoreId int32
AirOnly bool
IndexMap map[int32]int32
}
)
@ -62,7 +63,7 @@ type posBuf struct {
Pos int
}
func NewDecodedBlock(data []byte, nameIndex map[string]int32) (db *DecodedBlock, err error) {
func NewDecodedBlock(data []byte, colors *Colors) (db *DecodedBlock, err error) {
version := data[0]
contentWidth := int(data[2])
@ -136,6 +137,7 @@ func NewDecodedBlock(data []byte, nameIndex map[string]int32) (db *DecodedBlock,
airId, ignoreId := int32(-1), int32(-1)
indexMap := make(map[int32]int32)
var airOnly bool
if version >= 22 {
offset++
numMappings := int(binary.BigEndian.Uint16(data[offset:]))
@ -153,13 +155,14 @@ func NewDecodedBlock(data []byte, nameIndex map[string]int32) (db *DecodedBlock,
case "ignore":
ignoreId = nodeId
default:
if index, found := nameIndex[name]; found {
if index, found := colors.NameIndex[name]; found {
indexMap[nodeId] = index
} else {
log.Printf("Missing color entry for %s.", name)
}
}
}
airOnly = airId != -1 && len(indexMap) == 0
}
db = &DecodedBlock{
@ -167,6 +170,7 @@ func NewDecodedBlock(data []byte, nameIndex map[string]int32) (db *DecodedBlock,
MapContent: mapContent,
AirId: airId,
IgnoreId: ignoreId,
AirOnly: airOnly,
IndexMap: indexMap}
return

View File

@ -9,12 +9,33 @@ import (
"fmt"
"image/color"
"os"
"sort"
"strings"
)
type Colors struct {
Colors []color.RGBA
NameIndex map[string]int32
Colors []color.RGBA
NameIndex map[string]int32
Transparent int
}
type namedColor struct {
name string
color color.RGBA
}
type sortByAlpha []namedColor
func (colors sortByAlpha) Less(i, j int) bool {
return colors[i].color.A < colors[j].color.A
}
func (colors sortByAlpha) Len() int {
return len(colors)
}
func (colors sortByAlpha) Swap(i, j int) {
colors[i], colors[j] = colors[j], colors[i]
}
func ParseColors(filename string) (colors *Colors, err error) {
@ -25,8 +46,7 @@ func ParseColors(filename string) (colors *Colors, err error) {
}
defer file.Close()
nameIndex := make(map[string]int32)
cols := make([]color.RGBA, 0, 2200)
cols := make([]namedColor, 0, 2200)
scanner := bufio.NewScanner(file)
for scanner.Scan() {
@ -38,12 +58,26 @@ func ParseColors(filename string) (colors *Colors, err error) {
var name string
if n, _ := fmt.Sscanf(
line, "%s %d %d %d %d", &name, &c.R, &c.G, &c.B, &c.A); n > 0 {
idx := int32(len(cols))
cols = append(cols, c)
nameIndex[name] = idx
cols = append(cols, namedColor{name: name, color: c})
}
}
err = scanner.Err()
colors = &Colors{Colors: cols, NameIndex: nameIndex}
// Sort transparent colors to front. Makes it easier to figure out
// if an index corresponds to a transparent color (i < Transparent).
sort.Sort(sortByAlpha(cols))
cs := make([]color.RGBA, len(cols))
nameIndex := make(map[string]int32, len(cols))
transparent := 0
for i, nc := range cols {
if nc.color.A < 0xff {
transparent++
}
cs[i] = nc.color
nameIndex[nc.name] = int32(i)
}
colors = &Colors{Colors: cs, NameIndex: nameIndex, Transparent: transparent}
return
}

View File

@ -58,18 +58,18 @@ func copyData(data []byte) []byte {
return ndata
}
func (yo *YOrder) RenderBlock(block *Block, nameIndex map[string]int32) (err error) {
func (yo *YOrder) RenderBlock(block *Block, colors *Colors) (err error) {
var nblock *Block
if len(yo.blocks) == yo.capacity {
oblock := yo.blocks[0]
if oblock.Coord.Y < block.Coord.Y {
// New one is above highest old. Directly render new.
err = yo.Renderer.RenderBlock(block, nameIndex)
err = yo.Renderer.RenderBlock(block, colors)
return
}
// Render old one. Store copy of new in heap.
heap.Pop(yo)
err = yo.Renderer.RenderBlock(oblock, nameIndex)
err = yo.Renderer.RenderBlock(oblock, colors)
l := len(block.Data)
if cap(oblock.Data) < l {
oblock.Data = make([]byte, l, max(l, 8*1024))
@ -87,9 +87,9 @@ func (yo *YOrder) RenderBlock(block *Block, nameIndex map[string]int32) (err err
return
}
func (yo *YOrder) Drain(nameIndex map[string]int32) (err error) {
func (yo *YOrder) Drain(colors *Colors) (err error) {
for len(yo.blocks) > 0 {
if err = yo.Renderer.RenderBlock(heap.Pop(yo).(*Block), nameIndex); err != nil {
if err = yo.Renderer.RenderBlock(heap.Pop(yo).(*Block), colors); err != nil {
return
}
}
@ -162,7 +162,7 @@ func (r *Renderer) IsFilled() bool {
return true
}
func (r *Renderer) RenderBlock(block *Block, nameIndex map[string]int32) (err error) {
func (r *Renderer) RenderBlock(block *Block, colors *Colors) (err error) {
bx := block.Coord.X - r.xOfs
bz := block.Coord.Z - r.zOfs
@ -178,7 +178,12 @@ func (r *Renderer) RenderBlock(block *Block, nameIndex map[string]int32) (err er
// Decoding is pretty expensive so do it that late.
var db *DecodedBlock
if db, err = NewDecodedBlock(block.Data, nameIndex); err != nil {
if db, err = NewDecodedBlock(block.Data, colors); err != nil {
return
}
if db.AirOnly {
r.Rejected++
return
}