Search in sources :

Example 1 with ModifierRecipeProvider

use of slimeknights.tconstruct.tools.data.ModifierRecipeProvider in project TinkersConstruct by SlimeKnights.

the class TinkerTools method gatherData.

@SubscribeEvent
void gatherData(final GatherDataEvent event) {
    DataGenerator generator = event.getGenerator();
    if (event.includeServer()) {
        generator.addProvider(new ToolsRecipeProvider(generator));
        generator.addProvider(new MaterialRecipeProvider(generator));
        generator.addProvider(new ModifierRecipeProvider(generator));
        MaterialDataProvider materials = new MaterialDataProvider(generator);
        generator.addProvider(materials);
        generator.addProvider(new MaterialStatsDataProvider(generator, materials));
        generator.addProvider(new MaterialTraitsDataProvider(generator, materials));
        generator.addProvider(new ToolDefinitionDataProvider(generator));
        generator.addProvider(new StationSlotLayoutProvider(generator));
    }
    if (event.includeClient()) {
        ExistingFileHelper existingFileHelper = event.getExistingFileHelper();
        TinkerMaterialSpriteProvider materialSprites = new TinkerMaterialSpriteProvider();
        TinkerPartSpriteProvider partSprites = new TinkerPartSpriteProvider();
        generator.addProvider(new MaterialRenderInfoProvider(generator, materialSprites));
        generator.addProvider(new GeneratorPartTextureJsonGenerator(generator, TConstruct.MOD_ID, partSprites));
        generator.addProvider(new MaterialPartTextureGenerator(generator, existingFileHelper, partSprites, materialSprites));
    }
}
Also used : TinkerMaterialSpriteProvider(slimeknights.tconstruct.tools.data.sprite.TinkerMaterialSpriteProvider) MaterialDataProvider(slimeknights.tconstruct.tools.data.material.MaterialDataProvider) MaterialPartTextureGenerator(slimeknights.tconstruct.library.client.data.material.MaterialPartTextureGenerator) ToolDefinitionDataProvider(slimeknights.tconstruct.tools.data.ToolDefinitionDataProvider) ExistingFileHelper(net.minecraftforge.common.data.ExistingFileHelper) MaterialRecipeProvider(slimeknights.tconstruct.tools.data.material.MaterialRecipeProvider) DataGenerator(net.minecraft.data.DataGenerator) MaterialRenderInfoProvider(slimeknights.tconstruct.tools.data.material.MaterialRenderInfoProvider) ModifierRecipeProvider(slimeknights.tconstruct.tools.data.ModifierRecipeProvider) MaterialStatsDataProvider(slimeknights.tconstruct.tools.data.material.MaterialStatsDataProvider) MaterialTraitsDataProvider(slimeknights.tconstruct.tools.data.material.MaterialTraitsDataProvider) ToolsRecipeProvider(slimeknights.tconstruct.tools.data.ToolsRecipeProvider) StationSlotLayoutProvider(slimeknights.tconstruct.tools.data.StationSlotLayoutProvider) GeneratorPartTextureJsonGenerator(slimeknights.tconstruct.library.client.data.material.GeneratorPartTextureJsonGenerator) TinkerPartSpriteProvider(slimeknights.tconstruct.tools.data.sprite.TinkerPartSpriteProvider) SubscribeEvent(net.minecraftforge.eventbus.api.SubscribeEvent)

Aggregations

DataGenerator (net.minecraft.data.DataGenerator)1 ExistingFileHelper (net.minecraftforge.common.data.ExistingFileHelper)1 SubscribeEvent (net.minecraftforge.eventbus.api.SubscribeEvent)1 GeneratorPartTextureJsonGenerator (slimeknights.tconstruct.library.client.data.material.GeneratorPartTextureJsonGenerator)1 MaterialPartTextureGenerator (slimeknights.tconstruct.library.client.data.material.MaterialPartTextureGenerator)1 ModifierRecipeProvider (slimeknights.tconstruct.tools.data.ModifierRecipeProvider)1 StationSlotLayoutProvider (slimeknights.tconstruct.tools.data.StationSlotLayoutProvider)1 ToolDefinitionDataProvider (slimeknights.tconstruct.tools.data.ToolDefinitionDataProvider)1 ToolsRecipeProvider (slimeknights.tconstruct.tools.data.ToolsRecipeProvider)1 MaterialDataProvider (slimeknights.tconstruct.tools.data.material.MaterialDataProvider)1 MaterialRecipeProvider (slimeknights.tconstruct.tools.data.material.MaterialRecipeProvider)1 MaterialRenderInfoProvider (slimeknights.tconstruct.tools.data.material.MaterialRenderInfoProvider)1 MaterialStatsDataProvider (slimeknights.tconstruct.tools.data.material.MaterialStatsDataProvider)1 MaterialTraitsDataProvider (slimeknights.tconstruct.tools.data.material.MaterialTraitsDataProvider)1 TinkerMaterialSpriteProvider (slimeknights.tconstruct.tools.data.sprite.TinkerMaterialSpriteProvider)1 TinkerPartSpriteProvider (slimeknights.tconstruct.tools.data.sprite.TinkerPartSpriteProvider)1