mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
Debris should drop normal drops
This commit is contained in:
parent
3158c7e3eb
commit
78f53f294a
@ -22,7 +22,7 @@ Version 1.4.06-dev
|
||||
+ Added fishing exploit prevention
|
||||
+ Added boosts to Fishing chance depending on conditions
|
||||
+ Added McMMOAbilityActivateEvent and McMMOAbilityDeactivateEvent
|
||||
+ Added config options to toggle the size of fireworks
|
||||
+ Added config option to toggle the size of fireworks
|
||||
+ Added config option to multiply xp gains from mob spawner mobs
|
||||
+ Added multiplier to Archery XP based on bow force
|
||||
+ Added information about /party itemshare and /party expshare to the party help page
|
||||
@ -41,6 +41,7 @@ Version 1.4.06-dev
|
||||
= Fixed possible item duplication bug with infinity bows
|
||||
= Fixed bug with removing players from mySQL database
|
||||
= Fixed bug with empty metadata lists and Smelting
|
||||
= Fixed bug where Blast Mining would drop wrong items
|
||||
! Changed Berserk to add items to inventory rather than denying pickup
|
||||
! Changed Call of the Wild, newly summoned pet's will have a custom name. (added permission node to disable this)
|
||||
! Changed Chimaera Wing's recipe result to use the ingredient Material
|
||||
|
@ -10,6 +10,7 @@ import org.bukkit.block.BlockState;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.TNTPrimed;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.metadata.FixedMetadataValue;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
@ -158,7 +159,7 @@ public class MiningManager extends SkillManager{
|
||||
if (debrisYield > 0) {
|
||||
for (BlockState blockState : debris) {
|
||||
if (Misc.getRandom().nextFloat() < debrisYield) {
|
||||
Misc.dropItem(blockState.getLocation(), blockState.getData().toItemStack(1));
|
||||
Misc.dropItems(blockState.getLocation(), blockState.getBlock().getDrops());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.gmail.nossr50.util;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Random;
|
||||
|
||||
import org.bukkit.Location;
|
||||
@ -206,4 +207,10 @@ public final class Misc {
|
||||
public static Random getRandom() {
|
||||
return random;
|
||||
}
|
||||
|
||||
public static void dropItems(Location location, Collection<ItemStack> drops) {
|
||||
for (ItemStack drop : drops) {
|
||||
dropItem(location, drop);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user