Skip to content

Commit

Permalink
#29 Bug in challenges
Browse files Browse the repository at this point in the history
  • Loading branch information
rlf committed Dec 11, 2014
1 parent 1a0c6d8 commit d131758
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,13 @@ private boolean islandContains(Player player, List<ItemStack> itemStacks, int ra
for (int y = py - radius; y <= py + radius; y++) {
for (int z = pz - radius; z <= pz + radius; z++) {
Block block = world.getBlockAt(x, y, z);
blockCount[block.getTypeId() << 8 + block.getData()]++;
blockCount[(block.getTypeId() << 8) + (block.getData() & 0xff)]++;
baseBlocks[block.getTypeId()]++;
}
}
}
for (ItemStack item : itemStacks) {
if (item.getDurability() != 0 && blockCount[item.getTypeId() << 8 + item.getDurability()] < item.getAmount()) {
if (item.getDurability() != 0 && blockCount[(item.getTypeId() << 8) + (item.getDurability() & 0xff)] < item.getAmount()) {
return false;
} else if (baseBlocks[item.getTypeId()] < item.getAmount()) {
return false;
Expand Down

0 comments on commit d131758

Please sign in to comment.