generated from FabricMC/fabric-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3465d6f
commit b4cb79d
Showing
6 changed files
with
61 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 36 additions & 27 deletions
63
fabric/src/main/java/com/atom596/titanium/datagen/TitaniumModelProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,47 @@ | ||
package com.atom596.titanium.datagen; | ||
public class TitaniumModelProvider /*extends FabricModelProvider*/ {/* | ||
|
||
import com.atom596.titanium.block.TitaniumBlocks; | ||
import com.atom596.titanium.item.TitaniumItems; | ||
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput; | ||
import net.fabricmc.fabric.api.datagen.v1.provider.FabricModelProvider; | ||
import net.minecraft.data.models.BlockModelGenerators; | ||
import net.minecraft.data.models.ItemModelGenerators; | ||
import net.minecraft.data.models.model.ModelTemplates; | ||
|
||
public class TitaniumModelProvider extends FabricModelProvider { | ||
public TitaniumModelProvider(FabricDataOutput output) { | ||
super(output); | ||
} | ||
|
||
@Override | ||
public void generateBlockStateModels(BlockStateModelGenerator blockStateModelGenerator) { | ||
blockStateModelGenerator.registerSimpleCubeAll(TitaniumBlocks.TITANIUM_ORE); | ||
blockStateModelGenerator.registerSimpleCubeAll(TitaniumBlocks.DEEPSLATE_TITANIUM_ORE); | ||
blockStateModelGenerator.registerSimpleCubeAll(TitaniumBlocks.END_TITANIUM_ORE); | ||
blockStateModelGenerator.registerSimpleCubeAll(TitaniumBlocks.RAW_TITANIUM_BLOCK); | ||
blockStateModelGenerator.registerSimpleCubeAll(TitaniumBlocks.TITANIUM_BLOCK); | ||
public void generateBlockStateModels(BlockModelGenerators blockStateModelGenerator) { | ||
blockStateModelGenerator.createGenericCube(TitaniumBlocks.TITANIUM_ORE); | ||
blockStateModelGenerator.createGenericCube(TitaniumBlocks.DEEPSLATE_TITANIUM_ORE); | ||
blockStateModelGenerator.createGenericCube(TitaniumBlocks.END_TITANIUM_ORE); | ||
blockStateModelGenerator.createGenericCube(TitaniumBlocks.RAW_TITANIUM_BLOCK); | ||
blockStateModelGenerator.createGenericCube(TitaniumBlocks.TITANIUM_BLOCK); | ||
} | ||
|
||
@Override | ||
public void generateItemModels(ItemModelGenerator itemModelGenerator) { | ||
itemModelGenerator.register(TitaniumItems.TITANIUM_HELMET, Models.GENERATED); | ||
itemModelGenerator.register(TitaniumItems.TITANIUM_CHESTPLATE, Models.GENERATED); | ||
itemModelGenerator.register(TitaniumItems.TITANIUM_LEGGINGS, Models.GENERATED); | ||
itemModelGenerator.register(TitaniumItems.TITANIUM_BOOTS, Models.GENERATED); | ||
itemModelGenerator.register(TitaniumItems.RAW_TITANIUM, Models.GENERATED); | ||
itemModelGenerator.register(TitaniumItems.TITANIUM_NUGGET, Models.GENERATED); | ||
itemModelGenerator.register(TitaniumItems.TITANIUM_INGOT, Models.GENERATED); | ||
itemModelGenerator.register(TitaniumItems.MUSIC_DISC_AMETHYST, Models.GENERATED); | ||
itemModelGenerator.register(TitaniumItems.TITANIUM_HORSE_ARMOR, Models.GENERATED); | ||
itemModelGenerator.register(TitaniumItems.END_POWDER, Models.GENERATED); | ||
itemModelGenerator.register(TitaniumItems.FLIGHT_CHARGE, Models.GENERATED); | ||
itemModelGenerator.register(TitaniumItems.TITANIUM_LANTERN, Models.GENERATED); | ||
public void generateItemModels(ItemModelGenerators itemModelGenerator) { | ||
itemModelGenerator.generateFlatItem(TitaniumItems.TITANIUM_HELMET, ModelTemplates.FLAT_ITEM); | ||
itemModelGenerator.generateFlatItem(TitaniumItems.TITANIUM_CHESTPLATE, ModelTemplates.FLAT_ITEM); | ||
itemModelGenerator.generateFlatItem(TitaniumItems.TITANIUM_LEGGINGS, ModelTemplates.FLAT_ITEM); | ||
itemModelGenerator.generateFlatItem(TitaniumItems.TITANIUM_BOOTS, ModelTemplates.FLAT_ITEM); | ||
itemModelGenerator.generateFlatItem(TitaniumItems.RAW_TITANIUM, ModelTemplates.FLAT_ITEM); | ||
itemModelGenerator.generateFlatItem(TitaniumItems.TITANIUM_NUGGET, ModelTemplates.FLAT_ITEM); | ||
itemModelGenerator.generateFlatItem(TitaniumItems.TITANIUM_INGOT, ModelTemplates.FLAT_ITEM); | ||
itemModelGenerator.generateFlatItem(TitaniumItems.MUSIC_DISC_AMETHYST, ModelTemplates.FLAT_ITEM); | ||
itemModelGenerator.generateFlatItem(TitaniumItems.TITANIUM_HORSE_ARMOR, ModelTemplates.FLAT_ITEM); | ||
itemModelGenerator.generateFlatItem(TitaniumItems.END_POWDER, ModelTemplates.FLAT_ITEM); | ||
itemModelGenerator.generateFlatItem(TitaniumItems.FLIGHT_CHARGE, ModelTemplates.FLAT_ITEM); | ||
itemModelGenerator.generateFlatItem(TitaniumItems.TITANIUM_LANTERN, ModelTemplates.FLAT_ITEM); | ||
|
||
itemModelGenerator.register(TitaniumItems.TITANIUM_SHOVEL, Models.HANDHELD); | ||
itemModelGenerator.register(TitaniumItems.TITANIUM_SWORD, Models.HANDHELD); | ||
itemModelGenerator.register(TitaniumItems.TITANIUM_PICKAXE, Models.HANDHELD); | ||
itemModelGenerator.register(TitaniumItems.TITANIUM_AXE, Models.HANDHELD); | ||
itemModelGenerator.register(TitaniumItems.TITANIUM_HOE, Models.HANDHELD); | ||
itemModelGenerator.register(TitaniumItems.TESTING_WAND, Models.HANDHELD); | ||
itemModelGenerator.generateFlatItem(TitaniumItems.TITANIUM_SHOVEL, ModelTemplates.FLAT_HANDHELD_ITEM); | ||
itemModelGenerator.generateFlatItem(TitaniumItems.TITANIUM_SWORD, ModelTemplates.FLAT_HANDHELD_ITEM); | ||
itemModelGenerator.generateFlatItem(TitaniumItems.TITANIUM_PICKAXE, ModelTemplates.FLAT_HANDHELD_ITEM); | ||
itemModelGenerator.generateFlatItem(TitaniumItems.TITANIUM_AXE, ModelTemplates.FLAT_HANDHELD_ITEM); | ||
itemModelGenerator.generateFlatItem(TitaniumItems.TITANIUM_HOE, ModelTemplates.FLAT_HANDHELD_ITEM); | ||
itemModelGenerator.generateFlatItem(TitaniumItems.TESTING_WAND, ModelTemplates.FLAT_HANDHELD_ITEM); | ||
} | ||
*/} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters