Update ItemUtil.java

This commit is contained in:
Aleksey 2020-12-27 15:57:21 +03:00
parent 0a82a8c4be
commit 9e067499eb

View file

@ -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);