net.minecraftforge.fml.event.lifecycle.GatherDataEvent Java Examples

The following examples show how to use net.minecraftforge.fml.event.lifecycle.GatherDataEvent. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SurvivalistData.java    From Survivalist with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
public static void gatherData(GatherDataEvent event)
{
    DataGenerator gen = event.getGenerator();

    if (event.includeClient())
    {
        //gen.addProvider(new Lang(gen));
        //gen.addProvider(new ItemModels(gen, event.getExistingFileHelper()));
        //gen.addProvider(new BlockStates(gen, event.getExistingFileHelper()));
    }
    if (event.includeServer())
    {

        BlockTags blockTags = new BlockTags(gen);
        gen.addProvider(blockTags);
        gen.addProvider(new ItemTags(gen, blockTags));
        gen.addProvider(new Recipes(gen));
        gen.addProvider(new LootTables(gen));
    }
}
 
Example #2
Source File: Generator.java    From MiningGadgets with MIT License 5 votes vote down vote up
@SubscribeEvent
public static void gatherData(GatherDataEvent event) {
     if( event.includeServer() )
        registerServerProviders(event.getGenerator());

    if( event.includeClient() )
        registerClientProviders(event.getGenerator(), event);
}
 
Example #3
Source File: Generator.java    From MiningGadgets with MIT License 5 votes vote down vote up
private static void registerClientProviders(DataGenerator generator, GatherDataEvent event) {
    ExistingFileHelper helper = event.getExistingFileHelper();

    generator.addProvider(new GeneratorBlockStates(generator, helper));
    generator.addProvider(new GeneratorItemModels(generator, helper));
    generator.addProvider(new GeneratorLanguage(generator));
}
 
Example #4
Source File: DataGenerators.java    From EnderStorage with MIT License 5 votes vote down vote up
@SubscribeEvent
public static void gatherDataGenerators(GatherDataEvent event) {
    DataGenerator gen = event.getGenerator();
    ExistingFileHelper files = event.getExistingFileHelper();
    if (event.includeClient()) {
        gen.addProvider(new BlockStates(gen, files));
        gen.addProvider(new ItemModels(gen, files));
    }
}
 
Example #5
Source File: SurvivalistMod.java    From Survivalist with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
public void gatherData(GatherDataEvent event)
{
    SurvivalistData.gatherData(event);
}