public static void registerItemMetas(Item item, int maxExclusive, IntFunction<String> metaToName) { for (int i = 0; i < maxExclusive; i++) { ModelLoader.setCustomModelResourceLocation( item, i, new ModelResourceLocation(LibMisc.MOD_ID + ":" + metaToName.apply(i), "inventory") ); } }
@SideOnly(Side.CLIENT) @Override public void registerModels() { ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation("botania:vial", "inventory")); ModelLoader.setCustomModelResourceLocation(this, 1, new ModelResourceLocation("botania:flask", "inventory")); }
public static void registerCustomItemblock(Block b, int maxExclusive, IntFunction<String> metaToPath) { Item item = Item.getItemFromBlock(b); for (int i = 0; i < maxExclusive; i++) { ModelLoader.setCustomModelResourceLocation( item, i, new ModelResourceLocation(LibMisc.MOD_ID + ":itemblock/" + metaToPath.apply(i), "inventory") ); } }
@SideOnly(Side.CLIENT) @Override public void registerModels() { for (int i = 0; i < LibItemNames.MANA_RESOURCE_NAMES.length; i++) { if (!"UNUSED".equals(LibItemNames.MANA_RESOURCE_NAMES[i])) { ModelLoader.setCustomModelResourceLocation( this, i, new ModelResourceLocation(LibMisc.MOD_ID + ":" + LibItemNames.MANA_RESOURCE_NAMES[i], "inventory") ); } } }
public static void registerBlockToState(Block b, int meta, IBlockState state) { ModelLoader.setCustomModelResourceLocation( Item.getItemFromBlock(b), meta, getMrlForState(state) ); }
/** Registers the item-meta combo in the itemstack with the given location for the inventory-variant */ public static void registerItemModel(ItemStack itemStack, ResourceLocation name) { if(!itemStack.isEmpty() && name != null) { // tell the loader to load the model ModelLoader.registerItemVariants(itemStack.getItem(), name); // tell the game which model to use for this item-meta combination ModelLoader.setCustomModelResourceLocation(itemStack.getItem(), itemStack.getMetadata(), new ModelResourceLocation(name, VARIANT_INVENTORY)); } }
/** Registers the given item/meta combination with the model at the given location, and the given variant */ public static void registerItemModel(Item item, int meta, ResourceLocation location, String variant) { if(item != null && !StringUtils.isNullOrEmpty(variant)) { //ModelLoader.registerItemVariants(item, location); ModelLoader.setCustomModelResourceLocation(item, meta, new ModelResourceLocation(item.getRegistryName(), variant)); } }
@SideOnly(Side.CLIENT) @Override public void registerModels() { ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(getRegistryName(), "inventory")); } }
@SideOnly(Side.CLIENT) @Override public void registerModels() { ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(getRegistryName(), "inventory")); } }
@SideOnly(Side.CLIENT) @Override public void registerModels() { ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(getRegistryName(), "inventory")); }
@SideOnly(Side.CLIENT) @Override public void registerModels() { ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(getRegistryName(), "inventory")); } }
@SideOnly(Side.CLIENT) @Override public void registerModels() { ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(getRegistryName(), "inventory")); } }
@SideOnly(Side.CLIENT) @Override public void registerModels() { ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(getRegistryName(), "inventory")); } }
@SideOnly(Side.CLIENT) @Override public void registerModels() { ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(getRegistryName(), "inventory")); } }
@SideOnly(Side.CLIENT) @Override public void registerModels() { ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(getRegistryName(), "inventory")); } }
@SideOnly(Side.CLIENT) @Override public void registerModels() { ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(getRegistryName(), "inventory")); } }
@SideOnly(Side.CLIENT) @Override public void registerModels() { ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(getRegistryName(), "inventory")); } }
@SideOnly(Side.CLIENT) @Override public void registerModels() { ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(getRegistryName(), "inventory")); } }
public static void registerInventoryVariant(Block b) { ModelLoader.setCustomModelResourceLocation( Item.getItemFromBlock(b), 0, new ModelResourceLocation(b.getRegistryName(), "inventory")); }
@SideOnly(Side.CLIENT) @Override public void registerModels() { ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(this), 0, new ModelResourceLocation(getRegistryName(), "inventory")); } }