22
33import com .github .cubiomes .Cubiomes ;
44import dev .xpple .seedmapper .SeedMapper ;
5+ import net .minecraft .network .chat .Component ;
56import net .minecraft .resources .ResourceLocation ;
67
78import java .util .Arrays ;
89import java .util .Map ;
910import java .util .stream .Collectors ;
1011
1112public enum MapFeature {
12- DESERT_PYRAMID ("desert_pyramid" , Cubiomes .Desert_Pyramid (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_3 (), "cubiomes_viewer_icons" , 19 , 20 ),
13- JUNGLE_PYRAMID ("jungle_pyramid" , Cubiomes .Jungle_Pyramid (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_3 (), "cubiomes_viewer_icons" , 19 , 20 ),
14- SWAMP_HUT ("swamp_hut" , Cubiomes .Swamp_Hut (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_4 (), "cubiomes_viewer_icons" , 20 , 20 ),
15- STRONGHOLD ("stronghold" , -1 , Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_B1_8 (), "cubiomes_viewer_icons" , 19 , 20 ),
16- IGLOO ("igloo" , Cubiomes .Igloo (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_9 (), "cubiomes_viewer_icons" , 20 , 20 ),
17- VILLAGE ("village" , Cubiomes .Village (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_B1_8 (), "cubiomes_viewer_icons" , 19 , 20 ),
18- OCEAN_RUIN ("ocean_ruin" , Cubiomes .Ocean_Ruin (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_13 (), "cubiomes_viewer_icons" , 19 , 19 ),
19- SHIPWRECK ("shipwreck" , Cubiomes .Shipwreck (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_13 (), "cubiomes_viewer_icons" , 19 , 19 ),
20- MONUMENT ("monument" , Cubiomes .Monument (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_8 (), "cubiomes_viewer_icons" , 20 , 20 ),
21- MANSION ("mansion" , Cubiomes .Mansion (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_11 (), "cubiomes_viewer_icons" , 20 , 20 ),
22- OUTPOST ("pillager_outpost" , Cubiomes .Outpost (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_14 (), "cubiomes_viewer_icons" , 19 , 20 ),
23- RUINED_PORTAL ("ruined_portal" , Cubiomes .Ruined_Portal (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_16_1 (), "cubiomes_viewer_icons" , 20 , 20 ),
24- RUINED_PORTAL_N ("ruined_portal_n" , Cubiomes .Ruined_Portal_N (), Cubiomes .DIM_NETHER (), Cubiomes .MC_1_16_1 (), "cubiomes_viewer_icons" , 20 , 20 ),
25- ANCIENT_CITY ("ancient_city" , Cubiomes .Ancient_City (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_19_2 (), "cubiomes_viewer_icons" , 20 , 20 ),
26- TREASURE ("buried_treasure" , Cubiomes .Treasure (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_13 (), "cubiomes_viewer_icons" , 19 , 19 ),
27- MINESHAFT ("mineshaft" , Cubiomes .Mineshaft (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_B1_8 (), "cubiomes_viewer_icons" , 20 , 19 ),
28- DESERT_WELL ("desert_well" , Cubiomes .Desert_Well (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_13 (), "cubiomes_viewer_icons" , 20 , 20 ),
29- GEODE ("geode" , Cubiomes .Geode (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_17 (), "cubiomes_viewer_icons" , 20 , 20 ),
30- COPPER_ORE_VEIN ("copper_ore_vein" , -1 , Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_18 (), "feature_icons" , 20 , 20 ),
31- IRON_ORE_VEIN ("iron_ore_vein" , -1 , Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_18 (), "feature_icons" , 20 , 20 ),
32- CANYON ("canyon" , -1 , Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_13 (), "feature_icons" , 20 , 20 ),
33- FORTRESS ("fortress" , Cubiomes .Fortress (), Cubiomes .DIM_NETHER (), Cubiomes .MC_1_0 (), "cubiomes_viewer_icons" , 20 , 20 ),
34- BASTION ("bastion_remnant" , Cubiomes .Bastion (), Cubiomes .DIM_NETHER (), Cubiomes .MC_1_16_1 (), "cubiomes_viewer_icons" , 20 , 20 ),
35- END_CITY ("end_city" , Cubiomes .End_City (), Cubiomes .DIM_END (), Cubiomes .MC_1_9 (), "cubiomes_viewer_icons" , 20 , 20 ),
36- END_CITY_SHIP ("end_city_ship" , Cubiomes .End_City (), Cubiomes .DIM_END (), Cubiomes .MC_1_9 (), "cubiomes_viewer_icons" , "elytra" , 20 , 20 ),
37- END_GATEWAY ("end_gateway" , Cubiomes .End_Gateway (), Cubiomes .DIM_END (), Cubiomes .MC_1_13 (), "cubiomes_viewer_icons" , 20 , 20 ),
38- TRAIL_RUINS ("trail_ruins" , Cubiomes .Trail_Ruins (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_20 (), "cubiomes_viewer_icons" , 20 , 20 ),
39- TRIAL_CHAMBERS ("trial_chambers" , Cubiomes .Trial_Chambers (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_21_1 (), "cubiomes_viewer_icons" , 20 , 20 ),
40- SLIME_CHUNK ("slime_chunk" , -1 , Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_B1_7 (), "feature_icons" , 20 , 20 ),
41- WORLD_SPAWN ("world_spawn" , -1 , Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_B1_7 (), "cubiomes_viewer_icons" , 20 , 20 ),
42- WAYPOINT ("waypoint" , -1 , Cubiomes .DIM_UNDEF (), Cubiomes .MC_B1_7 (), "feature_icons" , 20 , 20 ),
13+ DESERT_PYRAMID ("desert_pyramid" , Cubiomes .Desert_Pyramid (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_3 (), "Desert Pyramid" , " cubiomes_viewer_icons" , 19 , 20 ),
14+ JUNGLE_PYRAMID ("jungle_pyramid" , Cubiomes .Jungle_Pyramid (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_3 (), "Jungle Pyramid" , " cubiomes_viewer_icons" , 19 , 20 ),
15+ SWAMP_HUT ("swamp_hut" , Cubiomes .Swamp_Hut (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_4 (), "Swamp Hut" , " cubiomes_viewer_icons" , 20 , 20 ),
16+ STRONGHOLD ("stronghold" , -1 , Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_B1_8 (), "Stronghold" , " cubiomes_viewer_icons" , 19 , 20 ),
17+ IGLOO ("igloo" , Cubiomes .Igloo (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_9 (), "Igloo" , " cubiomes_viewer_icons" , 20 , 20 ),
18+ VILLAGE ("village" , Cubiomes .Village (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_B1_8 (), "Village" , " cubiomes_viewer_icons" , 19 , 20 ),
19+ OCEAN_RUIN ("ocean_ruin" , Cubiomes .Ocean_Ruin (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_13 (), "Ocean Ruin" , " cubiomes_viewer_icons" , 19 , 19 ),
20+ SHIPWRECK ("shipwreck" , Cubiomes .Shipwreck (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_13 (), "Shipwreck" , " cubiomes_viewer_icons" , 19 , 19 ),
21+ MONUMENT ("monument" , Cubiomes .Monument (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_8 (), "Ocean Monument" , " cubiomes_viewer_icons" , 20 , 20 ),
22+ MANSION ("mansion" , Cubiomes .Mansion (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_11 (), "Woodland Mansion" , " cubiomes_viewer_icons" , 20 , 20 ),
23+ OUTPOST ("pillager_outpost" , Cubiomes .Outpost (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_14 (), "Pillager Outpost" , " cubiomes_viewer_icons" , 19 , 20 ),
24+ RUINED_PORTAL ("ruined_portal" , Cubiomes .Ruined_Portal (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_16_1 (), "Ruined Portal" , " cubiomes_viewer_icons" , 20 , 20 ),
25+ RUINED_PORTAL_N ("ruined_portal_n" , Cubiomes .Ruined_Portal_N (), Cubiomes .DIM_NETHER (), Cubiomes .MC_1_16_1 (), "Ruined Portal (Nether)" , " cubiomes_viewer_icons" , 20 , 20 ),
26+ ANCIENT_CITY ("ancient_city" , Cubiomes .Ancient_City (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_19_2 (), "Ancient City" , " cubiomes_viewer_icons" , 20 , 20 ),
27+ TREASURE ("buried_treasure" , Cubiomes .Treasure (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_13 (), "Buried Treasure" , " cubiomes_viewer_icons" , 19 , 19 ),
28+ MINESHAFT ("mineshaft" , Cubiomes .Mineshaft (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_B1_8 (), "Mineshaft" , " cubiomes_viewer_icons" , 20 , 19 ),
29+ DESERT_WELL ("desert_well" , Cubiomes .Desert_Well (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_13 (), "Desert Well" , " cubiomes_viewer_icons" , 20 , 20 ),
30+ GEODE ("geode" , Cubiomes .Geode (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_17 (), "Geode" , " cubiomes_viewer_icons" , 20 , 20 ),
31+ COPPER_ORE_VEIN ("copper_ore_vein" , -1 , Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_18 (), "Copper Ore Vein" , " feature_icons" , 20 , 20 ),
32+ IRON_ORE_VEIN ("iron_ore_vein" , -1 , Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_18 (), "Iron Ore Vein" , " feature_icons" , 20 , 20 ),
33+ CANYON ("canyon" , -1 , Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_13 (), "Canyon" , " feature_icons" , 20 , 20 ),
34+ FORTRESS ("fortress" , Cubiomes .Fortress (), Cubiomes .DIM_NETHER (), Cubiomes .MC_1_0 (), "Nether Fortress" , " cubiomes_viewer_icons" , 20 , 20 ),
35+ BASTION ("bastion_remnant" , Cubiomes .Bastion (), Cubiomes .DIM_NETHER (), Cubiomes .MC_1_16_1 (), "Bastion Remnant" , " cubiomes_viewer_icons" , 20 , 20 ),
36+ END_CITY ("end_city" , Cubiomes .End_City (), Cubiomes .DIM_END (), Cubiomes .MC_1_9 (), "End City" , " cubiomes_viewer_icons" , 20 , 20 ),
37+ END_CITY_SHIP ("end_city_ship" , Cubiomes .End_City (), Cubiomes .DIM_END (), Cubiomes .MC_1_9 (), "Elytra" , " cubiomes_viewer_icons" , "elytra" , 20 , 20 ),
38+ END_GATEWAY ("end_gateway" , Cubiomes .End_Gateway (), Cubiomes .DIM_END (), Cubiomes .MC_1_13 (), "End Gateway" , " cubiomes_viewer_icons" , 20 , 20 ),
39+ TRAIL_RUINS ("trail_ruins" , Cubiomes .Trail_Ruins (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_20 (), "Trail Ruins" , " cubiomes_viewer_icons" , 20 , 20 ),
40+ TRIAL_CHAMBERS ("trial_chambers" , Cubiomes .Trial_Chambers (), Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_1_21_1 (), "Trial Chambers" , " cubiomes_viewer_icons" , 20 , 20 ),
41+ SLIME_CHUNK ("slime_chunk" , -1 , Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_B1_7 (), "Slime Chunk" , " feature_icons" , 20 , 20 ),
42+ WORLD_SPAWN ("world_spawn" , -1 , Cubiomes .DIM_OVERWORLD (), Cubiomes .MC_B1_7 (), "World Spawn" , " cubiomes_viewer_icons" , 20 , 20 ),
43+ WAYPOINT ("waypoint" , -1 , Cubiomes .DIM_UNDEF (), Cubiomes .MC_B1_7 (), "Waypoint" , " feature_icons" , 20 , 20 ),
4344 ;
4445
4546 public static final Map <String , MapFeature > BY_NAME = Arrays .stream (values ())
@@ -49,17 +50,21 @@ public enum MapFeature {
4950 private final int structureId ;
5051 private final int dimension ;
5152 private final int availableSince ;
53+ private final Component displayName ;
54+ private final String translationKey ;
5255 private final Texture texture ;
5356
54- MapFeature (String name , int structureId , int dimension , int availableSince , String directory , int textureWidth , int textureHeight ) {
55- this (name , structureId , dimension , availableSince , directory , name , textureWidth , textureHeight );
57+ MapFeature (String name , int structureId , int dimension , int availableSince , String displayName , String directory , int textureWidth , int textureHeight ) {
58+ this (name , structureId , dimension , availableSince , displayName , directory , name , textureWidth , textureHeight );
5659 }
5760
58- MapFeature (String name , int structureId , int dimension , int availableSince , String directory , String textureName , int textureWidth , int textureHeight ) {
61+ MapFeature (String name , int structureId , int dimension , int availableSince , String displayName , String directory , String textureName , int textureWidth , int textureHeight ) {
5962 this .name = name ;
6063 this .structureId = structureId ;
6164 this .dimension = dimension ;
6265 this .availableSince = availableSince ;
66+ this .translationKey = "seedMap.feature." + name ;
67+ this .displayName = Component .translatableWithFallback (this .translationKey , displayName );
6368 this .texture = new Texture (textureName , directory , textureWidth , textureHeight );
6469 }
6570
@@ -79,6 +84,14 @@ public int availableSince() {
7984 return this .availableSince ;
8085 }
8186
87+ public Component getDisplayName () {
88+ return this .displayName ;
89+ }
90+
91+ public String getTranslationKey () {
92+ return this .translationKey ;
93+ }
94+
8295 public Texture getTexture () {
8396 return this .texture ;
8497 }
0 commit comments