use of gregtech.api.items.metaitem.stats.IItemDurabilityManager in project GregTech by GregTechCE.
the class TurbineRotorBehavior method getInstanceFor.
public static TurbineRotorBehavior getInstanceFor(ItemStack itemStack) {
if (!(itemStack.getItem() instanceof MetaItem)) {
return null;
}
MetaItem<?> metaItem = (MetaItem<?>) itemStack.getItem();
MetaValueItem valueItem = metaItem.getItem(itemStack);
if (valueItem == null) {
return null;
}
IItemDurabilityManager durabilityManager = valueItem.getDurabilityManager();
if (!(durabilityManager instanceof TurbineRotorBehavior)) {
return null;
}
return (TurbineRotorBehavior) durabilityManager;
}
Aggregations