mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-17 19:05:16 +00:00
1 parent
a9cc76576a
commit
5cdd2ee32f
1 file changed
+2
-2
@@ -56,14 +56,14 @@ public final class LexiconRecipeMappings {
|
||||
return mappings.get(stackToString(stack));
|
||||
}
|
||||
|
||||
private static String stackToString(ItemStack stack) {
|
||||
public static String stackToString(ItemStack stack) {
|
||||
if(stack == null || stack.getItem() == null)
|
||||
return "NULL";
|
||||
|
||||
if(stack.hasTagCompound() && stack.getItem() instanceof IRecipeKeyProvider)
|
||||
return ((IRecipeKeyProvider) stack.getItem()).getKey(stack);
|
||||
|
||||
return stack.getItem().getRegistryName().toString() + (ignoreMeta(stack) ? "" : "~" + stack.getItemDamage());
|
||||
return stack.getUnlocalizedName() + (ignoreMeta(stack) ? "" : "~" + stack.getItemDamage());
|
||||
}
|
||||
|
||||
public static boolean ignoreMeta(ItemStack stack) {
|
||||
|
||||
Reference in new issue
Block a user