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) {
|
if (registryName == null) {
|
||||||
final String path;
|
final String path;
|
||||||
final ItemStack itemStackOutput = recipe.getRecipeOutput();
|
final ItemStack itemStackOutput = recipe.getRecipeOutput();
|
||||||
|
assert itemStackOutput.getItem().getRegistryName() != null;
|
||||||
if (itemStackOutput.isEmpty()) {
|
if (itemStackOutput.isEmpty()) {
|
||||||
path = recipe.toString();
|
path = recipe.toString();
|
||||||
} else if (itemStackOutput.getCount() == 1) {
|
} else if (itemStackOutput.getCount() == 1) {
|
||||||
path = String.format("%s@%d%s",
|
path = String.format("%s@%d%s",
|
||||||
itemStackOutput.getItem().getRegistryName(),
|
itemStackOutput.getItem().getRegistryName().getPath(),
|
||||||
itemStackOutput.getItemDamage(),
|
itemStackOutput.getItemDamage(),
|
||||||
suffix );
|
suffix );
|
||||||
} else {
|
} else {
|
||||||
path = String.format("%s@%dx%d%s",
|
path = String.format("%s@%dx%d%s",
|
||||||
itemStackOutput.getItem().getRegistryName(),
|
itemStackOutput.getItem().getRegistryName().getPath(),
|
||||||
itemStackOutput.getItemDamage(),
|
itemStackOutput.getItemDamage(),
|
||||||
itemStackOutput.getCount(),
|
itemStackOutput.getCount(),
|
||||||
suffix );
|
suffix );
|
||||||
|
|
Loading…
Add table
Reference in a new issue