-
-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
find_empty_slots
tag
#2485
find_empty_slots
tag
#2485
Conversation
return new ListTag(); | ||
} | ||
ListTag indexes = new ListTag(object.getContents().length); | ||
// Denizen starts at 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is stating the obvious and does not need to be here
// Denizen starts at 1 | ||
int index = 1; | ||
for (ItemStack itemStack : object.getContents()) { | ||
if (itemStack == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should || type == air
, I don't think there's any guarantee that air items have to become null.
Done 👍 |
|
||
// <--[tag] | ||
// @attribute <InventoryTag.find_empty_slots> | ||
// @returns ListTag(Number) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should just be ListTag
<InventoryTag.find_empty_slots>
Returns the index of each empty slot in an inventory.
Requested by Krilliant