use of blusunrize.immersiveengineering.common.items.ItemIEBase in project ImmersiveEngineering by BluSunrize.
the class ImmersiveModelRegistry method registerCustomItemModel.
public void registerCustomItemModel(ItemStack stack, ItemModelReplacement replacement) {
if (stack.getItem() instanceof ItemIEBase) {
ResourceLocation loc;
if (((ItemIEBase) stack.getItem()).getSubNames() != null && ((ItemIEBase) stack.getItem()).getSubNames().length > 0)
loc = new ResourceLocation("immersiveengineering", ((ItemIEBase) stack.getItem()).itemName + "/" + ((ItemIEBase) stack.getItem()).getSubNames()[stack.getItemDamage()]);
else
loc = new ResourceLocation("immersiveengineering", ((ItemIEBase) stack.getItem()).itemName);
itemModelReplacements.put(new ModelResourceLocation(loc, "inventory"), replacement);
}
}
Aggregations