Improved recipes naming logic
This commit is contained in:
parent
03b01c2057
commit
9401258fca
1 changed files with 3 additions and 2 deletions
|
@ -838,16 +838,17 @@ public class WarpDrive {
|
|||
if (registryName == null) {
|
||||
final String path;
|
||||
final ItemStack itemStackOutput = recipe.getRecipeOutput();
|
||||
assert itemStackOutput.getItem().getRegistryName() != null;
|
||||
if (itemStackOutput.isEmpty()) {
|
||||
path = recipe.toString();
|
||||
} else if (itemStackOutput.getCount() == 1) {
|
||||
path = String.format("%s@%d%s",
|
||||
itemStackOutput.getItem().getRegistryName(),
|
||||
itemStackOutput.getItem().getRegistryName().getPath(),
|
||||
itemStackOutput.getItemDamage(),
|
||||
suffix );
|
||||
} else {
|
||||
path = String.format("%s@%dx%d%s",
|
||||
itemStackOutput.getItem().getRegistryName(),
|
||||
itemStackOutput.getItem().getRegistryName().getPath(),
|
||||
itemStackOutput.getItemDamage(),
|
||||
itemStackOutput.getCount(),
|
||||
suffix );
|
||||
|
|
Loading…
Reference in a new issue