init
This commit is contained in:
commit
2efd7d3943
24
src/main/java/com/jenny/datagen/ModItemModelProvider.java
Normal file
24
src/main/java/com/jenny/datagen/ModItemModelProvider.java
Normal file
@ -0,0 +1,24 @@
|
||||
package com.jenny.datagen;
|
||||
|
||||
import net.minecraft.data.PackOutput;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraftforge.client.model.generators.ItemModelBuilder;
|
||||
import net.minecraftforge.client.model.generators.ItemModelProvider;
|
||||
import net.minecraftforge.common.data.ExistingFileHelper;
|
||||
import net.minecraftforge.registries.RegistryObject;
|
||||
|
||||
abstract public class ModItemModelProvider extends ItemModelProvider {
|
||||
|
||||
public ModItemModelProvider(String modID, PackOutput output, ExistingFileHelper existingFileHelper) {
|
||||
super(output, modID, existingFileHelper);
|
||||
}
|
||||
@Override
|
||||
public abstract void registerModels();
|
||||
|
||||
protected ItemModelBuilder simpleItem(RegistryObject<Item> item) {
|
||||
return withExistingParent(item.getId().getPath(),
|
||||
new ResourceLocation("item/generated")).texture("layer0",
|
||||
new ResourceLocation(this.modid,"item/" + item.getId().getPath()));
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user