Skip to content

Commit

Permalink
Fix present randomization
Browse files Browse the repository at this point in the history
  • Loading branch information
copygirl committed Dec 13, 2014
1 parent e82d4b3 commit 69d70ec
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void onPlayerLogin(PlayerLoggedInEvent event) {

ItemStack[] contents = new ItemStack[ItemCardboardBox.getRows() * 9];
for (int j = 0; ((j < contents.length) && !items.isEmpty()); j++)
if (RandomUtils.getBoolean(1.0 / (contents.length - items.size() - j + 1)))
if (RandomUtils.getBoolean((double)items.size() / (contents.length - j)))
contents[j] = items.remove(RandomUtils.getInt(items.size()));
StackUtils.setStackContents(present, contents);

Expand Down

0 comments on commit 69d70ec

Please sign in to comment.