Skip to content

Commit

Permalink
Allows setting custom item amounts (even with TranslatableItem refere…
Browse files Browse the repository at this point in the history
…nces) in BlobInventories and MetaBlobInventories
  • Loading branch information
anjoismysign committed Jul 1, 2024
1 parent 7616384 commit 1371605
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ public static BlobMultiSlotable read(ConfigurationSection section, String key,
}
itemStack = ItemStackReader.getInstance().readOrFailFast(itemStackSection);
}
if (section.isInt("Amount")) {
int amount = section.getInt("Amount");
itemStack.setAmount(amount);
}
String read = section.getString("Slot", "-1");
Set<Integer> set = IntegerRange.getInstance().parse(read);
String hasPermission = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ public static MetaBlobMultiSlotable read(ConfigurationSection section, String ke
}
itemStack = ItemStackReader.getInstance().readOrFailFast(itemStackSection);
}
if (section.isInt("Amount")) {
int amount = section.getInt("Amount");
itemStack.setAmount(amount);
}
String read = section.getString("Slot", "-1");
Set<Integer> set = IntegerRange.getInstance().parse(read);
String meta = section.getString("Meta", "NONE");
Expand Down

0 comments on commit 1371605

Please sign in to comment.