use of cpw.mods.fml.common.registry.GameRegistry.UniqueIdentifier in project NewHorizonsCoreMod by GTNewHorizons.
the class CustomFuels method FindFuelValue.
public FuelItem FindFuelValue(ItemStack pItem) {
try {
Init();
if (pItem == null)
return null;
UniqueIdentifier UID = GameRegistry.findUniqueIdentifierFor(pItem.getItem());
String tCompareName = UID.toString();
if (pItem.getItemDamage() > 0)
tCompareName = String.format("%s:%d", tCompareName, pItem.getItemDamage());
for (FuelItem ifi : mFuelItems) {
if (ifi.mItemName.equalsIgnoreCase(tCompareName))
return ifi;
}
return null;
} catch (Exception e) {
return null;
}
}
Aggregations