-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🚧 Continue working on updating model providers
- Loading branch information
Showing
11 changed files
with
267 additions
and
399 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
88 changes: 0 additions & 88 deletions
88
.../src/main/java/com/autovw/advancednetherite/datagen/providers/ModBlockStatesProvider.java
This file was deleted.
Oops, something went wrong.
102 changes: 102 additions & 0 deletions
102
Fabric/src/main/java/com/autovw/advancednetherite/datagen/providers/ModModelProvider.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 |
---|---|---|
@@ -0,0 +1,102 @@ | ||
package com.autovw.advancednetherite.datagen.providers; | ||
|
||
import com.autovw.advancednetherite.core.ModBlocks; | ||
import com.autovw.advancednetherite.core.ModItems; | ||
import com.autovw.advancednetherite.core.util.ModEquipmentAssets; | ||
import net.fabricmc.fabric.api.client.datagen.v1.provider.FabricModelProvider; | ||
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput; | ||
import net.minecraft.client.data.models.BlockModelGenerators; | ||
import net.minecraft.client.data.models.ItemModelGenerators; | ||
import net.minecraft.client.data.models.model.ModelTemplates; | ||
import net.minecraft.resources.ResourceKey; | ||
import net.minecraft.world.item.Item; | ||
import net.minecraft.world.item.equipment.EquipmentAsset; | ||
|
||
/** | ||
* @author Autovw | ||
*/ | ||
public class ModModelProvider extends FabricModelProvider | ||
{ | ||
public ModModelProvider(FabricDataOutput dataOutput) | ||
{ | ||
super(dataOutput); | ||
} | ||
|
||
@Override | ||
public void generateBlockStateModels(BlockModelGenerators generator) | ||
{ | ||
generator.createTrivialCube(ModBlocks.NETHERITE_IRON_BLOCK); | ||
generator.createTrivialCube(ModBlocks.NETHERITE_GOLD_BLOCK); | ||
generator.createTrivialCube(ModBlocks.NETHERITE_EMERALD_BLOCK); | ||
generator.createTrivialCube(ModBlocks.NETHERITE_DIAMOND_BLOCK); | ||
} | ||
|
||
@Override | ||
public void generateItemModels(ItemModelGenerators generator) | ||
{ | ||
itemModel(generator, ModItems.NETHERITE_IRON_INGOT); | ||
itemModel(generator, ModItems.NETHERITE_GOLD_INGOT); | ||
itemModel(generator, ModItems.NETHERITE_EMERALD_INGOT); | ||
itemModel(generator, ModItems.NETHERITE_DIAMOND_INGOT); | ||
|
||
armorModel(generator, ModItems.NETHERITE_IRON_HELMET, ModEquipmentAssets.NETHERITE_IRON); | ||
armorModel(generator, ModItems.NETHERITE_IRON_CHESTPLATE, ModEquipmentAssets.NETHERITE_IRON); | ||
armorModel(generator, ModItems.NETHERITE_IRON_LEGGINGS, ModEquipmentAssets.NETHERITE_IRON); | ||
armorModel(generator, ModItems.NETHERITE_IRON_BOOTS, ModEquipmentAssets.NETHERITE_IRON); | ||
|
||
armorModel(generator, ModItems.NETHERITE_GOLD_HELMET, ModEquipmentAssets.NETHERITE_GOLD); | ||
armorModel(generator, ModItems.NETHERITE_GOLD_CHESTPLATE, ModEquipmentAssets.NETHERITE_GOLD); | ||
armorModel(generator, ModItems.NETHERITE_GOLD_LEGGINGS, ModEquipmentAssets.NETHERITE_GOLD); | ||
armorModel(generator, ModItems.NETHERITE_GOLD_BOOTS, ModEquipmentAssets.NETHERITE_GOLD); | ||
|
||
armorModel(generator, ModItems.NETHERITE_EMERALD_HELMET, ModEquipmentAssets.NETHERITE_EMERALD); | ||
armorModel(generator, ModItems.NETHERITE_EMERALD_CHESTPLATE, ModEquipmentAssets.NETHERITE_EMERALD); | ||
armorModel(generator, ModItems.NETHERITE_EMERALD_LEGGINGS, ModEquipmentAssets.NETHERITE_EMERALD); | ||
armorModel(generator, ModItems.NETHERITE_EMERALD_BOOTS, ModEquipmentAssets.NETHERITE_EMERALD); | ||
|
||
armorModel(generator, ModItems.NETHERITE_DIAMOND_HELMET, ModEquipmentAssets.NETHERITE_DIAMOND); | ||
armorModel(generator, ModItems.NETHERITE_DIAMOND_CHESTPLATE, ModEquipmentAssets.NETHERITE_DIAMOND); | ||
armorModel(generator, ModItems.NETHERITE_DIAMOND_LEGGINGS, ModEquipmentAssets.NETHERITE_DIAMOND); | ||
armorModel(generator, ModItems.NETHERITE_DIAMOND_BOOTS, ModEquipmentAssets.NETHERITE_DIAMOND); | ||
|
||
toolModel(generator, ModItems.NETHERITE_IRON_AXE); | ||
toolModel(generator, ModItems.NETHERITE_GOLD_AXE); | ||
toolModel(generator, ModItems.NETHERITE_EMERALD_AXE); | ||
toolModel(generator, ModItems.NETHERITE_DIAMOND_AXE); | ||
|
||
toolModel(generator, ModItems.NETHERITE_IRON_HOE); | ||
toolModel(generator, ModItems.NETHERITE_GOLD_HOE); | ||
toolModel(generator, ModItems.NETHERITE_EMERALD_HOE); | ||
toolModel(generator, ModItems.NETHERITE_DIAMOND_HOE); | ||
|
||
toolModel(generator, ModItems.NETHERITE_IRON_PICKAXE); | ||
toolModel(generator, ModItems.NETHERITE_GOLD_PICKAXE); | ||
toolModel(generator, ModItems.NETHERITE_EMERALD_PICKAXE); | ||
toolModel(generator, ModItems.NETHERITE_DIAMOND_PICKAXE); | ||
|
||
toolModel(generator, ModItems.NETHERITE_IRON_SHOVEL); | ||
toolModel(generator, ModItems.NETHERITE_GOLD_SHOVEL); | ||
toolModel(generator, ModItems.NETHERITE_EMERALD_SHOVEL); | ||
toolModel(generator, ModItems.NETHERITE_DIAMOND_SHOVEL); | ||
|
||
toolModel(generator, ModItems.NETHERITE_IRON_SWORD); | ||
toolModel(generator, ModItems.NETHERITE_GOLD_SWORD); | ||
toolModel(generator, ModItems.NETHERITE_EMERALD_SWORD); | ||
toolModel(generator, ModItems.NETHERITE_DIAMOND_SWORD); | ||
} | ||
|
||
public void itemModel(ItemModelGenerators itemModels, Item item) | ||
{ | ||
itemModels.createFlatItemModel(item, ModelTemplates.FLAT_ITEM); | ||
} | ||
|
||
public void toolModel(ItemModelGenerators itemModels, Item item) | ||
{ | ||
itemModels.createFlatItemModel(item, ModelTemplates.FLAT_HANDHELD_ITEM); | ||
} | ||
|
||
public void armorModel(ItemModelGenerators itemModels, Item item, ResourceKey<EquipmentAsset> equipmentKey) | ||
{ | ||
itemModels.generateTrimmableItem(item, equipmentKey, equipmentKey.location().getPath(), false); | ||
} | ||
} |
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
48 changes: 0 additions & 48 deletions
48
.../src/main/java/com/autovw/advancednetherite/datagen/providers/ModBlockStatesProvider.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.