diff --git a/Cargo.lock b/Cargo.lock index de469e26d3..fbc4a70454 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4800,6 +4800,7 @@ dependencies = [ "directories-next", "dispatch 0.1.4", "dot_vox", + "enum-iterator", "euc", "failure", "gfx", diff --git a/assets/voxygen/voxel/sprite_manifest.ron b/assets/voxygen/voxel/sprite_manifest.ron new file mode 100644 index 0000000000..5f74236719 --- /dev/null +++ b/assets/voxygen/voxel/sprite_manifest.ron @@ -0,0 +1,1950 @@ +#![enable(unwrap_newtypes)] +( +// Non-sprites +Air: None, +Normal: None, +Dense: None, +Rock: None, +Leaves: None, +Water: None, + +// Windows +Window1: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.window.window-0", + offset: (-5.5, -5.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), +Window2: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.window.window-1", + offset: (-5.5, -5.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), +Window3: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.window.window-2", + offset: (-5.5, -5.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), +Window4: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.window.window-3", + offset: (-5.5, -5.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + +// Cacti +LargeCactus: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.cacti.large_cactus", + offset: (-13.5, -5.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.cacti.tall", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), +BarrelCactus: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.cacti.barrel_cactus", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), +RoundCactus: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.cacti.cactus_round", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), +ShortCactus: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.cacti.cactus_short", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), +MedFlatCactus: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.cacti.flat_cactus_med", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), +ShortFlatCactus: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.cacti.flat_cactus_short", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + +// Flowers +BlueFlower: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.flowers.flower_blue_1", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.flowers.flower_blue_2", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.flowers.flower_blue_3", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.flowers.flower_blue_4", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.flowers.flower_blue_5", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.flowers.flower_blue_6", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.flowers.flower_blue_7", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.flowers.flower_blue-8", + offset: (-5.5, -4.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.flowers.flower_blue-9", + offset: (-4.0, -3.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.flowers.flower_blue-10", + offset: (-1.5, -1.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.1, +)), +PinkFlower: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.flowers.flower_pink_1", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.flowers.flower_pink_2", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.flowers.flower_pink_3", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.flowers.flower_pink_4", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.1, +)), +PurpleFlower: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.flowers.flower_purple_1", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.flowers.flower_purple-2", + offset: (-5.0, -2.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.flowers.flower_purple-3", + offset: (-3.5, -2.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.flowers.flower_purple-4", + offset: (-5.0, -4.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.flowers.flower_purple-5", + offset: (-2.5, -2.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.flowers.flower_purple-6", + offset: (-4.5, -4.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.flowers.flower_purple-7", + offset: (-5.5, -5.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.flowers.flower_purple-8", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.1, +)), +RedFlower: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.flowers.flower_red_1", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.flowers.flower_red_2", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.flowers.flower_red_3", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.flowers.flower_red-4", + offset: (-6.5, -6.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.flowers.flower_red-5", + offset: (-3.5, -3.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.1, +)), +WhiteFlower: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.flowers.flower_white_1", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.flowers.flower_white_2", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.flowers.flower_white-3", + offset: (-1.5, -1.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.flowers.flower_white-4", + offset: (-5.0, -4.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.flowers.flower_white-5", + offset: (-5.5, -5.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.1, +)), +YellowFlower: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.flowers.flower_yellow-1", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.flowers.flower_yellow-0", + offset: (-5.5, -5.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.1, +)), +Sunflower: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.flowers.sunflower_1", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.flowers.sunflower_2", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.1, +)), + + +// Grass +LongGrass: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.grass.grass_long_1", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.grass.grass_long_2", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.grass.grass_long_3", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.grass.grass_long_4", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.grass.grass_long_5", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.grass.grass_long_6", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.grass.grass_long_7", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.8, +)), +MediumGrass: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.grass.grass_med_1", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.grass.grass_med_2", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.grass.grass_med_3", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.grass.grass_med_4", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.grass.grass_med_5", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.5, +)), +ShortGrass: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.grass.grass_short_1", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.grass.grass_short_2", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.grass.grass_short_3", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.grass.grass_short_4", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.grass.grass_short_5", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.1, +)), +LargeGrass: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.grass.grass_large-0", + offset: (-2.0, -2.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.grass.grass_large-1", + offset: (-5.5, -5.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.grass.grass_large-2", + offset: (-5.5, -5.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.5, +)), + +// Fruit +Apple: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.fruit.apple", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + +// Mushrooms +Mushroom: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.mushrooms.mushroom-0", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.mushrooms.mushroom-1", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.mushrooms.mushroom-2", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.mushrooms.mushroom-3", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.mushrooms.mushroom-4", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.mushrooms.mushroom-5", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.mushrooms.mushroom-6", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.mushrooms.mushroom-7", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.mushrooms.mushroom-8", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.mushrooms.mushroom-9", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.mushrooms.mushroom-10", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.mushrooms.mushroom-11", + offset: (-8.0, -8.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.mushrooms.mushroom-12", + offset: (-5.0, -5.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.mushrooms.mushroom-13", + offset: (-5.5, -5.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.mushrooms.mushroom-14", + offset: (-2.5, -2.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.mushrooms.mushroom-15", + offset: (-1.5, -1.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.mushrooms.mushroom-16", + offset: (-5.5, -5.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + +// Lianas, +Liana: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.lianas.liana-0", + offset: (-1.5, -0.5, -88.0), + lod_axes: (0.0, 0.0, 0.5), + ), + ( + model: "voxygen.voxel.sprite.lianas.liana-1", + offset: (-1.0, -0.5, -55.0), + lod_axes: (0.0, 0.0, 0.5), + ), + ], + wind_sway: 0.05, +)), + +// Velorite +Velorite: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.velorite.velorite_ore", + offset: (-5.0, -5.0, -5.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), +VeloriteFrag: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.velorite.velorite_1", + offset: (-3.0, -5.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.velorite.velorite_2", + offset: (-3.0, -5.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.velorite.velorite_3", + offset: (-3.0, -5.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.velorite.velorite_4", + offset: (-3.0, -5.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.velorite.velorite_5", + offset: (-3.0, -5.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.velorite.velorite_6", + offset: (-3.0, -5.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.velorite.velorite_7", + offset: (-3.0, -5.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.velorite.velorite_8", + offset: (-3.0, -5.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.velorite.velorite_9", + offset: (-3.0, -5.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.velorite.velorite_10", + offset: (-3.0, -5.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + +// Chests +Chest: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.chests.chest", + offset: (-7.0, -5.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.chests.chest_gold", + offset: (-7.0, -5.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.chests.chest_dark", + offset: (-7.0, -5.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.chests.chest_vines", + offset: (-7.0, -5.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + +// Welwitch +Welwitch: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.welwitch.1", + offset: (-15.0, -17.0, -0.0), + lod_axes: (0.0, 0.0, 0.7), + ), + ], + wind_sway: 0.1, +)), + +// Pumpkins +Pumpkin: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.pumpkin.1", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.pumpkin.2", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.pumpkin.3", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.pumpkin.4", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.pumpkin.5", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.pumpkin.6", + offset: (-7.0, -6.5, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.pumpkin.7", + offset: (-7.0, -9.5, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + +// Lingonberries +LingonBerry: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.lingonberry.1", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.lingonberry.2", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.lingonberry.3", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + +// Leafy Plants +LeafyPlant: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.leafy_plant.1", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.leafy_plant.2", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.leafy_plant.3", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.leafy_plant.4", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.leafy_plant.5", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.leafy_plant.6", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.leafy_plant.7", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.leafy_plant.8", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.leafy_plant.9", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.leafy_plant.10", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.4, +)), + +// Ferns +Fern: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.ferns.1", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.ferns.2", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.ferns.3", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.ferns.4", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.ferns.5", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.ferns.6", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.ferns.7", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.ferns.8", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.ferns.9", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.ferns.10", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.ferns.11", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.ferns.12", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.ferns.fern-0", + offset: (-6.5, -11.5, 0.0), + lod_axes: (0.0, 0.0, 1.0), + ), + ], + wind_sway: 0.4, +)), + +// Dead Bush +DeadBush: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.dead_bush.1", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.dead_bush.2", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.dead_bush.3", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.dead_bush.4", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.1, +)), + +// Blueberries +// NOTE: Why are these commented out? +Blueberry: None/* ( + variations: [ + ( + model: "voxygen.voxel.sprite.blueberry.1", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.blueberry.2", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.blueberry.3", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.blueberry.4", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.blueberry.5", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.blueberry.6", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.blueberry.7", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.blueberry.8", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.blueberry.9", + offset: (-6.0, -6.0, -0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)*/, + +// Ember +Ember: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.ember.1", + offset: (-7.0, -7.0, -2.9), + lod_axes: (1.0, 1.0, 0.0), + ), + ], + wind_sway: 0.8, +)), + +// Corn +Corn: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.corn.corn-0", + offset: (-6.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.7), + ), + ( + model: "voxygen.voxel.sprite.corn.corn-1", + offset: (-6.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.7), + ), + ( + model: "voxygen.voxel.sprite.corn.corn-2", + offset: (-6.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.7), + ), + ( + model: "voxygen.voxel.sprite.corn.corn-3", + offset: (-6.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.7), + ), + ( + model: "voxygen.voxel.sprite.corn.corn-4", + offset: (-6.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.7), + ), + ( + model: "voxygen.voxel.sprite.corn.corn-5", + offset: (-6.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.7), + ), + ], + wind_sway: 0.4, +)), + +// Yellow Wheat +WheatYellow: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.wheat_yellow.wheat-0", + offset: (-6.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.7), + ), + ( + model: "voxygen.voxel.sprite.wheat_yellow.wheat-1", + offset: (-6.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.7), + ), + ( + model: "voxygen.voxel.sprite.wheat_yellow.wheat-2", + offset: (-6.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.7), + ), + ( + model: "voxygen.voxel.sprite.wheat_yellow.wheat-3", + offset: (-6.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.7), + ), + ( + model: "voxygen.voxel.sprite.wheat_yellow.wheat-4", + offset: (-6.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.7), + ), + ( + model: "voxygen.voxel.sprite.wheat_yellow.wheat-5", + offset: (-6.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.7), + ), + ( + model: "voxygen.voxel.sprite.wheat_yellow.wheat-6", + offset: (-6.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.7), + ), + ( + model: "voxygen.voxel.sprite.wheat_yellow.wheat-7", + offset: (-6.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.7), + ), + ( + model: "voxygen.voxel.sprite.wheat_yellow.wheat-8", + offset: (-6.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.7), + ), + ( + model: "voxygen.voxel.sprite.wheat_yellow.wheat-9", + offset: (-6.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.7), + ), + ], + wind_sway: 0.4, +)), + +// Green Wheat +WheatGreen: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.wheat_green.wheat-0", + offset: (-6.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.7), + ), + ( + model: "voxygen.voxel.sprite.wheat_green.wheat-1", + offset: (-6.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.7), + ), + ( + model: "voxygen.voxel.sprite.wheat_green.wheat-2", + offset: (-6.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.7), + ), + ( + model: "voxygen.voxel.sprite.wheat_green.wheat-3", + offset: (-6.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.7), + ), + ( + model: "voxygen.voxel.sprite.wheat_green.wheat-4", + offset: (-6.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.7), + ), + ( + model: "voxygen.voxel.sprite.wheat_green.wheat-5", + offset: (-6.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.7), + ), + ( + model: "voxygen.voxel.sprite.wheat_green.wheat-6", + offset: (-6.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.7), + ), + ( + model: "voxygen.voxel.sprite.wheat_green.wheat-7", + offset: (-6.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.7), + ), + ( + model: "voxygen.voxel.sprite.wheat_green.wheat-8", + offset: (-6.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.7), + ), + ( + model: "voxygen.voxel.sprite.wheat_green.wheat-9", + offset: (-6.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.7), + ), + ], + wind_sway: 0.4, +)), + +// Cabbage +Cabbage: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.cabbage.cabbage-0", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.cabbage.cabbage-1", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.cabbage.cabbage-2", + offset: (-6.0, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + +// Flax +Flax: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.flax.flax-0", + offset: (-6.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.7), + ), + ( + model: "voxygen.voxel.sprite.flax.flax-1", + offset: (-6.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.7), + ), + ( + model: "voxygen.voxel.sprite.flax.flax-2", + offset: (-6.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.7), + ), + ( + model: "voxygen.voxel.sprite.flax.flax-3", + offset: (-6.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.7), + ), + ( + model: "voxygen.voxel.sprite.flax.flax-4", + offset: (-6.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.7), + ), + ( + model: "voxygen.voxel.sprite.flax.flax-5", + offset: (-6.0, -6.0, 0.0), + lod_axes: (0.0, 0.0, 0.7), + ), + ], + wind_sway: 0.4, +)), + +// Carrot +Carrot: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.carrot.0", + offset: (-5.5, -5.5, -0.25), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.carrot.1", + offset: (-5.5, -5.5, -0.25), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.carrot.2", + offset: (-5.5, -5.5, -0.25), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.carrot.3", + offset: (-5.5, -5.5, -0.25), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.carrot.4", + offset: (-5.5, -5.5, -0.25), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.carrot.5", + offset: (-5.5, -5.5, -0.25), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.1, +)), + +// Tomato +Tomato: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.tomato.0", + offset: (-5.5, -5.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.tomato.1", + offset: (-5.5, -5.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.tomato.2", + offset: (-5.5, -5.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.tomato.3", + offset: (-5.5, -5.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.tomato.4", + offset: (-5.5, -5.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + +// Radish +Radish: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.radish.0", + offset: (-5.5, -5.5, -0.25), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.radish.1", + offset: (-5.5, -5.5, -0.25), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.radish.2", + offset: (-5.5, -5.5, -0.25), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.radish.3", + offset: (-5.5, -5.5, -0.25), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.radish.4", + offset: (-5.5, -5.5, -0.25), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.1, +)), + +// Turnip +Turnip: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.turnip.turnip-0", + offset: (-5.5, -5.5, -0.25), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.turnip.turnip-1", + offset: (-5.5, -5.5, -0.25), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.turnip.turnip-2", + offset: (-5.5, -5.5, -0.25), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.turnip.turnip-3", + offset: (-5.5, -5.5, -0.25), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.turnip.turnip-4", + offset: (-5.5, -5.5, -0.25), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.turnip.turnip-5", + offset: (-5.5, -5.5, -0.25), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.1, +)), + +// Coconut +Coconut: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.fruit.coconut", + offset: (-6.0, -6.0, 2.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + +// Scarecrow +Scarecrow: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.misc.scarecrow", + offset: (-9.5, -3.0, -0.25), + lod_axes: (0.0, 0.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + +// Street Light +StreetLamp: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.misc.street_lamp", + offset: (-4.5, -4.5, 0.0), + lod_axes: (0.0, 0.0, 1.0), + ), + ], + wind_sway: 0.0, +)), +StreetLampTall: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.furniture.street_lamp-0", + offset: (-10.5, -10.5, 0.0), + lod_axes: (0.0, 0.0, 1.0), + ), + + ], + wind_sway: 0.0, +)), + +// Door +Door: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.door.door-0", + offset: (-5.5, -5.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + +// Bed +Bed: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.furniture.bed-0", + offset: (-9.5, -14.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + +// Bench +Bench: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.furniture.bench-0", + offset: (-14.0, -4.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + +// Chair +ChairSingle: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.furniture.chair_single-0", + offset: (-5.5, -4.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.furniture.chair_single-1", + offset: (-5.5, -4.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), +ChairDouble: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.furniture.chair_double-0", + offset: (-9.5, -4.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.furniture.chair_double-1", + offset: (-9.5, -4.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + +// CoatRack +CoatRack: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.furniture.coatrack-0", + offset: (-6.5, -6.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.furniture.coatrack-1", + offset: (-6.5, -6.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + +// Crate +Crate: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.furniture.crate-0", + offset: (-5.5, -5.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.furniture.crate-1", + offset: (-5.5, -5.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.furniture.crate-2", + offset: (-3.0, -3.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.furniture.crate-3", + offset: (-6.0, -3.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.furniture.crate-4", + offset: (-6.0, -3.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.furniture.crate-5", + offset: (-5.5, -3.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.furniture.crate-6", + offset: (-4.5, -3.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + +// DrawerLarge +DrawerLarge: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.furniture.drawer_large-0", + offset: (-11.5, -5.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.furniture.drawer_large-1", + offset: (-11.5, -5.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + +// DrawerMedium +DrawerMedium: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.furniture.drawer_medium-0", + offset: (-11.0, -5.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.furniture.drawer_medium-1", + offset: (-11.0, -5.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + +// DrawerSmall +DrawerSmall: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.furniture.drawer_small-0", + offset: (-5.5, -5.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.furniture.drawer_small-1", + offset: (-5.5, -5.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + +// DungeonWallDecor +DungeonWallDecor: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.furniture.dungeon_wall-0", + offset: (-5.5, -1.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.furniture.dungeon_wall-1", + offset: (-5.5, -5.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.furniture.dungeon_wall-2", + offset: (-5.5, -3.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.furniture.dungeon_wall-3", + offset: (-1.5, -3.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.furniture.dungeon_wall-4", + offset: (-5.5, -4.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.furniture.dungeon_wall-5", + offset: (-5.5, -0.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.furniture.dungeon_wall-6", + offset: (-5.5, -1.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.furniture.dungeon_wall-7", + offset: (-5.5, -1.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.furniture.dungeon_wall-8", + offset: (-5.5, -1.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.furniture.dungeon_wall-9", + offset: (-1.5, -5.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + +// HangingBasket +HangingBasket: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.furniture.hanging_basket-0", + offset: (-6.5, -4.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.furniture.hanging_basket-1", + offset: (-9.5, -5.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + +// HangingSign +HangingSign: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.furniture.hanging_sign-0", + offset: (-3.5, -16.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + +// WallLamp +WallLamp: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.furniture.lamp_wall-0", + offset: (-6.5, -3.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.furniture.lamp_wall-1", + offset: (-10.5, -9.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + +// Planter +Planter: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.furniture.planter-0", + offset: (-6.0, -3.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.furniture.planter-1", + offset: (-13.0, -3.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.furniture.planter-2", + offset: (-6.0, -3.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.furniture.planter-3", + offset: (-6.0, -3.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.furniture.planter-4", + offset: (-6.0, -3.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.furniture.planter-5", + offset: (-6.0, -3.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.furniture.planter-6", + offset: (-7.5, -3.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + +// Shelf +Shelf: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.furniture.shelf-0", + offset: (-14.5, -3.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.furniture.shelf-1", + offset: (-13.5, -3.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + +// TableSide +TableSide: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.furniture.table_side-0", + offset: (-5.5, -5.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.furniture.table_side-1", + offset: (-5.5, -5.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + +// TableDining +TableDining: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.furniture.table_dining-0", + offset: (-8.5, -8.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.furniture.table_dining-1", + offset: (-8.5, -8.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + +// TableDouble +TableDouble: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.furniture.table_double-0", + offset: (-18.5, -11.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + + ], + wind_sway: 0.0, +)), + +// WardrobeDouble +WardrobeDouble: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.furniture.wardrobe_double-0", + offset: (-10.5, -6.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.furniture.wardrobe_double-1", + offset: (-10.5, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + +// WardrobeSingle +WardrobeSingle: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.furniture.wardrobe_single-0", + offset: (-5.5, -6.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.furniture.wardrobe_single-1", + offset: (-5.5, -6.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + + +// Pot +Pot: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.furniture.pot-0", + offset: (-3.5, -3.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.furniture.pot-1", + offset: (-5.5, -5.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + +// Stones +Stones: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.rocks.rock-0", + offset: (-3.0, -3.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.rocks.rock-1", + offset: (-4.5, -5.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.rocks.rock-2", + offset: (-4.5, -4.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + +// Twigs +Twigs: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.twigs.twigs-0", + offset: (-3.5, -3.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.twigs.twigs-1", + offset: (-2.0, -1.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.twigs.twigs-2", + offset: (-4.0, -4.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + +// Shiny Gems +ShinyGem: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.gem.gem_blue", + offset: (-2.0, -3.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.gem.gem_green", + offset: (-2.0, -3.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.gem.gem_red", + offset: (-3.0, -2.0, -2.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + +// Drop Gate Parts +DropGate: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.castle.drop_gate_bars-0", + offset: (-5.5, -5.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), +DropGateBottom: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.castle.drop_gate_bottom-0", + offset: (-5.5, -5.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), + +// Snow covered Grass +GrassSnow: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.grass.grass_snow_0", + offset: (-2.5, -2.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.grass.grass_snow_1", + offset: (-2.5, -2.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.grass.grass_snow_2", + offset: (-2.5, -2.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.grass.grass_snow_3", + offset: (-2.5, -2.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.grass.grass_snow_4", + offset: (-2.5, -2.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.grass.grass_snow_5", + offset: (-2.5, -2.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.grass.grass_snow_6", + offset: (-2.5, -2.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.grass.grass_snow_7", + offset: (-2.5, -2.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.grass.grass_snow_8", + offset: (-2.5, -2.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ( + model: "voxygen.voxel.sprite.grass.grass_snow_9", + offset: (-2.5, -2.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.2, +)), +) diff --git a/common/src/terrain/block.rs b/common/src/terrain/block.rs index 5d7df5cc32..790aa3ab81 100644 --- a/common/src/terrain/block.rs +++ b/common/src/terrain/block.rs @@ -1,97 +1,100 @@ -use crate::vol::Vox; +use crate::{make_case_elim, vol::Vox}; use enum_iterator::IntoEnumIterator; use lazy_static::lazy_static; use serde::{Deserialize, Serialize}; use std::{collections::HashMap, convert::TryFrom, fmt, ops::Deref}; use vek::*; -#[derive(Copy, Clone, Debug, Hash, Eq, PartialEq, Serialize, Deserialize, IntoEnumIterator)] -#[repr(u8)] -pub enum BlockKind { - Air, - Normal, - Dense, - Rock, - Grass, - Leaves, - Water, - LargeCactus, - BarrelCactus, - RoundCactus, - ShortCactus, - MedFlatCactus, - ShortFlatCactus, - BlueFlower, - PinkFlower, - PurpleFlower, - RedFlower, - WhiteFlower, - YellowFlower, - Sunflower, - LongGrass, - MediumGrass, - ShortGrass, - Apple, - Mushroom, - Liana, - Velorite, - VeloriteFrag, - Chest, - Pumpkin, - Welwitch, - LingonBerry, - LeafyPlant, - Fern, - DeadBush, - Blueberry, - Ember, - Corn, - WheatYellow, - WheatGreen, - Cabbage, - Flax, - Carrot, - Tomato, - Radish, - Coconut, - Turnip, - Window1, - Window2, - Window3, - Window4, - Scarecrow, - StreetLamp, - StreetLampTall, - Door, - Bed, - Bench, - ChairSingle, - ChairDouble, - CoatRack, - Crate, - DrawerLarge, - DrawerMedium, - DrawerSmall, - DungeonWallDecor, - HangingBasket, - HangingSign, - WallLamp, - Planter, - Shelf, - TableSide, - TableDining, - TableDouble, - WardrobeSingle, - WardrobeDouble, - LargeGrass, - Pot, - Stones, - Twigs, - ShinyGem, - DropGate, - DropGateBottom, - GrassSnow, -} +make_case_elim!( + block_kind, + #[derive(Copy, Clone, Debug, Hash, Eq, PartialEq, Serialize, Deserialize, IntoEnumIterator)] + #[repr(u8)] + pub enum BlockKind { + Air = 0x00, + Normal = 0x01, + Dense = 0x02, + Rock = 0x03, + Grass = 0x04, + Leaves = 0x05, + Water = 0x06, + LargeCactus = 0x07, + BarrelCactus = 0x08, + RoundCactus = 0x09, + ShortCactus = 0x0A, + MedFlatCactus = 0x0B, + ShortFlatCactus = 0x0C, + BlueFlower = 0x0D, + PinkFlower = 0x0E, + PurpleFlower = 0x0F, + RedFlower = 0x10, + WhiteFlower = 0x11, + YellowFlower = 0x12, + Sunflower = 0x13, + LongGrass = 0x14, + MediumGrass = 0x15, + ShortGrass = 0x16, + Apple = 0x17, + Mushroom = 0x18, + Liana = 0x19, + Velorite = 0x1A, + VeloriteFrag = 0x1B, + Chest = 0x1C, + Pumpkin = 0x1D, + Welwitch = 0x1E, + LingonBerry = 0x1F, + LeafyPlant = 0x20, + Fern = 0x21, + DeadBush = 0x22, + Blueberry = 0x23, + Ember = 0x24, + Corn = 0x25, + WheatYellow = 0x26, + WheatGreen = 0x27, + Cabbage = 0x28, + Flax = 0x29, + Carrot = 0x2A, + Tomato = 0x2B, + Radish = 0x2C, + Coconut = 0x2D, + Turnip = 0x2E, + Window1 = 0x2F, + Window2 = 0x30, + Window3 = 0x31, + Window4 = 0x32, + Scarecrow = 0x33, + StreetLamp = 0x34, + StreetLampTall = 0x35, + Door = 0x36, + Bed = 0x37, + Bench = 0x38, + ChairSingle = 0x39, + ChairDouble = 0x3A, + CoatRack = 0x3B, + Crate = 0x3C, + DrawerLarge = 0x3D, + DrawerMedium = 0x3E, + DrawerSmall = 0x3F, + DungeonWallDecor = 0x40, + HangingBasket = 0x41, + HangingSign = 0x42, + WallLamp = 0x43, + Planter = 0x44, + Shelf = 0x45, + TableSide = 0x46, + TableDining = 0x47, + TableDouble = 0x48, + WardrobeSingle = 0x49, + WardrobeDouble = 0x4A, + LargeGrass = 0x4B, + Pot = 0x4C, + Stones = 0x4D, + Twigs = 0x4E, + ShinyGem = 0x4F, + DropGate = 0x50, + DropGateBottom = 0x51, + GrassSnow = 0x52, + } +); impl fmt::Display for BlockKind { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{:?}", self) } diff --git a/common/src/typed.rs b/common/src/typed.rs index dda903a180..671ab2e565 100644 --- a/common/src/typed.rs +++ b/common/src/typed.rs @@ -198,10 +198,10 @@ macro_rules! make_case_elim { } #[allow(unused_parens)] - impl<'a, Elim: $mod::PackedElim, Context, Type, S> - $crate::typed::Typed for $crate::typed::ElimCase<&'a $ty, &'a $mod::Cases, Type> + impl<'a, 'b, Elim: $mod::PackedElim, Context, Type, S> + $crate::typed::Typed for $crate::typed::ElimCase<&'a $ty, &'b $mod::Cases, Type> where - $( &'a Elim::$constr: $crate::typed::Typed<($( ($( &'a $arg_ty, )*), )? Context), Type, S>, )* + $( &'b Elim::$constr: $crate::typed::Typed<($( ($( &'a $arg_ty, )*), )? Context), Type, S>, )* { fn reduce(self, context: Context) -> (Type, S) { @@ -218,10 +218,10 @@ macro_rules! make_case_elim { } impl $ty { - pub fn elim_case<'a, Elim: $mod::PackedElim, Context, S, Type>(&'a self, cases: &'a $mod::Cases, context: Context) -> + pub fn elim_case<'a, 'b, Elim: $mod::PackedElim, Context, S, Type>(&'a self, cases: &'b $mod::Cases, context: Context) -> (Type, S) where - $crate::typed::ElimCase<&'a $ty, &'a $mod::Cases, Type> : $crate::typed::Typed, + $crate::typed::ElimCase<&'a $ty, &'b $mod::Cases, Type> : $crate::typed::Typed, { use $crate::typed::Typed; @@ -233,7 +233,7 @@ macro_rules! make_case_elim { case.reduce(context) } - pub fn elim_case_pure<'a, Type>(&'a self, cases: &'a $mod::PureCases) -> &'a Type + pub fn elim_case_pure<'a, 'b, Type>(&'a self, cases: &'b $mod::PureCases) -> &'b Type { let ($crate::typed::Pure(expr), ()) = self.elim_case(cases, ()); expr diff --git a/voxygen/Cargo.toml b/voxygen/Cargo.toml index 459cd9657d..48094bdcb0 100644 --- a/voxygen/Cargo.toml +++ b/voxygen/Cargo.toml @@ -50,6 +50,7 @@ server = { package = "veloren-server", path = "../server", optional = true } glsl-include = "0.3.1" failure = "0.1.6" dot_vox = "4.0" +enum-iterator = "0.6" image = { version = "0.23.8", default-features = false, features = ["ico", "png"] } serde = "1.0" serde_derive = "1.0" diff --git a/voxygen/src/scene/terrain.rs b/voxygen/src/scene/terrain.rs index 35359a6d4d..04dccd9558 100644 --- a/voxygen/src/scene/terrain.rs +++ b/voxygen/src/scene/terrain.rs @@ -13,19 +13,21 @@ use crate::{ use super::{math, LodData, SceneData}; use common::{ - assets::Asset, + assets::{Asset, Ron}, figure::Segment, spiral::Spiral2d, - terrain::{Block, BlockKind, TerrainChunk}, + terrain::{block, Block, BlockKind, TerrainChunk}, vol::{BaseVol, ReadVol, RectRasterableVol, SampleVol, Vox}, volumes::vol_grid_2d::{VolGrid2d, VolGrid2dError}, }; use core::{f32, fmt::Debug, i32, marker::PhantomData, time::Duration}; use crossbeam::channel; use dot_vox::DotVoxData; +use enum_iterator::IntoEnumIterator; use guillotiere::AtlasAllocator; use hashbrown::HashMap; use image::DynamicImage; +use serde::Deserialize; use std::sync::Arc; use tracing::warn; use treeculler::{BVol, Frustum, AABB}; @@ -77,320 +79,37 @@ struct MeshWorkerResponse { blocks_of_interest: BlocksOfInterest, } -struct SpriteConfig { - variations: usize, - wind_sway: f32, // 1.0 is normal +#[derive(Deserialize)] +/// Configuration data for an individual sprite model. +struct SpriteModelConfig { + /// Data for the .vox model associated with this sprite. + model: Model, + /// Sprite model center (as an offset from 0 in the .vox file). + offset: (f32, f32, f32), + /// LOD axes (how LOD gets applied along each axis, when we switch + /// to an LOD model). + lod_axes: (f32, f32, f32), } -fn sprite_config_for(kind: BlockKind) -> Option { - match kind { - BlockKind::Window1 => Some(SpriteConfig { - variations: 1, - wind_sway: 0.0, - }), - BlockKind::Window2 => Some(SpriteConfig { - variations: 1, - wind_sway: 0.0, - }), - BlockKind::Window3 => Some(SpriteConfig { - variations: 1, - wind_sway: 0.0, - }), - BlockKind::Window4 => Some(SpriteConfig { - variations: 1, - wind_sway: 0.0, - }), - BlockKind::LargeCactus => Some(SpriteConfig { - variations: 2, - wind_sway: 0.0, - }), - BlockKind::BarrelCactus => Some(SpriteConfig { - variations: 1, - wind_sway: 0.0, - }), - BlockKind::RoundCactus => Some(SpriteConfig { - variations: 1, - wind_sway: 0.0, - }), - BlockKind::ShortCactus => Some(SpriteConfig { - variations: 1, - wind_sway: 0.0, - }), - BlockKind::MedFlatCactus => Some(SpriteConfig { - variations: 1, - wind_sway: 0.0, - }), - BlockKind::ShortFlatCactus => Some(SpriteConfig { - variations: 1, - wind_sway: 0.0, - }), - - BlockKind::BlueFlower => Some(SpriteConfig { - variations: 10, - wind_sway: 0.1, - }), - BlockKind::PinkFlower => Some(SpriteConfig { - variations: 4, - wind_sway: 0.1, - }), - BlockKind::PurpleFlower => Some(SpriteConfig { - variations: 8, - wind_sway: 0.1, - }), - BlockKind::RedFlower => Some(SpriteConfig { - variations: 5, - wind_sway: 0.1, - }), - BlockKind::WhiteFlower => Some(SpriteConfig { - variations: 5, - wind_sway: 0.1, - }), - BlockKind::YellowFlower => Some(SpriteConfig { - variations: 2, - wind_sway: 0.1, - }), - BlockKind::Sunflower => Some(SpriteConfig { - variations: 2, - wind_sway: 0.1, - }), - - BlockKind::LongGrass => Some(SpriteConfig { - variations: 7, - wind_sway: 0.8, - }), - BlockKind::MediumGrass => Some(SpriteConfig { - variations: 5, - wind_sway: 0.5, - }), - BlockKind::ShortGrass => Some(SpriteConfig { - variations: 5, - wind_sway: 0.1, - }), - BlockKind::LargeGrass => Some(SpriteConfig { - variations: 3, - wind_sway: 0.5, - }), - - BlockKind::Apple => Some(SpriteConfig { - variations: 1, - wind_sway: 0.0, - }), - BlockKind::Mushroom => Some(SpriteConfig { - variations: 17, - wind_sway: 0.0, - }), - BlockKind::Liana => Some(SpriteConfig { - variations: 2, - wind_sway: 0.05, - }), - BlockKind::Velorite => Some(SpriteConfig { - variations: 1, - wind_sway: 0.0, - }), - BlockKind::VeloriteFrag => Some(SpriteConfig { - variations: 10, - wind_sway: 0.0, - }), - BlockKind::Chest => Some(SpriteConfig { - variations: 4, - wind_sway: 0.0, - }), - BlockKind::Welwitch => Some(SpriteConfig { - variations: 1, - wind_sway: 0.1, - }), - BlockKind::Pumpkin => Some(SpriteConfig { - variations: 7, - wind_sway: 0.0, - }), - BlockKind::LingonBerry => Some(SpriteConfig { - variations: 3, - wind_sway: 0.0, - }), - BlockKind::LeafyPlant => Some(SpriteConfig { - variations: 10, - wind_sway: 0.4, - }), - BlockKind::Fern => Some(SpriteConfig { - variations: 13, - wind_sway: 0.4, - }), - BlockKind::DeadBush => Some(SpriteConfig { - variations: 4, - wind_sway: 0.1, - }), - BlockKind::Ember => Some(SpriteConfig { - variations: 1, - wind_sway: 0.8, - }), - BlockKind::Corn => Some(SpriteConfig { - variations: 6, - wind_sway: 0.4, - }), - BlockKind::WheatYellow => Some(SpriteConfig { - variations: 10, - wind_sway: 0.4, - }), - BlockKind::WheatGreen => Some(SpriteConfig { - variations: 10, - wind_sway: 0.4, - }), - BlockKind::Cabbage => Some(SpriteConfig { - variations: 3, - wind_sway: 0.0, - }), - BlockKind::Flax => Some(SpriteConfig { - variations: 6, - wind_sway: 0.4, - }), - BlockKind::Carrot => Some(SpriteConfig { - variations: 6, - wind_sway: 0.1, - }), - BlockKind::Tomato => Some(SpriteConfig { - variations: 5, - wind_sway: 0.0, - }), - BlockKind::Radish => Some(SpriteConfig { - variations: 5, - wind_sway: 0.1, - }), - BlockKind::Turnip => Some(SpriteConfig { - variations: 6, - wind_sway: 0.1, - }), - BlockKind::Coconut => Some(SpriteConfig { - variations: 1, - wind_sway: 0.0, - }), - BlockKind::Scarecrow => Some(SpriteConfig { - variations: 1, - wind_sway: 0.0, - }), - BlockKind::StreetLamp => Some(SpriteConfig { - variations: 1, - wind_sway: 0.0, - }), - BlockKind::StreetLampTall => Some(SpriteConfig { - variations: 1, - wind_sway: 0.0, - }), - BlockKind::Door => Some(SpriteConfig { - variations: 1, - wind_sway: 0.0, - }), - BlockKind::Bed => Some(SpriteConfig { - variations: 1, - wind_sway: 0.0, - }), - BlockKind::Bench => Some(SpriteConfig { - variations: 1, - wind_sway: 0.0, - }), - BlockKind::ChairSingle => Some(SpriteConfig { - variations: 2, - wind_sway: 0.0, - }), - BlockKind::ChairDouble => Some(SpriteConfig { - variations: 2, - wind_sway: 0.0, - }), - BlockKind::CoatRack => Some(SpriteConfig { - variations: 2, - wind_sway: 0.0, - }), - BlockKind::Crate => Some(SpriteConfig { - variations: 7, - wind_sway: 0.0, - }), - BlockKind::DrawerLarge => Some(SpriteConfig { - variations: 2, - wind_sway: 0.0, - }), - BlockKind::DrawerMedium => Some(SpriteConfig { - variations: 2, - wind_sway: 0.0, - }), - BlockKind::DrawerSmall => Some(SpriteConfig { - variations: 2, - wind_sway: 0.0, - }), - BlockKind::DungeonWallDecor => Some(SpriteConfig { - variations: 10, - wind_sway: 0.0, - }), - BlockKind::HangingBasket => Some(SpriteConfig { - variations: 2, - wind_sway: 0.0, - }), - BlockKind::HangingSign => Some(SpriteConfig { - variations: 1, - wind_sway: 0.0, - }), - BlockKind::WallLamp => Some(SpriteConfig { - variations: 2, - wind_sway: 0.0, - }), - BlockKind::Planter => Some(SpriteConfig { - variations: 7, - wind_sway: 0.0, - }), - BlockKind::Shelf => Some(SpriteConfig { - variations: 2, - wind_sway: 0.0, - }), - BlockKind::TableSide => Some(SpriteConfig { - variations: 2, - wind_sway: 0.0, - }), - BlockKind::TableDining => Some(SpriteConfig { - variations: 2, - wind_sway: 0.0, - }), - BlockKind::TableDouble => Some(SpriteConfig { - variations: 1, - wind_sway: 0.0, - }), - BlockKind::WardrobeDouble => Some(SpriteConfig { - variations: 2, - wind_sway: 0.0, - }), - BlockKind::WardrobeSingle => Some(SpriteConfig { - variations: 2, - wind_sway: 0.0, - }), - BlockKind::Pot => Some(SpriteConfig { - variations: 2, - wind_sway: 0.0, - }), - BlockKind::Stones => Some(SpriteConfig { - variations: 3, - wind_sway: 0.0, - }), - BlockKind::Twigs => Some(SpriteConfig { - variations: 3, - wind_sway: 0.0, - }), - BlockKind::ShinyGem => Some(SpriteConfig { - variations: 3, - wind_sway: 0.0, - }), - BlockKind::DropGate => Some(SpriteConfig { - variations: 1, - wind_sway: 0.0, - }), - BlockKind::DropGateBottom => Some(SpriteConfig { - variations: 1, - wind_sway: 0.0, - }), - BlockKind::GrassSnow => Some(SpriteConfig { - variations: 10, - wind_sway: 0.2, - }), - _ => None, - } +#[derive(Deserialize)] +/// Configuration data for a group of sprites (currently associated with a +/// particular BlockKind). +struct SpriteConfig { + /// All possible model variations for this sprite. + // NOTE: Could make constant per sprite type, but eliminating this indirection and + // allocation is probably not that important considering how sprites are used. + variations: Vec>, + /// The extent to which the sprite sways in the window. + /// + /// 0.0 is normal. + wind_sway: f32, } +/// Configuration data for all sprite models. +/// +/// NOTE: Model is an asset path to the appropriate sprite .vox model. +type SpriteSpec = block::block_kind::PureCases>>; + /// Function executed by worker threads dedicated to chunk meshing. #[allow(clippy::or_fun_call)] // TODO: Pending review in #587 @@ -403,6 +122,7 @@ fn mesh_worker + RectRasterableVol + ReadVol + Debug>( chunk: Arc, range: Aabb, sprite_data: &HashMap<(BlockKind, usize), Vec>, + sprite_config: &SpriteSpec, ) -> MeshWorkerResponse { let (opaque_mesh, fluid_mesh, _shadow_mesh, (bounds, col_lights_info)) = volume.generate_mesh((range, Vec2::new(max_texture_size, max_texture_size))); @@ -424,12 +144,12 @@ fn mesh_worker + RectRasterableVol + ReadVol + Debug>( let block = volume.get(wpos).ok().copied().unwrap_or(Block::empty()); - if let Some(cfg) = sprite_config_for(block.kind()) { + if let Some(cfg) = block.kind().elim_case_pure(&sprite_config) { let seed = wpos.x as u64 * 3 + wpos.y as u64 * 7 + wpos.x as u64 * wpos.y as u64; // Awful PRNG let ori = (block.get_ori().unwrap_or((seed % 4) as u8 * 2)) & 0b111; - let variation = seed as usize % cfg.variations; + let variation = seed as usize % cfg.variations.len(); let key = (block.kind(), variation); // NOTE: Safe because we called sprite_config_for already. // NOTE: Safe because 0 ≤ ori < 8 @@ -470,6 +190,7 @@ struct SpriteData { pub struct Terrain { atlas: AtlasAllocator, + sprite_config: Arc, chunks: HashMap, TerrainChunkData>, /// Temporary storage for dead chunks that might still be shadowing chunks /// in view. We wait until either the chunk definitely cannot be @@ -511,6 +232,10 @@ impl TerrainChunkData { impl Terrain { #[allow(clippy::float_cmp)] // TODO: Pending review in #587 pub fn new(renderer: &mut Renderer) -> Self { + // Load all the sprite config data. + let sprite_config = Ron::::load("voxygen.voxel.sprite_manifest") + .expect("Failed to find sprite model data!"); + // Create a new mpsc (Multiple Produced, Single Consumer) pair for communicating // with worker threads that are meshing chunks. let (send, recv) = channel::unbounded(); @@ -523,1876 +248,117 @@ impl Terrain { guillotiere::Size::new(i32::from(max_texture_size), i32::from(max_texture_size)); let mut greedy = GreedyMesh::new(max_size); let mut locals_buffer = [SpriteLocals::default(); 8]; + let sprite_config_ = &sprite_config; // NOTE: Tracks the start vertex of the next model to be meshed. - let mut make_models = |(kind, variation), s, offset, lod_axes: Vec3| { - let scaled = [1.0, 0.8, 0.6, 0.4, 0.2]; - let model = DotVoxData::load_expect(s); - let zero = Vec3::zero(); - let model_size = model - .models - .first() - .map( - |&dot_vox::Model { - size: dot_vox::Size { x, y, z }, - .. - }| Vec3::new(x, y, z), - ) - .unwrap_or(zero); - let max_model_size = Vec3::new(15.0, 15.0, 63.0); - let model_scale = max_model_size.map2(model_size, |max_sz: f32, cur_sz| { - let scale = max_sz / max_sz.max(cur_sz as f32); - if scale < 1.0 && (cur_sz as f32 * scale).ceil() > max_sz { - scale - 0.001 - } else { - scale - } - }); - let wind_sway = sprite_config_for(kind).map(|c| c.wind_sway).unwrap_or(0.0); - let sprite_mat: Mat4 = Mat4::translation_3d(offset).scaled_3d(SPRITE_SCALE); - ( - (kind, variation), - scaled - .iter() - .map(|&lod_scale_orig| { - let lod_scale = model_scale - * if lod_scale_orig == 1.0 { - Vec3::broadcast(1.0) - } else { - lod_axes * lod_scale_orig - + lod_axes.map(|e| if e == 0.0 { 1.0 } else { 0.0 }) - }; - // Mesh generation exclusively acts using side effects; it has no - // interesting return value, but updates the mesh. - let mut opaque_mesh = Mesh::new(); - Meshable::::generate_mesh( - Segment::from(model.as_ref()).scaled_by(lod_scale), - ( - &mut greedy, - &mut opaque_mesh, - wind_sway >= 0.4 && lod_scale_orig == 1.0, - ), - ); - let model = renderer - .create_model(&opaque_mesh) - .expect("Failed to upload sprite model data to the GPU!"); - let sprite_scale = Vec3::one() / lod_scale; - let sprite_mat: Mat4 = sprite_mat * Mat4::scaling_3d(sprite_scale); - locals_buffer - .iter_mut() - .enumerate() - .for_each(|(ori, locals)| { - let sprite_mat = - sprite_mat.rotated_z(f32::consts::PI * 0.25 * ori as f32); - *locals = - SpriteLocals::new(sprite_mat, sprite_scale, offset, wind_sway); - }); - - SpriteData { - /* vertex_range */ model, + let sprite_data: HashMap<(BlockKind, usize), _> = BlockKind::into_enum_iter() + .filter_map(|kind| Some((kind, kind.elim_case_pure(&sprite_config_).as_ref()?))) + .flat_map(|(kind, sprite_config)| { + let wind_sway = sprite_config.wind_sway; + sprite_config.variations.iter().enumerate().map( + move |( + variation, + SpriteModelConfig { + model, offset, - locals: renderer - .create_consts(&locals_buffer) - .expect("Failed to upload sprite locals to the GPU!"), - } - }) - .collect::>(), - ) - }; + lod_axes, + }, + )| { + let scaled = [1.0, 0.8, 0.6, 0.4, 0.2]; + let offset = Vec3::from(*offset); + let lod_axes = Vec3::from(*lod_axes); + let model = DotVoxData::load_expect(model); + let zero = Vec3::zero(); + let model_size = model + .models + .first() + .map( + |&dot_vox::Model { + size: dot_vox::Size { x, y, z }, + .. + }| Vec3::new(x, y, z), + ) + .unwrap_or(zero); + let max_model_size = Vec3::new(15.0, 15.0, 63.0); + let model_scale = max_model_size.map2(model_size, |max_sz: f32, cur_sz| { + let scale = max_sz / max_sz.max(cur_sz as f32); + if scale < 1.0 && (cur_sz as f32 * scale).ceil() > max_sz { + scale - 0.001 + } else { + scale + } + }); + let sprite_mat: Mat4 = + Mat4::translation_3d(offset).scaled_3d(SPRITE_SCALE); + move |greedy: &mut GreedyMesh, renderer: &mut Renderer| { + ( + (kind, variation), + scaled + .iter() + .map(|&lod_scale_orig| { + let lod_scale = model_scale + * if lod_scale_orig == 1.0 { + Vec3::broadcast(1.0) + } else { + lod_axes * lod_scale_orig + + lod_axes + .map(|e| if e == 0.0 { 1.0 } else { 0.0 }) + }; + // Mesh generation exclusively acts using side effects; it + // has no + // interesting return value, but updates the mesh. + let mut opaque_mesh = Mesh::new(); + Meshable::::generate_mesh( + Segment::from(model.as_ref()).scaled_by(lod_scale), + ( + greedy, + &mut opaque_mesh, + wind_sway >= 0.4 && lod_scale_orig == 1.0, + ), + ); + let model = renderer.create_model(&opaque_mesh).expect( + "Failed to upload sprite model data to the GPU!", + ); + + let sprite_scale = Vec3::one() / lod_scale; + let sprite_mat: Mat4 = + sprite_mat * Mat4::scaling_3d(sprite_scale); + locals_buffer.iter_mut().enumerate().for_each( + |(ori, locals)| { + let sprite_mat = sprite_mat + .rotated_z(f32::consts::PI * 0.25 * ori as f32); + *locals = SpriteLocals::new( + sprite_mat, + sprite_scale, + offset, + wind_sway, + ); + }, + ); + + SpriteData { + /* vertex_range */ model, + offset, + locals: renderer.create_consts(&locals_buffer).expect( + "Failed to upload sprite locals to the GPU!", + ), + } + }) + .collect::>(), + ) + } + }, + ) + }) + .map(|mut f| f(&mut greedy, renderer)) + .collect(); - let sprite_data: HashMap<(BlockKind, usize), _> = vec![ - // Windows - make_models( - (BlockKind::Window1, 0), - "voxygen.voxel.sprite.window.window-0", - Vec3::new(-5.5, -5.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Window2, 0), - "voxygen.voxel.sprite.window.window-1", - Vec3::new(-5.5, -5.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Window3, 0), - "voxygen.voxel.sprite.window.window-2", - Vec3::new(-5.5, -5.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Window4, 0), - "voxygen.voxel.sprite.window.window-3", - Vec3::new(-5.5, -5.5, 0.0), - Vec3::one(), - ), - // Cacti - make_models( - (BlockKind::LargeCactus, 0), - "voxygen.voxel.sprite.cacti.large_cactus", - Vec3::new(-13.5, -5.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::LargeCactus, 1), - "voxygen.voxel.sprite.cacti.tall", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::BarrelCactus, 0), - "voxygen.voxel.sprite.cacti.barrel_cactus", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::RoundCactus, 0), - "voxygen.voxel.sprite.cacti.cactus_round", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::ShortCactus, 0), - "voxygen.voxel.sprite.cacti.cactus_short", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::MedFlatCactus, 0), - "voxygen.voxel.sprite.cacti.flat_cactus_med", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::ShortFlatCactus, 0), - "voxygen.voxel.sprite.cacti.flat_cactus_short", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - // Fruit - make_models( - (BlockKind::Apple, 0), - "voxygen.voxel.sprite.fruit.apple", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - // Flowers - make_models( - (BlockKind::BlueFlower, 0), - "voxygen.voxel.sprite.flowers.flower_blue_1", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::BlueFlower, 1), - "voxygen.voxel.sprite.flowers.flower_blue_2", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::BlueFlower, 2), - "voxygen.voxel.sprite.flowers.flower_blue_3", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::BlueFlower, 3), - "voxygen.voxel.sprite.flowers.flower_blue_4", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::BlueFlower, 4), - "voxygen.voxel.sprite.flowers.flower_blue_5", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::BlueFlower, 5), - "voxygen.voxel.sprite.flowers.flower_blue_6", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::BlueFlower, 6), - "voxygen.voxel.sprite.flowers.flower_blue_7", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::BlueFlower, 7), - "voxygen.voxel.sprite.flowers.flower_blue-8", - Vec3::new(-5.5, -4.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::BlueFlower, 8), - "voxygen.voxel.sprite.flowers.flower_blue-9", - Vec3::new(-4.0, -3.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::BlueFlower, 9), - "voxygen.voxel.sprite.flowers.flower_blue-10", - Vec3::new(-1.5, -1.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::PinkFlower, 0), - "voxygen.voxel.sprite.flowers.flower_pink_1", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::PinkFlower, 1), - "voxygen.voxel.sprite.flowers.flower_pink_2", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::PinkFlower, 2), - "voxygen.voxel.sprite.flowers.flower_pink_3", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::PinkFlower, 3), - "voxygen.voxel.sprite.flowers.flower_pink_4", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::PurpleFlower, 0), - "voxygen.voxel.sprite.flowers.flower_purple_1", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::PurpleFlower, 1), - "voxygen.voxel.sprite.flowers.flower_purple-2", - Vec3::new(-5.0, -2.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::PurpleFlower, 2), - "voxygen.voxel.sprite.flowers.flower_purple-3", - Vec3::new(-3.5, -2.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::PurpleFlower, 3), - "voxygen.voxel.sprite.flowers.flower_purple-4", - Vec3::new(-5.0, -4.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::PurpleFlower, 4), - "voxygen.voxel.sprite.flowers.flower_purple-5", - Vec3::new(-2.5, -2.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::PurpleFlower, 5), - "voxygen.voxel.sprite.flowers.flower_purple-6", - Vec3::new(-4.5, -4.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::PurpleFlower, 6), - "voxygen.voxel.sprite.flowers.flower_purple-7", - Vec3::new(-5.5, -5.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::PurpleFlower, 7), - "voxygen.voxel.sprite.flowers.flower_purple-8", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::RedFlower, 0), - "voxygen.voxel.sprite.flowers.flower_red_1", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::RedFlower, 1), - "voxygen.voxel.sprite.flowers.flower_red_2", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::RedFlower, 2), - "voxygen.voxel.sprite.flowers.flower_red_3", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::RedFlower, 3), - "voxygen.voxel.sprite.flowers.flower_red-4", - Vec3::new(-6.5, -6.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::RedFlower, 4), - "voxygen.voxel.sprite.flowers.flower_red-5", - Vec3::new(-3.5, -3.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::WhiteFlower, 0), - "voxygen.voxel.sprite.flowers.flower_white_1", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::WhiteFlower, 1), - "voxygen.voxel.sprite.flowers.flower_white_2", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::WhiteFlower, 2), - "voxygen.voxel.sprite.flowers.flower_white-3", - Vec3::new(-1.5, -1.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::WhiteFlower, 3), - "voxygen.voxel.sprite.flowers.flower_white-4", - Vec3::new(-5.0, -4.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::WhiteFlower, 4), - "voxygen.voxel.sprite.flowers.flower_white-5", - Vec3::new(-5.5, -5.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::YellowFlower, 0), - "voxygen.voxel.sprite.flowers.flower_yellow-1", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::YellowFlower, 1), - "voxygen.voxel.sprite.flowers.flower_yellow-0", - Vec3::new(-5.5, -5.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Sunflower, 0), - "voxygen.voxel.sprite.flowers.sunflower_1", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Sunflower, 1), - "voxygen.voxel.sprite.flowers.sunflower_2", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - // Grass - make_models( - (BlockKind::LargeGrass, 0), - "voxygen.voxel.sprite.grass.grass_large-0", - Vec3::new(-2.0, -2.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::LargeGrass, 1), - "voxygen.voxel.sprite.grass.grass_large-1", - Vec3::new(-5.5, -5.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::LargeGrass, 2), - "voxygen.voxel.sprite.grass.grass_large-2", - Vec3::new(-5.5, -5.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::LongGrass, 0), - "voxygen.voxel.sprite.grass.grass_long_1", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::LongGrass, 1), - "voxygen.voxel.sprite.grass.grass_long_2", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::LongGrass, 2), - "voxygen.voxel.sprite.grass.grass_long_3", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::LongGrass, 3), - "voxygen.voxel.sprite.grass.grass_long_4", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::LongGrass, 4), - "voxygen.voxel.sprite.grass.grass_long_5", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::LongGrass, 5), - "voxygen.voxel.sprite.grass.grass_long_6", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::LongGrass, 6), - "voxygen.voxel.sprite.grass.grass_long_7", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::MediumGrass, 0), - "voxygen.voxel.sprite.grass.grass_med_1", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::MediumGrass, 1), - "voxygen.voxel.sprite.grass.grass_med_2", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::MediumGrass, 2), - "voxygen.voxel.sprite.grass.grass_med_3", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::MediumGrass, 3), - "voxygen.voxel.sprite.grass.grass_med_4", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::MediumGrass, 4), - "voxygen.voxel.sprite.grass.grass_med_5", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::ShortGrass, 0), - "voxygen.voxel.sprite.grass.grass_short_1", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::ShortGrass, 1), - "voxygen.voxel.sprite.grass.grass_short_2", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::ShortGrass, 2), - "voxygen.voxel.sprite.grass.grass_short_3", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::ShortGrass, 3), - "voxygen.voxel.sprite.grass.grass_short_4", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::ShortGrass, 4), - "voxygen.voxel.sprite.grass.grass_short_5", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Mushroom, 0), - "voxygen.voxel.sprite.mushrooms.mushroom-0", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Mushroom, 1), - "voxygen.voxel.sprite.mushrooms.mushroom-1", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Mushroom, 2), - "voxygen.voxel.sprite.mushrooms.mushroom-2", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Mushroom, 3), - "voxygen.voxel.sprite.mushrooms.mushroom-3", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Mushroom, 4), - "voxygen.voxel.sprite.mushrooms.mushroom-4", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Mushroom, 5), - "voxygen.voxel.sprite.mushrooms.mushroom-5", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Mushroom, 6), - "voxygen.voxel.sprite.mushrooms.mushroom-6", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Mushroom, 7), - "voxygen.voxel.sprite.mushrooms.mushroom-7", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Mushroom, 8), - "voxygen.voxel.sprite.mushrooms.mushroom-8", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Mushroom, 9), - "voxygen.voxel.sprite.mushrooms.mushroom-9", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Mushroom, 10), - "voxygen.voxel.sprite.mushrooms.mushroom-10", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Mushroom, 11), - "voxygen.voxel.sprite.mushrooms.mushroom-11", - Vec3::new(-8.0, -8.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Mushroom, 12), - "voxygen.voxel.sprite.mushrooms.mushroom-12", - Vec3::new(-5.0, -5.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Mushroom, 13), - "voxygen.voxel.sprite.mushrooms.mushroom-13", - Vec3::new(-5.5, -5.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Mushroom, 14), - "voxygen.voxel.sprite.mushrooms.mushroom-14", - Vec3::new(-2.5, -2.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Mushroom, 15), - "voxygen.voxel.sprite.mushrooms.mushroom-15", - Vec3::new(-1.5, -1.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Mushroom, 16), - "voxygen.voxel.sprite.mushrooms.mushroom-16", - Vec3::new(-5.5, -5.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Liana, 0), - "voxygen.voxel.sprite.lianas.liana-0", - Vec3::new(-1.5, -0.5, -88.0), - Vec3::unit_z() * 0.5, - ), - make_models( - (BlockKind::Liana, 1), - "voxygen.voxel.sprite.lianas.liana-1", - Vec3::new(-1.0, -0.5, -55.0), - Vec3::unit_z() * 0.5, - ), - make_models( - (BlockKind::Velorite, 0), - "voxygen.voxel.sprite.velorite.velorite_ore", - Vec3::new(-5.0, -5.0, -5.0), - Vec3::one(), - ), - make_models( - (BlockKind::VeloriteFrag, 0), - "voxygen.voxel.sprite.velorite.velorite_1", - Vec3::new(-3.0, -5.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::VeloriteFrag, 1), - "voxygen.voxel.sprite.velorite.velorite_2", - Vec3::new(-3.0, -5.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::VeloriteFrag, 2), - "voxygen.voxel.sprite.velorite.velorite_3", - Vec3::new(-3.0, -5.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::VeloriteFrag, 3), - "voxygen.voxel.sprite.velorite.velorite_4", - Vec3::new(-3.0, -5.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::VeloriteFrag, 4), - "voxygen.voxel.sprite.velorite.velorite_5", - Vec3::new(-3.0, -5.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::VeloriteFrag, 5), - "voxygen.voxel.sprite.velorite.velorite_6", - Vec3::new(-3.0, -5.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::VeloriteFrag, 6), - "voxygen.voxel.sprite.velorite.velorite_7", - Vec3::new(-3.0, -5.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::VeloriteFrag, 7), - "voxygen.voxel.sprite.velorite.velorite_8", - Vec3::new(-3.0, -5.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::VeloriteFrag, 8), - "voxygen.voxel.sprite.velorite.velorite_9", - Vec3::new(-3.0, -5.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::VeloriteFrag, 9), - "voxygen.voxel.sprite.velorite.velorite_10", - Vec3::new(-3.0, -5.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Chest, 0), - "voxygen.voxel.sprite.chests.chest", - Vec3::new(-7.0, -5.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Chest, 1), - "voxygen.voxel.sprite.chests.chest_gold", - Vec3::new(-7.0, -5.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Chest, 2), - "voxygen.voxel.sprite.chests.chest_dark", - Vec3::new(-7.0, -5.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Chest, 3), - "voxygen.voxel.sprite.chests.chest_vines", - Vec3::new(-7.0, -5.0, -0.0), - Vec3::one(), - ), - //Welwitch - make_models( - (BlockKind::Welwitch, 0), - "voxygen.voxel.sprite.welwitch.1", - Vec3::new(-15.0, -17.0, -0.0), - Vec3::unit_z() * 0.7, - ), - //Pumpkins - make_models( - (BlockKind::Pumpkin, 0), - "voxygen.voxel.sprite.pumpkin.1", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Pumpkin, 1), - "voxygen.voxel.sprite.pumpkin.2", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Pumpkin, 2), - "voxygen.voxel.sprite.pumpkin.3", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Pumpkin, 3), - "voxygen.voxel.sprite.pumpkin.4", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Pumpkin, 4), - "voxygen.voxel.sprite.pumpkin.5", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Pumpkin, 5), - "voxygen.voxel.sprite.pumpkin.6", - Vec3::new(-7.0, -6.5, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Pumpkin, 6), - "voxygen.voxel.sprite.pumpkin.7", - Vec3::new(-7.0, -9.5, -0.0), - Vec3::one(), - ), - //Lingonberries - make_models( - (BlockKind::LingonBerry, 0), - "voxygen.voxel.sprite.lingonberry.1", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::LingonBerry, 1), - "voxygen.voxel.sprite.lingonberry.2", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::LingonBerry, 2), - "voxygen.voxel.sprite.lingonberry.3", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - // Leafy Plants - make_models( - (BlockKind::LeafyPlant, 0), - "voxygen.voxel.sprite.leafy_plant.1", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::LeafyPlant, 1), - "voxygen.voxel.sprite.leafy_plant.2", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::LeafyPlant, 2), - "voxygen.voxel.sprite.leafy_plant.3", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::LeafyPlant, 3), - "voxygen.voxel.sprite.leafy_plant.4", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::LeafyPlant, 4), - "voxygen.voxel.sprite.leafy_plant.5", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::LeafyPlant, 5), - "voxygen.voxel.sprite.leafy_plant.6", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::LeafyPlant, 6), - "voxygen.voxel.sprite.leafy_plant.7", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::LeafyPlant, 7), - "voxygen.voxel.sprite.leafy_plant.8", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::LeafyPlant, 8), - "voxygen.voxel.sprite.leafy_plant.9", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::LeafyPlant, 9), - "voxygen.voxel.sprite.leafy_plant.10", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - // Ferns - make_models( - (BlockKind::Fern, 0), - "voxygen.voxel.sprite.ferns.1", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Fern, 1), - "voxygen.voxel.sprite.ferns.2", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Fern, 2), - "voxygen.voxel.sprite.ferns.3", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Fern, 3), - "voxygen.voxel.sprite.ferns.4", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Fern, 4), - "voxygen.voxel.sprite.ferns.5", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Fern, 5), - "voxygen.voxel.sprite.ferns.6", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Fern, 6), - "voxygen.voxel.sprite.ferns.7", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Fern, 7), - "voxygen.voxel.sprite.ferns.8", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Fern, 8), - "voxygen.voxel.sprite.ferns.9", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Fern, 9), - "voxygen.voxel.sprite.ferns.10", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Fern, 10), - "voxygen.voxel.sprite.ferns.11", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Fern, 11), - "voxygen.voxel.sprite.ferns.12", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Fern, 12), - "voxygen.voxel.sprite.ferns.fern-0", - Vec3::new(-6.5, -11.5, 0.0), - Vec3::unit_z(), - ), - // Dead Bush - make_models( - (BlockKind::DeadBush, 0), - "voxygen.voxel.sprite.dead_bush.1", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::DeadBush, 1), - "voxygen.voxel.sprite.dead_bush.2", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::DeadBush, 2), - "voxygen.voxel.sprite.dead_bush.3", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::DeadBush, 3), - "voxygen.voxel.sprite.dead_bush.4", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - // Blueberries - make_models( - (BlockKind::Blueberry, 0), - "voxygen.voxel.sprite.blueberry.1", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Blueberry, 1), - "voxygen.voxel.sprite.blueberry.2", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Blueberry, 2), - "voxygen.voxel.sprite.blueberry.3", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Blueberry, 3), - "voxygen.voxel.sprite.blueberry.4", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Blueberry, 4), - "voxygen.voxel.sprite.blueberry.5", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Blueberry, 5), - "voxygen.voxel.sprite.blueberry.6", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Blueberry, 6), - "voxygen.voxel.sprite.blueberry.7", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Blueberry, 7), - "voxygen.voxel.sprite.blueberry.8", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Blueberry, 8), - "voxygen.voxel.sprite.blueberry.9", - Vec3::new(-6.0, -6.0, -0.0), - Vec3::one(), - ), - // Ember - make_models( - (BlockKind::Ember, 0), - "voxygen.voxel.sprite.ember.1", - Vec3::new(-7.0, -7.0, -2.9), - Vec3::new(1.0, 1.0, 0.0), - ), - // Corn - make_models( - (BlockKind::Corn, 0), - "voxygen.voxel.sprite.corn.corn-0", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::unit_z() * 0.7, - ), - make_models( - (BlockKind::Corn, 1), - "voxygen.voxel.sprite.corn.corn-1", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::unit_z() * 0.7, - ), - make_models( - (BlockKind::Corn, 2), - "voxygen.voxel.sprite.corn.corn-2", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::unit_z() * 0.7, - ), - make_models( - (BlockKind::Corn, 3), - "voxygen.voxel.sprite.corn.corn-3", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::unit_z() * 0.7, - ), - make_models( - (BlockKind::Corn, 4), - "voxygen.voxel.sprite.corn.corn-4", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::unit_z() * 0.7, - ), - make_models( - (BlockKind::Corn, 5), - "voxygen.voxel.sprite.corn.corn-5", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::unit_z() * 0.7, - ), - // Yellow Wheat - make_models( - (BlockKind::WheatYellow, 0), - "voxygen.voxel.sprite.wheat_yellow.wheat-0", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::unit_z() * 0.7, - ), - make_models( - (BlockKind::WheatYellow, 1), - "voxygen.voxel.sprite.wheat_yellow.wheat-1", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::unit_z() * 0.7, - ), - make_models( - (BlockKind::WheatYellow, 2), - "voxygen.voxel.sprite.wheat_yellow.wheat-2", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::unit_z() * 0.7, - ), - make_models( - (BlockKind::WheatYellow, 3), - "voxygen.voxel.sprite.wheat_yellow.wheat-3", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::unit_z() * 0.7, - ), - make_models( - (BlockKind::WheatYellow, 4), - "voxygen.voxel.sprite.wheat_yellow.wheat-4", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::unit_z() * 0.7, - ), - make_models( - (BlockKind::WheatYellow, 5), - "voxygen.voxel.sprite.wheat_yellow.wheat-5", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::unit_z() * 0.7, - ), - make_models( - (BlockKind::WheatYellow, 6), - "voxygen.voxel.sprite.wheat_yellow.wheat-6", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::unit_z() * 0.7, - ), - make_models( - (BlockKind::WheatYellow, 7), - "voxygen.voxel.sprite.wheat_yellow.wheat-7", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::unit_z() * 0.7, - ), - make_models( - (BlockKind::WheatYellow, 8), - "voxygen.voxel.sprite.wheat_yellow.wheat-8", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::unit_z() * 0.7, - ), - make_models( - (BlockKind::WheatYellow, 9), - "voxygen.voxel.sprite.wheat_yellow.wheat-9", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::unit_z() * 0.7, - ), - // Green Wheat - make_models( - (BlockKind::WheatGreen, 0), - "voxygen.voxel.sprite.wheat_green.wheat-0", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::unit_z() * 0.7, - ), - make_models( - (BlockKind::WheatGreen, 1), - "voxygen.voxel.sprite.wheat_green.wheat-1", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::unit_z() * 0.7, - ), - make_models( - (BlockKind::WheatGreen, 2), - "voxygen.voxel.sprite.wheat_green.wheat-2", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::unit_z() * 0.7, - ), - make_models( - (BlockKind::WheatGreen, 3), - "voxygen.voxel.sprite.wheat_green.wheat-3", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::unit_z() * 0.7, - ), - make_models( - (BlockKind::WheatGreen, 4), - "voxygen.voxel.sprite.wheat_green.wheat-4", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::unit_z() * 0.7, - ), - make_models( - (BlockKind::WheatGreen, 5), - "voxygen.voxel.sprite.wheat_green.wheat-5", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::unit_z() * 0.7, - ), - make_models( - (BlockKind::WheatGreen, 6), - "voxygen.voxel.sprite.wheat_green.wheat-6", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::unit_z() * 0.7, - ), - make_models( - (BlockKind::WheatGreen, 7), - "voxygen.voxel.sprite.wheat_green.wheat-7", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::unit_z() * 0.7, - ), - make_models( - (BlockKind::WheatGreen, 8), - "voxygen.voxel.sprite.wheat_green.wheat-8", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::unit_z() * 0.7, - ), - make_models( - (BlockKind::WheatGreen, 9), - "voxygen.voxel.sprite.wheat_green.wheat-9", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::unit_z() * 0.7, - ), - // Cabbage - make_models( - (BlockKind::Cabbage, 0), - "voxygen.voxel.sprite.cabbage.cabbage-0", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Cabbage, 1), - "voxygen.voxel.sprite.cabbage.cabbage-1", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Cabbage, 2), - "voxygen.voxel.sprite.cabbage.cabbage-2", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::one(), - ), - // Flax - make_models( - (BlockKind::Flax, 0), - "voxygen.voxel.sprite.flax.flax-0", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::unit_z() * 0.7, - ), - make_models( - (BlockKind::Flax, 1), - "voxygen.voxel.sprite.flax.flax-1", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::unit_z() * 0.7, - ), - make_models( - (BlockKind::Flax, 2), - "voxygen.voxel.sprite.flax.flax-2", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::unit_z() * 0.7, - ), - make_models( - (BlockKind::Flax, 3), - "voxygen.voxel.sprite.flax.flax-3", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::unit_z() * 0.7, - ), - make_models( - (BlockKind::Flax, 4), - "voxygen.voxel.sprite.flax.flax-4", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::unit_z() * 0.7, - ), - make_models( - (BlockKind::Flax, 5), - "voxygen.voxel.sprite.flax.flax-5", - Vec3::new(-6.0, -6.0, 0.0), - Vec3::unit_z() * 0.7, - ), - // Carrot - make_models( - (BlockKind::Carrot, 0), - "voxygen.voxel.sprite.carrot.0", - Vec3::new(-5.5, -5.5, -0.25), - Vec3::one(), - ), - make_models( - (BlockKind::Carrot, 1), - "voxygen.voxel.sprite.carrot.1", - Vec3::new(-5.5, -5.5, -0.25), - Vec3::one(), - ), - make_models( - (BlockKind::Carrot, 2), - "voxygen.voxel.sprite.carrot.2", - Vec3::new(-5.5, -5.5, -0.25), - Vec3::one(), - ), - make_models( - (BlockKind::Carrot, 3), - "voxygen.voxel.sprite.carrot.3", - Vec3::new(-5.5, -5.5, -0.25), - Vec3::one(), - ), - make_models( - (BlockKind::Carrot, 4), - "voxygen.voxel.sprite.carrot.4", - Vec3::new(-5.5, -5.5, -0.25), - Vec3::one(), - ), - make_models( - (BlockKind::Carrot, 5), - "voxygen.voxel.sprite.carrot.5", - Vec3::new(-5.5, -5.5, -0.25), - Vec3::one(), - ), - make_models( - (BlockKind::Tomato, 0), - "voxygen.voxel.sprite.tomato.0", - Vec3::new(-5.5, -5.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Tomato, 1), - "voxygen.voxel.sprite.tomato.1", - Vec3::new(-5.5, -5.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Tomato, 2), - "voxygen.voxel.sprite.tomato.2", - Vec3::new(-5.5, -5.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Tomato, 3), - "voxygen.voxel.sprite.tomato.3", - Vec3::new(-5.5, -5.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Tomato, 4), - "voxygen.voxel.sprite.tomato.4", - Vec3::new(-5.5, -5.5, 0.0), - Vec3::one(), - ), - // Radish - make_models( - (BlockKind::Radish, 0), - "voxygen.voxel.sprite.radish.0", - Vec3::new(-5.5, -5.5, -0.25), - Vec3::one(), - ), - make_models( - (BlockKind::Radish, 1), - "voxygen.voxel.sprite.radish.1", - Vec3::new(-5.5, -5.5, -0.25), - Vec3::one(), - ), - make_models( - (BlockKind::Radish, 2), - "voxygen.voxel.sprite.radish.2", - Vec3::new(-5.5, -5.5, -0.25), - Vec3::one(), - ), - make_models( - (BlockKind::Radish, 3), - "voxygen.voxel.sprite.radish.3", - Vec3::new(-5.5, -5.5, -0.25), - Vec3::one(), - ), - make_models( - (BlockKind::Radish, 4), - "voxygen.voxel.sprite.radish.4", - Vec3::new(-5.5, -5.5, -0.25), - Vec3::one(), - ), - // Turnip - make_models( - (BlockKind::Turnip, 0), - "voxygen.voxel.sprite.turnip.turnip-0", - Vec3::new(-5.5, -5.5, -0.25), - Vec3::one(), - ), - make_models( - (BlockKind::Turnip, 1), - "voxygen.voxel.sprite.turnip.turnip-1", - Vec3::new(-5.5, -5.5, -0.25), - Vec3::one(), - ), - make_models( - (BlockKind::Turnip, 2), - "voxygen.voxel.sprite.turnip.turnip-2", - Vec3::new(-5.5, -5.5, -0.25), - Vec3::one(), - ), - make_models( - (BlockKind::Turnip, 3), - "voxygen.voxel.sprite.turnip.turnip-3", - Vec3::new(-5.5, -5.5, -0.25), - Vec3::one(), - ), - make_models( - (BlockKind::Turnip, 4), - "voxygen.voxel.sprite.turnip.turnip-4", - Vec3::new(-5.5, -5.5, -0.25), - Vec3::one(), - ), - make_models( - (BlockKind::Turnip, 5), - "voxygen.voxel.sprite.turnip.turnip-5", - Vec3::new(-5.5, -5.5, -0.25), - Vec3::one(), - ), - // Coconut - make_models( - (BlockKind::Coconut, 0), - "voxygen.voxel.sprite.fruit.coconut", - Vec3::new(-6.0, -6.0, 2.0), - Vec3::one(), - ), - // Scarecrow - make_models( - (BlockKind::Scarecrow, 0), - "voxygen.voxel.sprite.misc.scarecrow", - Vec3::new(-9.5, -3.0, -0.25), - Vec3::unit_z(), - ), - // Street Light - make_models( - (BlockKind::StreetLamp, 0), - "voxygen.voxel.sprite.misc.street_lamp", - Vec3::new(-4.5, -4.5, 0.0), - Vec3::unit_z(), - ), - make_models( - (BlockKind::StreetLampTall, 0), - "voxygen.voxel.sprite.furniture.street_lamp-0", - Vec3::new(-10.5, -10.5, 0.0), - Vec3::unit_z(), - ), - // Door - make_models( - (BlockKind::Door, 0), - "voxygen.voxel.sprite.door.door-0", - Vec3::new(-5.5, -5.5, 0.0), - Vec3::one(), - ), - // Bed - make_models( - (BlockKind::Bed, 0), - "voxygen.voxel.sprite.furniture.bed-0", - Vec3::new(-9.5, -14.5, 0.0), - Vec3::one(), - ), - // Bench - make_models( - (BlockKind::Bench, 0), - "voxygen.voxel.sprite.furniture.bench-0", - Vec3::new(-14.0, -4.0, 0.0), - Vec3::one(), - ), - // Chair - make_models( - (BlockKind::ChairSingle, 0), - "voxygen.voxel.sprite.furniture.chair_single-0", - Vec3::new(-5.5, -4.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::ChairSingle, 1), - "voxygen.voxel.sprite.furniture.chair_single-1", - Vec3::new(-5.5, -4.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::ChairDouble, 0), - "voxygen.voxel.sprite.furniture.chair_double-0", - Vec3::new(-9.5, -4.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::ChairDouble, 1), - "voxygen.voxel.sprite.furniture.chair_double-1", - Vec3::new(-9.5, -4.5, 0.0), - Vec3::one(), - ), - // CoatRack - make_models( - (BlockKind::CoatRack, 0), - "voxygen.voxel.sprite.furniture.coatrack-0", - Vec3::new(-6.5, -6.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::CoatRack, 1), - "voxygen.voxel.sprite.furniture.coatrack-1", - Vec3::new(-6.5, -6.5, 0.0), - Vec3::one(), - ), - // Crate - make_models( - (BlockKind::Crate, 0), - "voxygen.voxel.sprite.furniture.crate-0", - Vec3::new(-5.5, -5.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Crate, 1), - "voxygen.voxel.sprite.furniture.crate-1", - Vec3::new(-5.5, -5.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Crate, 2), - "voxygen.voxel.sprite.furniture.crate-2", - Vec3::new(-3.0, -3.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Crate, 3), - "voxygen.voxel.sprite.furniture.crate-3", - Vec3::new(-6.0, -3.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Crate, 4), - "voxygen.voxel.sprite.furniture.crate-4", - Vec3::new(-6.0, -3.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Crate, 5), - "voxygen.voxel.sprite.furniture.crate-5", - Vec3::new(-5.5, -3.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Crate, 6), - "voxygen.voxel.sprite.furniture.crate-6", - Vec3::new(-4.5, -3.0, 0.0), - Vec3::one(), - ), - // DrawerLarge - make_models( - (BlockKind::DrawerLarge, 0), - "voxygen.voxel.sprite.furniture.drawer_large-0", - Vec3::new(-11.5, -5.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::DrawerLarge, 1), - "voxygen.voxel.sprite.furniture.drawer_large-1", - Vec3::new(-11.5, -5.0, 0.0), - Vec3::one(), - ), - // DrawerMedium - make_models( - (BlockKind::DrawerMedium, 0), - "voxygen.voxel.sprite.furniture.drawer_medium-0", - Vec3::new(-11.0, -5.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::DrawerMedium, 1), - "voxygen.voxel.sprite.furniture.drawer_medium-1", - Vec3::new(-11.0, -5.0, 0.0), - Vec3::one(), - ), - // DrawerSmall - make_models( - (BlockKind::DrawerSmall, 0), - "voxygen.voxel.sprite.furniture.drawer_small-0", - Vec3::new(-5.5, -5.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::DrawerSmall, 1), - "voxygen.voxel.sprite.furniture.drawer_small-1", - Vec3::new(-5.5, -5.5, 0.0), - Vec3::one(), - ), - // DungeonWallDecor - make_models( - (BlockKind::DungeonWallDecor, 0), - "voxygen.voxel.sprite.furniture.dungeon_wall-0", - Vec3::new(-5.5, -1.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::DungeonWallDecor, 1), - "voxygen.voxel.sprite.furniture.dungeon_wall-1", - Vec3::new(-5.5, -5.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::DungeonWallDecor, 2), - "voxygen.voxel.sprite.furniture.dungeon_wall-2", - Vec3::new(-5.5, -3.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::DungeonWallDecor, 3), - "voxygen.voxel.sprite.furniture.dungeon_wall-3", - Vec3::new(-1.5, -3.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::DungeonWallDecor, 4), - "voxygen.voxel.sprite.furniture.dungeon_wall-4", - Vec3::new(-5.5, -4.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::DungeonWallDecor, 5), - "voxygen.voxel.sprite.furniture.dungeon_wall-5", - Vec3::new(-5.5, -0.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::DungeonWallDecor, 6), - "voxygen.voxel.sprite.furniture.dungeon_wall-6", - Vec3::new(-5.5, -1.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::DungeonWallDecor, 7), - "voxygen.voxel.sprite.furniture.dungeon_wall-7", - Vec3::new(-5.5, -1.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::DungeonWallDecor, 8), - "voxygen.voxel.sprite.furniture.dungeon_wall-8", - Vec3::new(-5.5, -1.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::DungeonWallDecor, 9), - "voxygen.voxel.sprite.furniture.dungeon_wall-9", - Vec3::new(-1.5, -5.5, 0.0), - Vec3::one(), - ), - // HangingBasket - make_models( - (BlockKind::HangingBasket, 0), - "voxygen.voxel.sprite.furniture.hanging_basket-0", - Vec3::new(-6.5, -4.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::HangingBasket, 1), - "voxygen.voxel.sprite.furniture.hanging_basket-1", - Vec3::new(-9.5, -5.5, 0.0), - Vec3::one(), - ), - // HangingSign - make_models( - (BlockKind::HangingSign, 0), - "voxygen.voxel.sprite.furniture.hanging_sign-0", - Vec3::new(-3.5, -16.0, 0.0), - Vec3::one(), - ), - // WallLamp - make_models( - (BlockKind::WallLamp, 0), - "voxygen.voxel.sprite.furniture.lamp_wall-0", - Vec3::new(-6.5, -3.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::WallLamp, 1), - "voxygen.voxel.sprite.furniture.lamp_wall-1", - Vec3::new(-10.5, -9.0, 0.0), - Vec3::one(), - ), - // Planter - make_models( - (BlockKind::Planter, 0), - "voxygen.voxel.sprite.furniture.planter-0", - Vec3::new(-6.0, -3.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Planter, 1), - "voxygen.voxel.sprite.furniture.planter-1", - Vec3::new(-13.0, -3.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Planter, 2), - "voxygen.voxel.sprite.furniture.planter-2", - Vec3::new(-6.0, -3.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Planter, 3), - "voxygen.voxel.sprite.furniture.planter-3", - Vec3::new(-6.0, -3.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Planter, 4), - "voxygen.voxel.sprite.furniture.planter-4", - Vec3::new(-6.0, -3.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Planter, 5), - "voxygen.voxel.sprite.furniture.planter-5", - Vec3::new(-6.0, -3.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Planter, 6), - "voxygen.voxel.sprite.furniture.planter-6", - Vec3::new(-7.5, -3.5, 0.0), - Vec3::one(), - ), - //Pot - make_models( - (BlockKind::Pot, 0), - "voxygen.voxel.sprite.furniture.pot-0", - Vec3::new(-3.5, -3.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Pot, 1), - "voxygen.voxel.sprite.furniture.pot-1", - Vec3::new(-5.5, -5.5, 0.0), - Vec3::one(), - ), - // Shelf - make_models( - (BlockKind::Shelf, 0), - "voxygen.voxel.sprite.furniture.shelf-0", - Vec3::new(-14.5, -3.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Shelf, 1), - "voxygen.voxel.sprite.furniture.shelf-1", - Vec3::new(-13.5, -3.5, 0.0), - Vec3::one(), - ), - // TableSide - make_models( - (BlockKind::TableSide, 0), - "voxygen.voxel.sprite.furniture.table_side-0", - Vec3::new(-5.5, -5.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::TableSide, 1), - "voxygen.voxel.sprite.furniture.table_side-1", - Vec3::new(-5.5, -5.5, 0.0), - Vec3::one(), - ), - // TableDining - make_models( - (BlockKind::TableDining, 0), - "voxygen.voxel.sprite.furniture.table_dining-0", - Vec3::new(-8.5, -8.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::TableDining, 1), - "voxygen.voxel.sprite.furniture.table_dining-1", - Vec3::new(-8.5, -8.5, 0.0), - Vec3::one(), - ), - // TableDouble - make_models( - (BlockKind::TableDouble, 0), - "voxygen.voxel.sprite.furniture.table_double-0", - Vec3::new(-18.5, -11.5, 0.0), - Vec3::one(), - ), - // WardrobeSingle - make_models( - (BlockKind::WardrobeSingle, 0), - "voxygen.voxel.sprite.furniture.wardrobe_single-0", - Vec3::new(-5.5, -6.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::WardrobeSingle, 1), - "voxygen.voxel.sprite.furniture.wardrobe_single-1", - Vec3::new(-5.5, -6.5, 0.0), - Vec3::one(), - ), - //WardrobeDouble - make_models( - (BlockKind::WardrobeDouble, 0), - "voxygen.voxel.sprite.furniture.wardrobe_double-0", - Vec3::new(-10.5, -6.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::WardrobeDouble, 1), - "voxygen.voxel.sprite.furniture.wardrobe_double-1", - Vec3::new(-10.5, -6.0, 0.0), - Vec3::one(), - ), - /* Stones */ - make_models( - (BlockKind::Stones, 0), - "voxygen.voxel.sprite.rocks.rock-0", - Vec3::new(-3.0, -3.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Stones, 1), - "voxygen.voxel.sprite.rocks.rock-1", - Vec3::new(-4.5, -5.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Stones, 2), - "voxygen.voxel.sprite.rocks.rock-2", - Vec3::new(-4.5, -4.5, 0.0), - Vec3::one(), - ), - /* Twigs */ - make_models( - (BlockKind::Twigs, 0), - "voxygen.voxel.sprite.twigs.twigs-0", - Vec3::new(-3.5, -3.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Twigs, 1), - "voxygen.voxel.sprite.twigs.twigs-1", - Vec3::new(-2.0, -1.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::Twigs, 2), - "voxygen.voxel.sprite.twigs.twigs-2", - Vec3::new(-4.0, -4.0, 0.0), - Vec3::one(), - ), - // Shiny Gems - make_models( - (BlockKind::ShinyGem, 0), - "voxygen.voxel.sprite.gem.gem_blue", - Vec3::new(-2.0, -3.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::ShinyGem, 1), - "voxygen.voxel.sprite.gem.gem_green", - Vec3::new(-2.0, -3.0, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::ShinyGem, 2), - "voxygen.voxel.sprite.gem.gem_red", - Vec3::new(-3.0, -2.0, -2.0), - Vec3::one(), - ), - // Drop Gate Parts - make_models( - (BlockKind::DropGate, 0), - "voxygen.voxel.sprite.castle.drop_gate_bars-0", - Vec3::new(-5.5, -5.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::DropGateBottom, 0), - "voxygen.voxel.sprite.castle.drop_gate_bottom-0", - Vec3::new(-5.5, -5.5, 0.0), - Vec3::one(), - ), - // Snow covered Grass - make_models( - (BlockKind::GrassSnow, 0), - "voxygen.voxel.sprite.grass.grass_snow_0", - Vec3::new(-2.5, -2.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::GrassSnow, 1), - "voxygen.voxel.sprite.grass.grass_snow_1", - Vec3::new(-2.5, -2.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::GrassSnow, 2), - "voxygen.voxel.sprite.grass.grass_snow_2", - Vec3::new(-2.5, -2.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::GrassSnow, 3), - "voxygen.voxel.sprite.grass.grass_snow_3", - Vec3::new(-2.5, -2.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::GrassSnow, 4), - "voxygen.voxel.sprite.grass.grass_snow_4", - Vec3::new(-2.5, -2.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::GrassSnow, 5), - "voxygen.voxel.sprite.grass.grass_snow_5", - Vec3::new(-2.5, -2.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::GrassSnow, 6), - "voxygen.voxel.sprite.grass.grass_snow_6", - Vec3::new(-2.5, -2.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::GrassSnow, 7), - "voxygen.voxel.sprite.grass.grass_snow_7", - Vec3::new(-2.5, -2.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::GrassSnow, 8), - "voxygen.voxel.sprite.grass.grass_snow_8", - Vec3::new(-2.5, -2.5, 0.0), - Vec3::one(), - ), - make_models( - (BlockKind::GrassSnow, 9), - "voxygen.voxel.sprite.grass.grass_snow_9", - Vec3::new(-2.5, -2.5, 0.0), - Vec3::one(), - ), - ] - .into_iter() - .collect(); let sprite_col_lights = ShadowPipeline::create_col_lights(renderer, greedy.finalize()) .expect("Failed to upload sprite color and light data to the GPU!"); Self { atlas, + sprite_config, chunks: HashMap::default(), shadow_chunks: Vec::default(), mesh_send_tmp: send, @@ -2654,6 +620,7 @@ impl Terrain { // Queue the worker thread. let started_tick = todo.started_tick; let sprite_data = Arc::clone(&self.sprite_data); + let sprite_config = Arc::clone(&self.sprite_config); scene_data.thread_pool.execute(move || { let sprite_data = sprite_data; let _ = send.send(mesh_worker( @@ -2665,6 +632,7 @@ impl Terrain { chunk, aabb, &sprite_data, + &sprite_config, )); }); todo.active_worker = Some(todo.started_tick); @@ -3096,7 +1064,10 @@ impl Terrain { )); if focus_dist_sqrd < sprite_render_distance.powf(2.0) { for (kind, instances) in (&chunk.sprite_instances).into_iter() { - let SpriteData { model, locals, .. } = if sprite_config_for(kind.0) + let SpriteData { model, locals, .. } = if kind + .0 + .elim_case_pure(&self.sprite_config) + .as_ref() .map(|config| config.wind_sway >= 0.4) .unwrap_or(false) && dist_sqrd <= chunk_mag