use of net.minecraft.client.renderer.block.model.ModelResourceLocation in project Bewitchment by Um-Mitternacht.
the class ItemBroom method registerModel.
@Override
public void registerModel() {
for (int i = 0; i < EnumSaplingType.values().length + 1; i++) {
String ext = i == 0 ? "mundane" : EnumSaplingType.values()[i - 1].getName();
ModelResourceLocation modelResourceLocation = new ModelResourceLocation(this.getRegistryName() + "_" + ext, "inventory");
ModelLoader.setCustomModelResourceLocation(this, i, modelResourceLocation);
}
}
use of net.minecraft.client.renderer.block.model.ModelResourceLocation in project Bewitchment by Um-Mitternacht.
the class ModelHandler method registerModel.
public static <T extends Enum<T> & IStringSerializable> void registerModel(Item item, Class<T> clazz) {
for (T t : clazz.getEnumConstants()) {
ResourceLocation location = new ResourceLocation(item.getRegistryName() + "_" + t.getName());
ModelResourceLocation modelResourceLocation = new ModelResourceLocation(location, "inventory");
ModelLoader.setCustomModelResourceLocation(item, t.ordinal(), modelResourceLocation);
}
}
use of net.minecraft.client.renderer.block.model.ModelResourceLocation in project Bewitchment by Um-Mitternacht.
the class ModelHandler method registerModel.
public static void registerModel(Item item, int meta) {
ModelResourceLocation modelResourceLocation = new ModelResourceLocation(item.getRegistryName(), "inventory");
ModelLoader.setCustomModelResourceLocation(item, meta, modelResourceLocation);
}
use of net.minecraft.client.renderer.block.model.ModelResourceLocation in project Bewitchment by Um-Mitternacht.
the class ItemGemPowder method registerModel.
@Override
@SideOnly(Side.CLIENT)
public void registerModel() {
for (int i = 0; i < names.length; i++) {
ResourceLocation rl = new ResourceLocation(this.getRegistryName().getResourceDomain(), "powders/" + this.getRegistryName().getResourcePath() + "_" + names[i]);
ModelResourceLocation mrl = new ModelResourceLocation(rl, "inventory");
ModelLoader.setCustomModelResourceLocation(this, i, mrl);
}
}
use of net.minecraft.client.renderer.block.model.ModelResourceLocation in project Bewitchment by Um-Mitternacht.
the class BlockBarrel method registerModel.
@Override
public void registerModel() {
for (WoodType wt : WoodType.values()) {
ModelResourceLocation modelResourceLocation = new ModelResourceLocation(this.getRegistryName() + "_" + wt.getName(), "inventory");
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(this), wt.ordinal(), modelResourceLocation);
}
}
Aggregations