@@ -90,25 +90,24 @@ public NamespaceID getName() {
9090
9191 public enum BasicType {
9292 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 )),
9494 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 )),
9696 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 )),
9898 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 )),
100100 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 )),
102102 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 )),
104104 SOUND_EVENTS ("minecraft:sound_event" , null , null ), // Seems not to be included in server data
105105 POTION_EFFECTS ("minecraft:sound_event" , null , null ), // Seems not to be included in server data
106-
107106 //todo this is cursed. it does not update as the registry changes. Fix later.
108107 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 )),;
110109
111- private final static BasicType [] VALUES = values ();
110+ private static final BasicType [] VALUES = values ();
112111 private final String identifier ;
113112 private final Registry .Resource resource ;
114113 private final Function <String , Optional <Integer >> function ;
0 commit comments