mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-11-04 11:03:43 +01:00 
			
		
		
		
	Don't need chance anymore.
This commit is contained in:
		@@ -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);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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)) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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 {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user