Interface TagFactory<T>


public interface TagFactory<T>
A factory for accessing datapack tags.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static TagFactory<net.minecraft.world.biome.Biome>
     
    static TagFactory<net.minecraft.block.Block>
     
    static TagFactory<net.minecraft.entity.EntityType<?>>
     
    static TagFactory<net.minecraft.fluid.Fluid>
     
    static TagFactory<net.minecraft.world.event.GameEvent>
     
    static TagFactory<net.minecraft.item.Item>
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.tag.Tag.Identified<T>
    create​(net.minecraft.util.Identifier id)
     
    static <T> TagFactory<T>
    of​(Supplier<net.minecraft.tag.TagGroup<T>> tagGroupSupplier)
     
    static <T> TagFactory<T>
    of​(net.minecraft.util.registry.RegistryKey<? extends net.minecraft.util.registry.Registry<T>> registryKey, String dataType)
    Create a new tag factory for specified registry.
  • Field Details

    • ITEM

      static final TagFactory<net.minecraft.item.Item> ITEM
    • BLOCK

      static final TagFactory<net.minecraft.block.Block> BLOCK
    • FLUID

      static final TagFactory<net.minecraft.fluid.Fluid> FLUID
    • GAME_EVENT

      static final TagFactory<net.minecraft.world.event.GameEvent> GAME_EVENT
    • ENTITY_TYPE

      static final TagFactory<net.minecraft.entity.EntityType<?>> ENTITY_TYPE
    • BIOME

      static final TagFactory<net.minecraft.world.biome.Biome> BIOME
  • Method Details

    • of

      static <T> TagFactory<T> of(net.minecraft.util.registry.RegistryKey<? extends net.minecraft.util.registry.Registry<T>> registryKey, String dataType)
      Create a new tag factory for specified registry.
      Parameters:
      registryKey - the key of the registry.
      dataType - the data type of this tag group, vanilla uses "tags/[plural]" format for built-in groups.
    • of

      static <T> TagFactory<T> of(Supplier<net.minecraft.tag.TagGroup<T>> tagGroupSupplier)
    • create

      net.minecraft.tag.Tag.Identified<T> create(net.minecraft.util.Identifier id)