3636import net .minecraft .resources .ResourceKey ;
3737import net .minecraft .resources .ResourceLocation ;
3838import net .minecraft .tags .*;
39+ import net .minecraft .world .item .ArmorItem ;
3940import net .minecraft .world .item .Item ;
4041import net .minecraft .world .item .ItemStack ;
4142import net .minecraft .world .item .Items ;
5859import net .minecraft .world .level .storage .loot .providers .number .ConstantValue ;
5960import net .minecraft .world .level .storage .loot .providers .number .UniformGenerator ;
6061import net .neoforged .neoforge .client .extensions .common .IClientFluidTypeExtensions ;
61- import net .neoforged .neoforge .common .Tags ;
6262
6363import com .tterrag .registrate .util .entry .BlockEntry ;
6464import org .apache .logging .log4j .util .TriConsumer ;
@@ -133,6 +133,9 @@ public static <T> void generateGTDynamicTags(Map<ResourceLocation, List<TagLoade
133133
134134 GTMaterialItems .ARMOR_ITEMS .rowMap ().forEach ((material , map ) -> {
135135 map .forEach ((type , item ) -> {
136+ if (type == null || type == ArmorItem .Type .BODY ) {
137+ return ;
138+ }
136139 if (item != null ) {
137140 var entry = new TagLoader .EntryWithSource (TagEntry .element (item .getId ()),
138141 GTValues .CUSTOM_TAG_SOURCE );
@@ -143,14 +146,7 @@ public static <T> void generateGTDynamicTags(Map<ResourceLocation, List<TagLoade
143146 case CHESTPLATE -> ItemTags .CHEST_ARMOR .location ();
144147 case LEGGINGS -> ItemTags .LEG_ARMOR .location ();
145148 case BOOTS -> ItemTags .FOOT_ARMOR .location ();
146- case BODY -> Tags .Items .ARMORS .location ();
147- }, $ -> new ArrayList <>()).add (entry );
148- tagMap .computeIfAbsent (switch (type ) {
149- case HELMET -> ItemTags .HEAD_ARMOR_ENCHANTABLE .location ();
150- case CHESTPLATE -> ItemTags .CHEST_ARMOR_ENCHANTABLE .location ();
151- case LEGGINGS -> ItemTags .LEG_ARMOR_ENCHANTABLE .location ();
152- case BOOTS -> ItemTags .FOOT_ARMOR_ENCHANTABLE .location ();
153- case BODY -> Tags .Items .ENCHANTABLES .location ();
149+ default -> throw new IllegalStateException ("Unexpected value: " + type );
154150 }, $ -> new ArrayList <>()).add (entry );
155151 }
156152 });
0 commit comments