-
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.
Using datagenerator for block and item models & blockstates as well a…
…s starting ItemTags
- Loading branch information
Leronus
committed
Jan 29, 2024
1 parent
7dbbf04
commit 8c80428
Showing
2,983 changed files
with
7,599 additions
and
31,169 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package mod.leronus.mores; | ||
|
||
import net.fabricmc.api.ClientModInitializer; | ||
|
||
public class MoresClient implements ClientModInitializer { | ||
@Override | ||
public void onInitializeClient() { | ||
// HandledScreens.register(ModScreenHandlers.ALLOY_FURNACE_SCREEN_HANDLER, AlloyFurnaceScreen::new); | ||
|
||
// BlockEntityRendererFactories.register(ModBlockEntities.ALLOY_FURNACE_BLOCK_ENTITY, AlloyFurnaceBlockEntityRenderer::new); | ||
} | ||
} |
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,11 +1,30 @@ | ||
package mod.leronus.mores; | ||
|
||
import mod.leronus.mores.datagen.ModItemTagProvider; | ||
import mod.leronus.mores.datagen.ModModelProvider; | ||
import net.fabricmc.fabric.api.datagen.v1.DataGeneratorEntrypoint; | ||
import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator; | ||
import net.minecraft.registry.RegistryBuilder; | ||
import net.minecraft.registry.RegistryKeys; | ||
|
||
public class MoresDataGenerator implements DataGeneratorEntrypoint { | ||
@Override | ||
public void onInitializeDataGenerator(FabricDataGenerator fabricDataGenerator) { | ||
FabricDataGenerator.Pack pack = fabricDataGenerator.createPack(); | ||
|
||
// pack.addProvider(ModBlockTagProvider::new); | ||
pack.addProvider(ModItemTagProvider::new); | ||
// pack.addProvider(ModBlockLootTableGenerator::new); | ||
pack.addProvider(ModModelProvider::new); | ||
// pack.addProvider(ModRecipeGenerator::new); | ||
// pack.addProvider(ModPaintingVariantTagProvider::new); | ||
// pack.addProvider(ModAdvancementProvider::new); | ||
// pack.addProvider(ModWorldGenerator::new); | ||
} | ||
} | ||
|
||
@Override | ||
public void buildRegistry(RegistryBuilder registryBuilder) { | ||
// registryBuilder.addRegistry(RegistryKeys.CONFIGURED_FEATURE, ModConfiguredFeatures::bootstrap); | ||
// registryBuilder.addRegistry(RegistryKeys.PLACED_FEATURE, ModPlacedFeatures::bootstrap); | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
src/main/java/mod/leronus/mores/datagen/ModItemTagProvider.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,49 @@ | ||
package mod.leronus.mores.datagen; | ||
|
||
import mod.leronus.mores.item.ModItems; | ||
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput; | ||
import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider; | ||
import net.minecraft.registry.RegistryWrapper; | ||
import net.minecraft.registry.tag.ItemTags; | ||
|
||
import java.util.concurrent.CompletableFuture; | ||
|
||
public class ModItemTagProvider extends FabricTagProvider.ItemTagProvider { | ||
public ModItemTagProvider(FabricDataOutput output, CompletableFuture<RegistryWrapper.WrapperLookup> completableFuture) { | ||
super(output, completableFuture); | ||
} | ||
|
||
@Override | ||
protected void configure(RegistryWrapper.WrapperLookup arg) { | ||
getOrCreateTagBuilder(ItemTags.TRIMMABLE_ARMOR) | ||
.add( | ||
ModItems.SILVER_HELMET, ModItems.SILVER_CHESTPLATE, ModItems.SILVER_LEGGINGS, ModItems.SILVER_BOOTS, | ||
ModItems.COPPER_HELMET, ModItems.COPPER_CHESTPLATE, ModItems.COPPER_LEGGINGS, ModItems.COPPER_BOOTS, | ||
ModItems.BRONZE_HELMET, ModItems.BRONZE_CHESTPLATE, ModItems.BRONZE_LEGGINGS, ModItems.BRONZE_BOOTS, | ||
ModItems.TIN_HELMET, ModItems.TIN_CHESTPLATE, ModItems.TIN_LEGGINGS, ModItems.TIN_BOOTS, | ||
ModItems.STERLING_HELMET, ModItems.STERLING_CHESTPLATE, ModItems.STERLING_LEGGINGS, ModItems.STERLING_BOOTS, | ||
ModItems.STEEL_HELMET, ModItems.STEEL_CHESTPLATE, ModItems.STEEL_LEGGINGS, ModItems.STEEL_BOOTS, | ||
ModItems.AMETHYST_HELMET, ModItems.AMETHYST_CHESTPLATE, ModItems.AMETHYST_LEGGINGS, ModItems.AMETHYST_BOOTS, | ||
ModItems.EMERALD_HELMET, ModItems.EMERALD_CHESTPLATE, ModItems.EMERALD_LEGGINGS, ModItems.EMERALD_BOOTS, | ||
ModItems.TOURMALINE_HELMET, ModItems.TOURMALINE_CHESTPLATE, ModItems.TOURMALINE_LEGGINGS, ModItems.TOURMALINE_BOOTS, | ||
ModItems.TOPAZ_HELMET, ModItems.TOPAZ_CHESTPLATE, ModItems.TOPAZ_LEGGINGS, ModItems.TOPAZ_BOOTS, | ||
ModItems.RUBY_HELMET, ModItems.RUBY_CHESTPLATE, ModItems.RUBY_LEGGINGS, ModItems.RUBY_BOOTS, | ||
ModItems.SAPPHIRE_HELMET, ModItems.SAPPHIRE_CHESTPLATE, ModItems.SAPPHIRE_LEGGINGS, ModItems.SAPPHIRE_BOOTS, | ||
ModItems.TANZANITE_HELMET, ModItems.TANZANITE_CHESTPLATE, ModItems.TANZANITE_LEGGINGS, ModItems.TANZANITE_BOOTS, | ||
ModItems.TURQUOISE_HELMET, ModItems.TURQUOISE_CHESTPLATE, ModItems.TURQUOISE_LEGGINGS, ModItems.TURQUOISE_BOOTS, | ||
ModItems.MOISSANITE_HELMET, ModItems.MOISSANITE_CHESTPLATE, ModItems.MOISSANITE_LEGGINGS, ModItems.MOISSANITE_BOOTS, | ||
ModItems.ONYX_HELMET, ModItems.ONYX_CHESTPLATE, ModItems.ONYX_LEGGINGS, ModItems.ONYX_BOOTS, | ||
ModItems.GRAPHENE_HELMET, ModItems.GRAPHENE_CHESTPLATE, ModItems.GRAPHENE_LEGGINGS, ModItems.GRAPHENE_BOOTS | ||
); | ||
|
||
// getOrCreateTagBuilder(ItemTags.MUSIC_DISCS) | ||
// .add(ModItems.SWEET_CAROLINE_MUSIC_DISC); | ||
|
||
// getOrCreateTagBuilder(ItemTags.IRON_ORES) | ||
// .add(ModBlocks.SILVER_ORE.asItem()); | ||
// | ||
// getOrCreateTagBuilder(ItemTags.DIAMOND_ORES) | ||
// .add(ModBlocks.TURQUOISE_ORE.asItem()); | ||
// | ||
} | ||
} |
Oops, something went wrong.