item builder DSL framework completed and seems to work. custom tag and model generation don't work yet. don't uncomment the tag generation code as it causes a stack overflow crash ⚠️
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
package dev.zxq5
|
||||
|
||||
import dev.zxq5.items.ItemImplementation
|
||||
import dev.zxq5.items.ItemTagAdder
|
||||
import dev.zxq5.items.template.GenericItemSet
|
||||
import dev.zxq5.items.template.ItemTagAdder
|
||||
import dev.zxq5.items.ModItems
|
||||
import dev.zxq5.items.Witherite
|
||||
//import dev.zxq5.items.Witherite
|
||||
import dev.zxq5.items.sets.Witherite
|
||||
//import dev.zxq5.items.sets.Witherite
|
||||
import net.fabricmc.api.ModInitializer
|
||||
import net.fabricmc.fabric.api.datagen.v1.FabricPackOutput
|
||||
import net.fabricmc.fabric.api.datagen.v1.provider.FabricRecipeProvider
|
||||
@@ -51,7 +51,7 @@ class ModRecipeProvider(
|
||||
return object : RecipeProvider(registries, exporter) {
|
||||
override fun buildRecipes() {
|
||||
print("GENERATING ALL RECIPES")
|
||||
ItemImplementation.all.forEach {
|
||||
GenericItemSet.all.forEach {
|
||||
print("GENERATING RECIPES FOR" + it.items.toString())
|
||||
it.generateRecipes(registries, exporter)
|
||||
}
|
||||
@@ -66,6 +66,6 @@ class ModItemTagProvider(output: FabricPackOutput, registriesFuture: Completable
|
||||
FabricTagsProvider.ItemTagsProvider(output, registriesFuture) {
|
||||
override fun addTags(provider: HolderLookup.Provider) {
|
||||
val adder = ItemTagAdder(this)
|
||||
ItemImplementation.all.forEach { it.generateItemTags(adder) }
|
||||
GenericItemSet.all.forEach { it.generateItemTags(adder) }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user