Update ItemUtil.java
This commit is contained in:
parent
0a82a8c4be
commit
9e067499eb
1 changed files with 1 additions and 0 deletions
|
@ -29,6 +29,7 @@ public class ItemUtil {
|
|||
|
||||
@Nullable
|
||||
public static ItemStack fromStackString(String stackString) {
|
||||
if (stackString == null || stackString.equals("")) return null;
|
||||
String[] parts = stackString.split(":");
|
||||
Identifier itemId = new Identifier(parts[0], parts[1]);
|
||||
Item item = Registry.ITEM.getOrEmpty(itemId).orElse(null);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue