Class FabricTagProvider.ItemTagProvider
java.lang.Object
net.minecraft.data.server.tag.TagProvider<Item>
net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider<Item>
net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider.ItemTagProvider
- All Implemented Interfaces:
DataProvider
- Enclosing class:
FabricTagProvider<T>
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.EnchantmentTagProvider, FabricTagProvider.EntityTypeTagProvider, FabricTagProvider.FabricTagBuilder, FabricTagProvider.FluidTagProvider, FabricTagProvider.GameEventTagProvider, FabricTagProvider.ItemTagProvider
Nested classes/interfaces inherited from class net.minecraft.data.server.tag.TagProvider
TagProvider.ProvidedTagBuilder<T>, TagProvider.TagLookup<T>
Nested classes/interfaces inherited from interface net.minecraft.data.DataProvider
DataProvider.Factory<T extends DataProvider>
-
Field Summary
Fields inherited from class net.minecraft.data.server.tag.TagProvider
pathResolver, registryRef
Fields inherited from interface net.minecraft.data.DataProvider
JSON_KEY_SORT_ORDER, JSON_KEY_SORTING_COMPARATOR
-
Constructor Summary
ConstructorDescriptionItemTagProvider
(FabricDataOutput output, CompletableFuture<RegistryWrapper.WrapperLookup> completableFuture) Construct anFabricTagProvider.ItemTagProvider
tag provider without an associatedFabricTagProvider.BlockTagProvider
tag provider.ItemTagProvider
(FabricDataOutput output, CompletableFuture<RegistryWrapper.WrapperLookup> completableFuture, FabricTagProvider.BlockTagProvider blockTagProvider) Construct anFabricTagProvider.ItemTagProvider
tag provider with an associatedFabricTagProvider.BlockTagProvider
tag provider. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Copy the entries from a tag with theBlock
type into this item tag.protected RegistryKey
<Item> reverseLookup
(Item element) Override to enable adding objects to the tag builder directly.Methods inherited from class net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider
configure, getOrCreateTagBuilder
Methods inherited from class net.minecraft.data.server.tag.TagProvider
getName, getRegistryLookupFuture, getTagBuilder, getTagLookupFuture, run
-
Constructor Details
-
ItemTagProvider
public ItemTagProvider(FabricDataOutput output, CompletableFuture<RegistryWrapper.WrapperLookup> completableFuture, @Nullable FabricTagProvider.BlockTagProvider blockTagProvider) Construct anFabricTagProvider.ItemTagProvider
tag provider with an associatedFabricTagProvider.BlockTagProvider
tag provider.- Parameters:
output
- TheFabricDataOutput
instance
-
ItemTagProvider
public ItemTagProvider(FabricDataOutput output, CompletableFuture<RegistryWrapper.WrapperLookup> completableFuture) Construct anFabricTagProvider.ItemTagProvider
tag provider without an associatedFabricTagProvider.BlockTagProvider
tag provider.- Parameters:
output
- TheFabricDataOutput
instance
-
-
Method Details
-
copy
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.- Parameters:
blockTag
- The block tag to copy from.itemTag
- The item tag to copy to.
-
reverseLookup
Description copied from class:FabricTagProvider
Override to enable adding objects to the tag builder directly.- Overrides:
reverseLookup
in classFabricTagProvider<Item>
-