@@ -90,25 +90,24 @@ public NamespaceID getName() {
90
90
91
91
public enum BasicType {
92
92
BLOCKS ("minecraft:block" , Registry .Resource .BLOCK_TAGS ,
93
- name -> Optional .ofNullable (Block .fromNamespaceId (name )).map (Block ::id )),
93
+ blockName -> Optional .ofNullable (Block .fromNamespaceId (blockName )).map (Block ::id )),
94
94
ITEMS ("minecraft:item" , Registry .Resource .ITEM_TAGS ,
95
- name -> Optional .ofNullable (Material .fromNamespaceId (name )).map (Material ::id )),
95
+ itemName -> Optional .ofNullable (Material .fromNamespaceId (itemName )).map (Material ::id )),
96
96
FLUIDS ("minecraft:fluid" , Registry .Resource .FLUID_TAGS ,
97
- name -> Optional .ofNullable (Fluid .fromNamespaceId (name )).map (Fluid ::id )),
97
+ fluidName -> Optional .ofNullable (Fluid .fromNamespaceId (fluidName )).map (Fluid ::id )),
98
98
BIOMES ("minecraft:worldgen/biome" , Registry .Resource .BIOME_TAGS ,
99
- name -> Optional .of (DynamicRegistry .Key .of (name )).map (DynamicRegistry .Key ::namespace ).map (MinecraftServer .getBiomeRegistry ()::getId )),
99
+ biomeName -> Optional .of (DynamicRegistry .Key .of (biomeName )).map (DynamicRegistry .Key ::namespace ).map (MinecraftServer .getBiomeRegistry ()::getId )),
100
100
ENTITY_TYPES ("minecraft:entity_type" , Registry .Resource .ENTITY_TYPE_TAGS ,
101
- name -> Optional .ofNullable (EntityType .fromNamespaceId (name )).map (EntityType ::id )),
101
+ entityName -> Optional .ofNullable (EntityType .fromNamespaceId (entityName )).map (EntityType ::id )),
102
102
GAME_EVENTS ("minecraft:game_event" , Registry .Resource .GAMEPLAY_TAGS ,
103
- name -> Optional .ofNullable (GameEvent .fromNamespaceId (name )).map (GameEvent ::id )),
103
+ eventName -> Optional .ofNullable (GameEvent .fromNamespaceId (eventName )).map (GameEvent ::id )),
104
104
SOUND_EVENTS ("minecraft:sound_event" , null , null ), // Seems not to be included in server data
105
105
POTION_EFFECTS ("minecraft:sound_event" , null , null ), // Seems not to be included in server data
106
-
107
106
//todo this is cursed. it does not update as the registry changes. Fix later.
108
107
ENCHANTMENTS ("minecraft:enchantment" , Registry .Resource .ENCHANTMENT_TAGS ,
109
- name -> Optional .of (DynamicRegistry .Key .of (name )).map (DynamicRegistry .Key ::namespace ).map (MinecraftServer .getEnchantmentRegistry ()::getId )),;
108
+ enchName -> Optional .of (DynamicRegistry .Key .of (enchName )).map (DynamicRegistry .Key ::namespace ).map (MinecraftServer .getEnchantmentRegistry ()::getId )),;
110
109
111
- private final static BasicType [] VALUES = values ();
110
+ private static final BasicType [] VALUES = values ();
112
111
private final String identifier ;
113
112
private final Registry .Resource resource ;
114
113
private final Function <String , Optional <Integer >> function ;
0 commit comments