More Items#lookup improvements

This commit is contained in:
Auxilor
2021-09-02 10:46:25 +01:00
parent 9403a1cbcb
commit 5142b9ce92

View File

@@ -119,11 +119,14 @@ public final class Items {
boolean usingNewStackFormat = false;
if (args.length >= 2) {
try {
int amount = Integer.parseInt(args[1]);
usingNewStackFormat = true;
item = item == null ? new EmptyTestableItem() : new TestableStack(item, amount);
} catch (NumberFormatException ignored) { }
if (!(item instanceof TestableStack)) {
try {
int amount = Integer.parseInt(args[1]);
usingNewStackFormat = true;
item = item == null ? new EmptyTestableItem() : new TestableStack(item, amount);
} catch (NumberFormatException ignored) {
}
}
}
if (item == null || item instanceof EmptyTestableItem) {