Don't need chance anymore.

This commit is contained in:
GJ 2013-02-17 01:26:47 -05:00
parent 946513cb66
commit 8a795e6091
5 changed files with 15 additions and 15 deletions

View File

@ -204,7 +204,7 @@ public class Herbalism {
int maximumDropAmount = customBlock.getMaximumDropAmount(); int maximumDropAmount = customBlock.getMaximumDropAmount();
if (minimumDropAmount != maximumDropAmount) { if (minimumDropAmount != maximumDropAmount) {
Misc.randomDropItems(location, dropItem, 50, maximumDropAmount - minimumDropAmount); Misc.randomDropItems(location, dropItem, maximumDropAmount - minimumDropAmount);
} }
Misc.dropItems(location, dropItem, minimumDropAmount); Misc.dropItems(location, dropItem, minimumDropAmount);

View File

@ -225,7 +225,7 @@ public class Mining {
if (config.getGlowstoneDoubleDropsEnabled()) { if (config.getGlowstoneDoubleDropsEnabled()) {
item = new ItemStack(Material.GLOWSTONE_DUST); item = new ItemStack(Material.GLOWSTONE_DUST);
Misc.dropItems(location, item, 2); Misc.dropItems(location, item, 2);
Misc.randomDropItems(location, item, 50, 2); Misc.randomDropItems(location, item, 2);
} }
break; break;
@ -245,7 +245,7 @@ public class Mining {
if (config.getLapisDoubleDropsEnabled()) { if (config.getLapisDoubleDropsEnabled()) {
item = new ItemStack(Material.INK_SACK, 1, DyeColor.BLUE.getDyeData()); item = new ItemStack(Material.INK_SACK, 1, DyeColor.BLUE.getDyeData());
Misc.dropItems(location, item, 4); Misc.dropItems(location, item, 4);
Misc.randomDropItems(location, item, 50, 4); Misc.randomDropItems(location, item, 4);
} }
break; break;
@ -297,7 +297,7 @@ public class Mining {
if (minimumDropAmount != maximumDropAmount) { if (minimumDropAmount != maximumDropAmount) {
Misc.dropItems(location, item, minimumDropAmount); Misc.dropItems(location, item, minimumDropAmount);
Misc.randomDropItems(location, item, 50, maximumDropAmount - minimumDropAmount); Misc.randomDropItems(location, item, maximumDropAmount - minimumDropAmount);
} }
else { else {
Misc.dropItems(location, item, minimumDropAmount); Misc.dropItems(location, item, minimumDropAmount);

View File

@ -193,10 +193,10 @@ public final class TreeFeller {
} }
if (material == Material.HUGE_MUSHROOM_1) { if (material == Material.HUGE_MUSHROOM_1) {
Misc.randomDropItems(block.getLocation(), new ItemStack(Material.BROWN_MUSHROOM), 50, 2); Misc.randomDropItems(block.getLocation(), new ItemStack(Material.BROWN_MUSHROOM), 2);
} }
else { else {
Misc.randomDropItems(block.getLocation(), new ItemStack(Material.RED_MUSHROOM), 50, 2); Misc.randomDropItems(block.getLocation(), new ItemStack(Material.RED_MUSHROOM), 2);
} }
break; break;
@ -229,7 +229,7 @@ public final class TreeFeller {
Misc.dropItems(location, item, minimumDropAmount); Misc.dropItems(location, item, minimumDropAmount);
if (minimumDropAmount < maximumDropAmount) { if (minimumDropAmount < maximumDropAmount) {
Misc.randomDropItems(location, item, 50, maximumDropAmount - minimumDropAmount); Misc.randomDropItems(location, item, maximumDropAmount - minimumDropAmount);
} }
} }
else if (ModChecks.isCustomLeafBlock(block)) { else if (ModChecks.isCustomLeafBlock(block)) {

View File

@ -163,7 +163,7 @@ public final class Woodcutting {
Misc.dropItems(location, item, minimumDropAmount); Misc.dropItems(location, item, minimumDropAmount);
if (minimumDropAmount != maximumDropAmount) { if (minimumDropAmount != maximumDropAmount) {
Misc.randomDropItems(location, item, 50, maximumDropAmount - minimumDropAmount); Misc.randomDropItems(location, item, maximumDropAmount - minimumDropAmount);
} }
} }
else { else {

View File

@ -211,7 +211,7 @@ public final class Misc {
* @param chance The percentage chance for the item to drop * @param chance The percentage chance for the item to drop
* @param quantity The amount of items to drop * @param quantity The amount of items to drop
*/ */
public static void randomDropItems(Location location, ItemStack is, int chance, int quantity) { public static void randomDropItems(Location location, ItemStack is, int quantity) {
int dropCount = random.nextInt(quantity + 1); int dropCount = random.nextInt(quantity + 1);
if (dropCount > 0) { if (dropCount > 0) {