ActuallyAdditions/src/main/java/de/ellpeck/actuallyadditions/data/GeneratorItemModels.java

30 lines
968 B
Java
Raw Normal View History

2020-11-01 15:11:04 +01:00
package de.ellpeck.actuallyadditions.data;
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
import net.minecraft.block.Block;
import net.minecraft.data.DataGenerator;
import net.minecraftforge.client.model.generators.ExistingFileHelper;
import net.minecraftforge.client.model.generators.ItemModelProvider;
import net.minecraftforge.client.model.generators.ModelFile;
public class GeneratorItemModels extends ItemModelProvider {
public GeneratorItemModels(DataGenerator generator, ExistingFileHelper existingFileHelper) {
super(generator, ActuallyAdditions.MOD_ID, existingFileHelper);
}
@Override
protected void registerModels() {
}
private void registerBlockModel(Block block) {
String path = block.getRegistryName().getPath();
getBuilder(path).parent(new ModelFile.UncheckedModelFile(modLoc("block/" + path)));
}
@Override
public String getName() {
return "Item Models";
}
}