public class ExampleModDataGenerator implements DataGeneratorEntrypoint { // ... (The rest of the file) private static class MyTagGenerator extends FabricTagProvider.ItemTagProvider { // ... (The rest of the file) private static final TagKey SMELLY_ITEMS = TagKey.of(RegistryKeys.ITEM, new Identifier("mymod:smelly_items")); @Override protected void configure(WrapperLookup arg) { // This creates a tag builder, where we add slime balls, rotten flesh and everything in the minecraft:dirt item tag. // This will automatically generate "src/main/generated/data/tutorial/tags/items/smelly_items.json" in the "generated" folder. getOrCreateTagBuilder(SMELLY_ITEMS) .add(Items.SLIME_BALL) .add(Items.ROTTEN_FLESH) .addOptionalTag(ItemTags.DIRT); } } }