mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-01 16:19:53 +01:00
Don't need chance anymore.
This commit is contained in:
parent
946513cb66
commit
8a795e6091
@ -204,7 +204,7 @@ public class Herbalism {
|
||||
int maximumDropAmount = customBlock.getMaximumDropAmount();
|
||||
|
||||
if (minimumDropAmount != maximumDropAmount) {
|
||||
Misc.randomDropItems(location, dropItem, 50, maximumDropAmount - minimumDropAmount);
|
||||
Misc.randomDropItems(location, dropItem, maximumDropAmount - minimumDropAmount);
|
||||
}
|
||||
|
||||
Misc.dropItems(location, dropItem, minimumDropAmount);
|
||||
|
@ -225,7 +225,7 @@ public class Mining {
|
||||
if (config.getGlowstoneDoubleDropsEnabled()) {
|
||||
item = new ItemStack(Material.GLOWSTONE_DUST);
|
||||
Misc.dropItems(location, item, 2);
|
||||
Misc.randomDropItems(location, item, 50, 2);
|
||||
Misc.randomDropItems(location, item, 2);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -245,7 +245,7 @@ public class Mining {
|
||||
if (config.getLapisDoubleDropsEnabled()) {
|
||||
item = new ItemStack(Material.INK_SACK, 1, DyeColor.BLUE.getDyeData());
|
||||
Misc.dropItems(location, item, 4);
|
||||
Misc.randomDropItems(location, item, 50, 4);
|
||||
Misc.randomDropItems(location, item, 4);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -297,7 +297,7 @@ public class Mining {
|
||||
|
||||
if (minimumDropAmount != maximumDropAmount) {
|
||||
Misc.dropItems(location, item, minimumDropAmount);
|
||||
Misc.randomDropItems(location, item, 50, maximumDropAmount - minimumDropAmount);
|
||||
Misc.randomDropItems(location, item, maximumDropAmount - minimumDropAmount);
|
||||
}
|
||||
else {
|
||||
Misc.dropItems(location, item, minimumDropAmount);
|
||||
|
@ -193,10 +193,10 @@ public final class TreeFeller {
|
||||
}
|
||||
|
||||
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 {
|
||||
Misc.randomDropItems(block.getLocation(), new ItemStack(Material.RED_MUSHROOM), 50, 2);
|
||||
Misc.randomDropItems(block.getLocation(), new ItemStack(Material.RED_MUSHROOM), 2);
|
||||
}
|
||||
|
||||
break;
|
||||
@ -229,7 +229,7 @@ public final class TreeFeller {
|
||||
Misc.dropItems(location, item, minimumDropAmount);
|
||||
|
||||
if (minimumDropAmount < maximumDropAmount) {
|
||||
Misc.randomDropItems(location, item, 50, maximumDropAmount - minimumDropAmount);
|
||||
Misc.randomDropItems(location, item, maximumDropAmount - minimumDropAmount);
|
||||
}
|
||||
}
|
||||
else if (ModChecks.isCustomLeafBlock(block)) {
|
||||
|
@ -163,7 +163,7 @@ public final class Woodcutting {
|
||||
Misc.dropItems(location, item, minimumDropAmount);
|
||||
|
||||
if (minimumDropAmount != maximumDropAmount) {
|
||||
Misc.randomDropItems(location, item, 50, maximumDropAmount - minimumDropAmount);
|
||||
Misc.randomDropItems(location, item, maximumDropAmount - minimumDropAmount);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -211,10 +211,10 @@ public final class Misc {
|
||||
* @param chance The percentage chance for the item 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);
|
||||
|
||||
if(dropCount > 0) {
|
||||
if (dropCount > 0) {
|
||||
is.setAmount(dropCount);
|
||||
dropItem(location, is);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user