net.minecraft.data.DataGenerator Java Examples

The following examples show how to use net.minecraft.data.DataGenerator. 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: GatherDataEvent.java    From patchwork-api with GNU Lesser General Public License v2.1 5 votes vote down vote up
public DataGenerator makeGenerator(final Function<Path, Path> pathEnhancer, final boolean shouldExecute) {
	final DataGenerator generator = new DataGenerator(pathEnhancer.apply(path), inputs);

	if (shouldExecute) {
		generators.add(generator);
	}

	return generator;
}
 
Example #2
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 #3
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 #4
Source File: GatherDataEvent.java    From patchwork-api with GNU Lesser General Public License v2.1 4 votes vote down vote up
public GatherDataEvent(final ModContainer modContainer, final DataGenerator dataGenerator, final DataGeneratorConfig dataGeneratorConfig, ExistingFileHelper existingFileHelper) {
	super(modContainer);
	this.dataGenerator = dataGenerator;
	this.config = dataGeneratorConfig;
	this.existingFileHelper = existingFileHelper;
}
 
Example #5
Source File: GatherDataEvent.java    From patchwork-api with GNU Lesser General Public License v2.1 4 votes vote down vote up
public DataGenerator getGenerator() {
	return this.dataGenerator;
}
 
Example #6
Source File: GatherDataEvent.java    From patchwork-api with GNU Lesser General Public License v2.1 4 votes vote down vote up
public void runAll() throws IOException {
	for (DataGenerator generator : generators) {
		generator.run();
	}
}
 
Example #7
Source File: GeneratorItemModels.java    From MiningGadgets with MIT License 4 votes vote down vote up
public GeneratorItemModels(DataGenerator generator, ExistingFileHelper existingFileHelper) {
    super(generator, MiningGadgets.MOD_ID, existingFileHelper);
}
 
Example #8
Source File: GeneratorRecipes.java    From MiningGadgets with MIT License 4 votes vote down vote up
public GeneratorRecipes(DataGenerator generator) {
    super(generator);
}
 
Example #9
Source File: GeneratorLanguage.java    From MiningGadgets with MIT License 4 votes vote down vote up
public GeneratorLanguage(DataGenerator gen) {
    super(gen, MiningGadgets.MOD_ID, "en_us");
}
 
Example #10
Source File: GeneratorLoot.java    From MiningGadgets with MIT License 4 votes vote down vote up
public GeneratorLoot(DataGenerator generator) {
    super(generator);
}
 
Example #11
Source File: Generator.java    From MiningGadgets with MIT License 4 votes vote down vote up
private static void registerServerProviders(DataGenerator generator) {
    generator.addProvider(new GeneratorLoot(generator));
    generator.addProvider(new GeneratorRecipes(generator));
}
 
Example #12
Source File: GeneratorBlockStates.java    From MiningGadgets with MIT License 4 votes vote down vote up
public GeneratorBlockStates(DataGenerator gen, ExistingFileHelper exFileHelper) {
    super(gen, MiningGadgets.MOD_ID, exFileHelper);
}
 
Example #13
Source File: DataGenerators.java    From EnderStorage with MIT License 4 votes vote down vote up
public ItemModels(DataGenerator generator, ExistingFileHelper existingFileHelper) {
    super(generator, MOD_ID, existingFileHelper);
}
 
Example #14
Source File: DataGenerators.java    From EnderStorage with MIT License 4 votes vote down vote up
public BlockStates(DataGenerator gen, ExistingFileHelper exFileHelper) {
    super(gen, MOD_ID, exFileHelper);
}