add floodfill stair masks

This commit is contained in:
NULL511 2024-07-31 03:41:45 -04:00
parent 23c2ea5b2e
commit bf3189e846
4 changed files with 339 additions and 116 deletions

File diff suppressed because one or more lines are too long

View File

@ -996,6 +996,73 @@ void main() {
break; break;
} }
// STAIRS
if (blockId >= BLOCK_STAIRS_BOTTOM_N && blockId <= BLOCK_STAIRS_TOP_OUTER_S_W) {
mixWeight = 0.25;
switch (blockId) {
case BLOCK_STAIRS_BOTTOM_N:
mixMask = BuildLpvMask(1u, 1u, 0u, 1u, 1u, 0u);
break;
case BLOCK_STAIRS_BOTTOM_E:
mixMask = BuildLpvMask(1u, 1u, 1u, 0u, 1u, 0u);
break;
case BLOCK_STAIRS_BOTTOM_S:
mixMask = BuildLpvMask(0u, 1u, 1u, 1u, 1u, 0u);
break;
case BLOCK_STAIRS_BOTTOM_W:
mixMask = BuildLpvMask(1u, 0u, 1u, 1u, 1u, 0u);
break;
case BLOCK_STAIRS_BOTTOM_INNER_S_E:
mixMask = BuildLpvMask(0u, 1u, 1u, 0u, 0u, 1u);
break;
case BLOCK_STAIRS_BOTTOM_INNER_S_W:
mixMask = BuildLpvMask(0u, 0u, 1u, 1u, 0u, 1u);
break;
case BLOCK_STAIRS_BOTTOM_INNER_N_W:
mixMask = BuildLpvMask(1u, 0u, 0u, 1u, 0u, 1u);
break;
case BLOCK_STAIRS_BOTTOM_INNER_N_E:
mixMask = BuildLpvMask(1u, 1u, 0u, 0u, 0u, 1u);
break;
}
if (blockId >= BLOCK_STAIRS_BOTTOM_OUTER_N_W && blockId <= BLOCK_STAIRS_BOTTOM_OUTER_S_W) {
mixMask = BuildLpvMask(1u, 1u, 1u, 1u, 0u, 1u);
}
switch (blockId) {
case BLOCK_STAIRS_TOP_N:
mixMask = BuildLpvMask(1u, 1u, 0u, 1u, 0u, 1u);
break;
case BLOCK_STAIRS_TOP_E:
mixMask = BuildLpvMask(1u, 1u, 1u, 0u, 0u, 1u);
break;
case BLOCK_STAIRS_TOP_S:
mixMask = BuildLpvMask(0u, 1u, 1u, 1u, 0u, 1u);
break;
case BLOCK_STAIRS_TOP_W:
mixMask = BuildLpvMask(1u, 0u, 1u, 1u, 0u, 1u);
break;
case BLOCK_STAIRS_TOP_INNER_S_E:
mixMask = BuildLpvMask(0u, 1u, 1u, 0u, 0u, 1u);
break;
case BLOCK_STAIRS_TOP_INNER_S_W:
mixMask = BuildLpvMask(0u, 0u, 1u, 1u, 0u, 1u);
break;
case BLOCK_STAIRS_TOP_INNER_N_W:
mixMask = BuildLpvMask(1u, 0u, 0u, 1u, 0u, 1u);
break;
case BLOCK_STAIRS_TOP_INNER_N_E:
mixMask = BuildLpvMask(1u, 1u, 0u, 0u, 0u, 1u);
break;
}
if (blockId >= BLOCK_STAIRS_TOP_OUTER_N_W && blockId <= BLOCK_STAIRS_TOP_OUTER_S_W) {
mixMask = BuildLpvMask(1u, 1u, 1u, 1u, 0u, 1u);
}
}
// WALL // WALL
if (blockId >= BLOCK_WALL_MIN && blockId <= BLOCK_WALL_MAX) { if (blockId >= BLOCK_WALL_MIN && blockId <= BLOCK_WALL_MAX) {
mixWeight = 0.25; mixWeight = 0.25;

View File

@ -218,64 +218,88 @@
#define BLOCK_TRAPDOOR_E 413 #define BLOCK_TRAPDOOR_E 413
#define BLOCK_TRAPDOOR_S 414 #define BLOCK_TRAPDOOR_S 414
#define BLOCK_TRAPDOOR_W 415 #define BLOCK_TRAPDOOR_W 415
#define BLOCK_WALL_POST 416 #define BLOCK_STAIRS_BOTTOM_N 416
#define BLOCK_WALL_MIN 416 #define BLOCK_STAIRS_BOTTOM_E 417
#define BLOCK_WALL_POST_LOW_N 417 #define BLOCK_STAIRS_BOTTOM_S 418
#define BLOCK_WALL_POST_LOW_E 418 #define BLOCK_STAIRS_BOTTOM_W 419
#define BLOCK_WALL_POST_LOW_S 419 #define BLOCK_STAIRS_BOTTOM_INNER_S_E 420
#define BLOCK_WALL_POST_LOW_W 420 #define BLOCK_STAIRS_BOTTOM_INNER_S_W 421
#define BLOCK_WALL_POST_LOW_N_S 421 #define BLOCK_STAIRS_BOTTOM_INNER_N_W 422
#define BLOCK_WALL_POST_LOW_W_E 422 #define BLOCK_STAIRS_BOTTOM_INNER_N_E 423
#define BLOCK_WALL_POST_LOW_N_W 423 #define BLOCK_STAIRS_BOTTOM_OUTER_N_W 424
#define BLOCK_WALL_POST_LOW_N_E 424 #define BLOCK_STAIRS_BOTTOM_OUTER_N_E 425
#define BLOCK_WALL_POST_LOW_S_W 425 #define BLOCK_STAIRS_BOTTOM_OUTER_S_E 426
#define BLOCK_WALL_POST_LOW_S_E 426 #define BLOCK_STAIRS_BOTTOM_OUTER_S_W 427
#define BLOCK_WALL_POST_LOW_N_W_S 427 #define BLOCK_STAIRS_TOP_N 428
#define BLOCK_WALL_POST_LOW_N_E_S 428 #define BLOCK_STAIRS_TOP_E 429
#define BLOCK_WALL_POST_LOW_W_N_E 429 #define BLOCK_STAIRS_TOP_S 430
#define BLOCK_WALL_POST_LOW_W_S_E 430 #define BLOCK_STAIRS_TOP_W 431
#define BLOCK_WALL_POST_LOW_ALL 431 #define BLOCK_STAIRS_TOP_INNER_S_E 432
#define BLOCK_WALL_POST_TALL_N 432 #define BLOCK_STAIRS_TOP_INNER_S_W 433
#define BLOCK_WALL_POST_TALL_E 433 #define BLOCK_STAIRS_TOP_INNER_N_W 434
#define BLOCK_WALL_POST_TALL_S 434 #define BLOCK_STAIRS_TOP_INNER_N_E 435
#define BLOCK_WALL_POST_TALL_W 435 #define BLOCK_STAIRS_TOP_OUTER_N_W 436
#define BLOCK_WALL_POST_TALL_N_S 436 #define BLOCK_STAIRS_TOP_OUTER_N_E 437
#define BLOCK_WALL_POST_TALL_W_E 437 #define BLOCK_STAIRS_TOP_OUTER_S_E 438
#define BLOCK_WALL_POST_TALL_N_W 438 #define BLOCK_STAIRS_TOP_OUTER_S_W 439
#define BLOCK_WALL_POST_TALL_N_E 439 #define BLOCK_WALL_POST 440
#define BLOCK_WALL_POST_TALL_S_W 440 #define BLOCK_WALL_MIN 440
#define BLOCK_WALL_POST_TALL_S_E 441 #define BLOCK_WALL_POST_LOW_N 441
#define BLOCK_WALL_POST_TALL_N_W_S 442 #define BLOCK_WALL_POST_LOW_E 442
#define BLOCK_WALL_POST_TALL_N_E_S 443 #define BLOCK_WALL_POST_LOW_S 443
#define BLOCK_WALL_POST_TALL_W_N_E 444 #define BLOCK_WALL_POST_LOW_W 444
#define BLOCK_WALL_POST_TALL_W_S_E 445 #define BLOCK_WALL_POST_LOW_N_S 445
#define BLOCK_WALL_POST_TALL_ALL 446 #define BLOCK_WALL_POST_LOW_W_E 446
#define BLOCK_WALL_POST_TALL_N_LOW_S 447 #define BLOCK_WALL_POST_LOW_N_W 447
#define BLOCK_WALL_POST_TALL_E_LOW_W 448 #define BLOCK_WALL_POST_LOW_N_E 448
#define BLOCK_WALL_POST_TALL_S_LOW_N 449 #define BLOCK_WALL_POST_LOW_S_W 449
#define BLOCK_WALL_POST_TALL_W_LOW_E 450 #define BLOCK_WALL_POST_LOW_S_E 450
#define BLOCK_WALL_POST_TALL_N_S_LOW_W_E 451 #define BLOCK_WALL_POST_LOW_N_W_S 451
#define BLOCK_WALL_POST_TALL_W_E_LOW_N_S 452 #define BLOCK_WALL_POST_LOW_N_E_S 452
#define BLOCK_WALL_POST_TALL_N_W_LOW_S_E 453 #define BLOCK_WALL_POST_LOW_W_N_E 453
#define BLOCK_WALL_POST_TALL_N_E_LOW_S_W 454 #define BLOCK_WALL_POST_LOW_W_S_E 454
#define BLOCK_WALL_POST_TALL_S_W_LOW_N_E 455 #define BLOCK_WALL_POST_LOW_ALL 455
#define BLOCK_WALL_POST_TALL_S_E_LOW_N_W 456 #define BLOCK_WALL_POST_TALL_N 456
#define BLOCK_WALL_LOW_N_S 457 #define BLOCK_WALL_POST_TALL_E 457
#define BLOCK_WALL_LOW_W_E 458 #define BLOCK_WALL_POST_TALL_S 458
#define BLOCK_WALL_LOW_N_W 459 #define BLOCK_WALL_POST_TALL_W 459
#define BLOCK_WALL_LOW_N_E 460 #define BLOCK_WALL_POST_TALL_N_S 460
#define BLOCK_WALL_LOW_S_W 461 #define BLOCK_WALL_POST_TALL_W_E 461
#define BLOCK_WALL_LOW_S_E 462 #define BLOCK_WALL_POST_TALL_N_W 462
#define BLOCK_WALL_LOW_ALL 463 #define BLOCK_WALL_POST_TALL_N_E 463
#define BLOCK_WALL_TALL_N_S 464 #define BLOCK_WALL_POST_TALL_S_W 464
#define BLOCK_WALL_TALL_W_E 465 #define BLOCK_WALL_POST_TALL_S_E 465
#define BLOCK_WALL_TALL_N_W 466 #define BLOCK_WALL_POST_TALL_N_W_S 466
#define BLOCK_WALL_TALL_N_E 467 #define BLOCK_WALL_POST_TALL_N_E_S 467
#define BLOCK_WALL_TALL_S_W 468 #define BLOCK_WALL_POST_TALL_W_N_E 468
#define BLOCK_WALL_TALL_S_E 469 #define BLOCK_WALL_POST_TALL_W_S_E 469
#define BLOCK_WALL_TALL_ALL 470 #define BLOCK_WALL_POST_TALL_ALL 470
#define BLOCK_WALL_TALL_N_S_LOW_W_E 471 #define BLOCK_WALL_POST_TALL_N_LOW_S 471
#define BLOCK_WALL_TALL_W_E_LOW_N_S 472 #define BLOCK_WALL_POST_TALL_E_LOW_W 472
#define BLOCK_WALL_MAX 472 #define BLOCK_WALL_POST_TALL_S_LOW_N 473
#define BLOCK_WALL_POST_TALL_W_LOW_E 474
#define BLOCK_WALL_POST_TALL_N_S_LOW_W_E 475
#define BLOCK_WALL_POST_TALL_W_E_LOW_N_S 476
#define BLOCK_WALL_POST_TALL_N_W_LOW_S_E 477
#define BLOCK_WALL_POST_TALL_N_E_LOW_S_W 478
#define BLOCK_WALL_POST_TALL_S_W_LOW_N_E 479
#define BLOCK_WALL_POST_TALL_S_E_LOW_N_W 480
#define BLOCK_WALL_LOW_N_S 481
#define BLOCK_WALL_LOW_W_E 482
#define BLOCK_WALL_LOW_N_W 483
#define BLOCK_WALL_LOW_N_E 484
#define BLOCK_WALL_LOW_S_W 485
#define BLOCK_WALL_LOW_S_E 486
#define BLOCK_WALL_LOW_ALL 487
#define BLOCK_WALL_TALL_N_S 488
#define BLOCK_WALL_TALL_W_E 489
#define BLOCK_WALL_TALL_N_W 490
#define BLOCK_WALL_TALL_N_E 491
#define BLOCK_WALL_TALL_S_W 492
#define BLOCK_WALL_TALL_S_E 493
#define BLOCK_WALL_TALL_ALL 494
#define BLOCK_WALL_TALL_N_S_LOW_W_E 495
#define BLOCK_WALL_TALL_W_E_LOW_N_S 496
#define BLOCK_WALL_MAX 496
#define BLOCK_END_PORTAL 500 #define BLOCK_END_PORTAL 500
#define BLOCK_SIGN 501 #define BLOCK_SIGN 501

View File

@ -805,6 +805,86 @@ block.*= minecraft:hanging_roots minecraft:weeping_vines minecraft:cave_vines:be
#= BLOCK_TRAPDOOR_W #= BLOCK_TRAPDOOR_W
block.*= [trapdoor]:facing=west:open=true block.*= [trapdoor]:facing=west:open=true
#=== STAIRS ===#
group.stairs=acacia_stairs bamboo_stairs bamboo_mosaic_stairs birch_stairs cherry_stairs crimson_stairs dark_oak_stairs jungle_stairs mangrove_stairs oak_stairs spruce_stairs warped_stairs andesite_stairs blackstone_stairs brick_stairs cobbled_deepslate_stairs cobblestone_stairs cut_copper_stairs dark_prismarine_stairs deepslate_brick_stairs deepslate_tile_stairs diorite_stairs end_stone_brick_stairs exposed_cut_copper_stairs granite_stairs mossy_cobblestone_stairs mossy_stone_brick_stairs mud_brick_stairs nether_brick_stairs oxidized_cut_copper_stairs polished_andesite_stairs polished_blackstone_brick_stairs polished_blackstone_stairs polished_deepslate_stairs polished_diorite_stairs polished_granite_stairs prismarine_brick_stairs prismarine_stairs purpur_stairs quartz_stairs red_nether_brick_stairs red_sandstone_stairs sandstone_stairs smooth_quartz_stairs smooth_red_sandstone_stairs smooth_sandstone_stairs stone_brick_stairs stone_stairs waxed_cut_copper_stairs waxed_exposed_cut_copper_stairs waxed_oxidized_cut_copper_stairs waxed_weathered_cut_copper_stairs weathered_cut_copper_stairs \
createdeco:andesite_sheet_stairs createdeco:brass_sheet_stairs createdeco:cast_iron_sheet_stairs createdeco:copper_sheet_stairs createdeco:gold_sheet_stairs createdeco:iron_sheet_stairs createdeco:netherite_sheet_stairs createdeco:zinc_sheet_stairs \
create:cut_andesite_stairs create:polished_cut_andesite_stairs create:cut_andesite_brick_stairs create:small_andesite_brick_stairs create:cut_asurine_stairs create:polished_cut_asurine_stairs create:cut_asurine_brick_stairs create:small_asurine_brick_stairs create:cut_calcite_stairs create:polished_cut_calcite_stairs create:cut_calcite_brick_stairs create:small_calcite_brick_stairs create:cut_crimsite_stairs create:polished_cut_crimsite_stairs create:cut_crimsite_brick_stairs create:small_crimsite_brick_stairs create:cut_deepslate_stairs create:polished_cut_deepslate_stairs create:cut_deepslate_brick_stairs create:small_deepslate_brick_stairs create:cut_diorite_stairs create:polished_cut_diorite_stairs create:cut_diorite_brick_stairs create:small_diorite_brick_stairs create:cut_dripstone_stairs create:polished_cut_dripstone_stairs create:cut_dripstone_brick_stairs create:small_dripstone_brick_stairs create:cut_granite_stairs create:polished_cut_granite_stairs create:cut_granite_brick_stairs create:small_granite_brick_stairs create:cut_limestone_stairs create:polished_cut_limestone_stairs create:cut_limestone_brick_stairs create:small_limestone_brick_stairs create:cut_ochrum_stairs create:polished_cut_ochrum_stairs create:cut_ochrum_brick_stairs create:small_ochrum_brick_stairs create:cut_scorchia_stairs create:polished_cut_scorchia_stairs create:cut_scorchia_brick_stairs create:small_scorchia_brick_stairs create:cut_scoria_stairs create:polished_cut_scoria_stairs create:cut_scoria_brick_stairs create:small_scoria_brick_stairs create:cut_tuff_stairs create:polished_cut_tuff_stairs create:cut_tuff_brick_stairs create:small_tuff_brick_stairs create:cut_veridium_stairs create:polished_cut_veridium_stairs create:cut_veridium_brick_stairs create:small_veridium_brick_stairs create:copper_shingle_stairs create:exposed_copper_shingle_stairs create:weathered_copper_shingle_stairs create:oxidized_copper_shingle_stairs create:waxed_copper_shingle_stairs create:waxed_exposed_copper_shingle_stairs create:waxed_weathered_copper_shingle_stairs create:waxed_oxidized_copper_shingle_stairs create:copper_tile_stairs create:exposed_copper_tile_stairs create:weathered_copper_tile_stairs create:oxidized_copper_tile_stairs create:waxed_copper_tile_stairs create:waxed_exposed_copper_tile_stairs create:waxed_weathered_copper_tile_stairs create:waxed_oxidized_copper_tile_stairs
#= BLOCK_STAIRS_BOTTOM_N
block.*=[stairs]:shape=straight:half=bottom:facing=north
#= BLOCK_STAIRS_BOTTOM_E
block.*=[stairs]:shape=straight:half=bottom:facing=east
#= BLOCK_STAIRS_BOTTOM_S
block.*=[stairs]:shape=straight:half=bottom:facing=south
#= BLOCK_STAIRS_BOTTOM_W
block.*=[stairs]:shape=straight:half=bottom:facing=west
#= BLOCK_STAIRS_BOTTOM_INNER_S_E
block.*=[stairs]:shape=inner_left:half=bottom:facing=south [stairs]:shape=inner_right:half=bottom:facing=east
#= BLOCK_STAIRS_BOTTOM_INNER_S_W
block.*=[stairs]:shape=inner_left:half=bottom:facing=west [stairs]:shape=inner_right:half=bottom:facing=south
#= BLOCK_STAIRS_BOTTOM_INNER_N_W
block.*=[stairs]:shape=inner_left:half=bottom:facing=north [stairs]:shape=inner_right:half=bottom:facing=west
#= BLOCK_STAIRS_BOTTOM_INNER_N_E
block.*=[stairs]:shape=inner_left:half=bottom:facing=east [stairs]:shape=inner_right:half=bottom:facing=north
#= BLOCK_STAIRS_BOTTOM_OUTER_N_W
block.*=[stairs]:shape=outer_left:half=bottom:facing=north [stairs]:shape=outer_right:half=bottom:facing=west
#= BLOCK_STAIRS_BOTTOM_OUTER_N_E
block.*=[stairs]:shape=outer_left:half=bottom:facing=east [stairs]:shape=outer_right:half=bottom:facing=north
#= BLOCK_STAIRS_BOTTOM_OUTER_S_E
block.*=[stairs]:shape=outer_left:half=bottom:facing=south [stairs]:shape=outer_right:half=bottom:facing=east
#= BLOCK_STAIRS_BOTTOM_OUTER_S_W
block.*=[stairs]:shape=outer_left:half=bottom:facing=west [stairs]:shape=outer_right:half=bottom:facing=south
#= BLOCK_STAIRS_TOP_N
block.*=[stairs]:shape=straight:half=top:facing=north
#= BLOCK_STAIRS_TOP_E
block.*=[stairs]:shape=straight:half=top:facing=east
#= BLOCK_STAIRS_TOP_S
block.*=[stairs]:shape=straight:half=top:facing=south
#= BLOCK_STAIRS_TOP_W
block.*=[stairs]:shape=straight:half=top:facing=west
#= BLOCK_STAIRS_TOP_INNER_S_E
block.*=[stairs]:shape=inner_left:half=top:facing=south [stairs]:shape=inner_right:half=top:facing=east
#= BLOCK_STAIRS_TOP_INNER_S_W
block.*=[stairs]:shape=inner_left:half=top:facing=west [stairs]:shape=inner_right:half=top:facing=south
#= BLOCK_STAIRS_TOP_INNER_N_W
block.*=[stairs]:shape=inner_left:half=top:facing=north [stairs]:shape=inner_right:half=top:facing=west
#= BLOCK_STAIRS_TOP_INNER_N_E
block.*=[stairs]:shape=inner_left:half=top:facing=east [stairs]:shape=inner_right:half=top:facing=north
#= BLOCK_STAIRS_TOP_OUTER_N_W
block.*=[stairs]:shape=outer_left:half=top:facing=north [stairs]:shape=outer_right:half=top:facing=west
#= BLOCK_STAIRS_TOP_OUTER_N_E
block.*=[stairs]:shape=outer_left:half=top:facing=east [stairs]:shape=outer_right:half=top:facing=north
#= BLOCK_STAIRS_TOP_OUTER_S_E
block.*=[stairs]:shape=outer_left:half=top:facing=south [stairs]:shape=outer_right:half=top:facing=east
#= BLOCK_STAIRS_TOP_OUTER_S_W
block.*=[stairs]:shape=outer_left:half=top:facing=west [stairs]:shape=outer_right:half=top:facing=south
#=== WALLS ===# #=== WALLS ===#
group.wall=cobblestone_wall andesite_wall blackstone_wall brick_wall cobbled_deepslate_wall deepslate_brick_wall deepslate_tile_wall diorite_wall end_stone_brick_wall granite_wall mossy_cobblestone_wall mossy_stone_brick_wall mud_brick_wall nether_brick_wall polished_blackstone_brick_wall polished_blackstone_wall polished_deepslate_wall prismarine_wall red_nether_brick_wall red_sandstone_wall sandstone_wall stone_brick_wall \ group.wall=cobblestone_wall andesite_wall blackstone_wall brick_wall cobbled_deepslate_wall deepslate_brick_wall deepslate_tile_wall diorite_wall end_stone_brick_wall granite_wall mossy_cobblestone_wall mossy_stone_brick_wall mud_brick_wall nether_brick_wall polished_blackstone_brick_wall polished_blackstone_wall polished_deepslate_wall prismarine_wall red_nether_brick_wall red_sandstone_wall sandstone_wall stone_brick_wall \