Class FabricTagProvider.ItemTagProvider
java.lang.Object
net.minecraft.data.server.AbstractTagProvider<T>
net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider<net.minecraft.item.Item>
net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider.ItemTagProvider
- All Implemented Interfaces:
net.minecraft.data.DataProvider
- Enclosing class:
- FabricTagProvider<T>
public abstract static class FabricTagProvider.ItemTagProvider
extends FabricTagProvider<net.minecraft.item.Item>
Extend this class to create
Item
tags in the "/items" tag directory.-
Nested Class Summary
Nested classes/interfaces inherited from class net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider
FabricTagProvider.BlockTagProvider, FabricTagProvider.DynamicRegistryTagProvider<T>, FabricTagProvider.EntityTypeTagProvider, FabricTagProvider.FabricTagBuilder<T>, FabricTagProvider.FluidTagProvider, FabricTagProvider.GameEventTagProvider, FabricTagProvider.ItemTagProvider
Nested classes/interfaces inherited from class net.minecraft.data.server.AbstractTagProvider
net.minecraft.data.server.AbstractTagProvider.ObjectBuilder<T extends Object>
-
Field Summary
Fields inherited from class net.minecraft.data.server.AbstractTagProvider
registry, root
Fields inherited from interface net.minecraft.data.DataProvider
SHA1
-
Constructor Summary
ConstructorDescriptionItemTagProvider
(FabricDataGenerator dataGenerator) Construct anFabricTagProvider.ItemTagProvider
tag provider without an associatedFabricTagProvider.BlockTagProvider
tag provider.ItemTagProvider
(FabricDataGenerator dataGenerator, FabricTagProvider.BlockTagProvider blockTagProvider) Construct anFabricTagProvider.ItemTagProvider
tag provider with an associatedFabricTagProvider.BlockTagProvider
tag provider. -
Method Summary
Modifier and TypeMethodDescriptionvoid
copy
(net.minecraft.tag.TagKey<net.minecraft.block.Block> blockTag, net.minecraft.tag.TagKey<net.minecraft.item.Item> itemTag) Copy the entries from a tag with theBlock
type into this item tag.Methods inherited from class net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider
configure, generateTags, getFabricDataGenerator, getName, getOrCreateTagBuilder, getOutput
Methods inherited from class net.minecraft.data.server.AbstractTagProvider
getTagBuilder, run
-
Constructor Details
-
ItemTagProvider
public ItemTagProvider(FabricDataGenerator dataGenerator, @Nullable FabricTagProvider.BlockTagProvider blockTagProvider) Construct anFabricTagProvider.ItemTagProvider
tag provider with an associatedFabricTagProvider.BlockTagProvider
tag provider.- Parameters:
dataGenerator
- aFabricTagProvider.ItemTagProvider
tag provider
-
ItemTagProvider
Construct anFabricTagProvider.ItemTagProvider
tag provider without an associatedFabricTagProvider.BlockTagProvider
tag provider.- Parameters:
dataGenerator
- aFabricTagProvider.ItemTagProvider
tag provider
-
-
Method Details
-
copy
public void copy(net.minecraft.tag.TagKey<net.minecraft.block.Block> blockTag, net.minecraft.tag.TagKey<net.minecraft.item.Item> itemTag) Copy the entries from a tag with theBlock
type into this item tag.The
FabricTagProvider.ItemTagProvider
tag provider must be constructed with an associatedFabricTagProvider.BlockTagProvider
tag provider to use this method.Any block ids that do not exist in the item registry will be filtered out automatically.
- Parameters:
blockTag
- The block tag to copy from.itemTag
- The item tag to copy to.
-