-
Notifications
You must be signed in to change notification settings - Fork 100
Data Generators
As of DT Beta 17, we now provide a few data generators to automate generation of things like tags for add-ons based on the families and species they register.
The DTItemTagsProvider
[View Source] generates seed tags for any registered seeds under any Species with the provided Mod ID. It can be set up, along with the block tags provider, using DynamicTrees#gatherTagGenerators(String, GatherDataEvent)
. See details here.
The DTBlockTagsProvider
[View Source] generates leaves, branch, stripped branch, and sapling block tags for any of the registered blocks under any Leaves Properties, Families, or Species with the provided Mod ID. It can be set up, along with the block tags provider, using DynamicTrees#gatherTagGenerators(String, GatherDataEvent)
. See details here.
The method DynamicTrees#gatherTagGenerators(String, GatherDataEvent)
can be used to instantiate an item tag provider and block tag provider with the given Mod ID. It also requires a GatherDataEvent
, so add-ons will need a listener for this event to call this method from.
In the future we also plan on implementing block state and model providers to automate the monotonous process of adding these. When these are added, this page will be updated with the details on how to use them.