浏览代码

Fixed blast mining trying to drop non-items

nossr50 10 月之前
父节点
当前提交
9b046bd490
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 1 0
      Changelog.txt
  2. 1 1
      src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java

+ 1 - 0
Changelog.txt

@@ -1,6 +1,7 @@
 Version 2.2.020
 Version 2.2.020
     (Codebase) Reworked Roll implementation (See notes)
     (Codebase) Reworked Roll implementation (See notes)
     (Codebase) Added unit test coverage for Roll
     (Codebase) Added unit test coverage for Roll
+    Fixed blast mining trying to drop non-items (thanks IAISI)
     Fixed error spam in mcMMO potion matching logic (see notes)
     Fixed error spam in mcMMO potion matching logic (see notes)
     Fixed a bug where Roll was modifying damage unnecessarily
     Fixed a bug where Roll was modifying damage unnecessarily
 
 

+ 1 - 1
src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java

@@ -204,7 +204,7 @@ public class MiningManager extends SkillManager {
             if (isDropIllegal(blockState.getType()))
             if (isDropIllegal(blockState.getType()))
                 continue;
                 continue;
 
 
-            if (Probability.ofPercent(50).evaluate()) {
+            if (blockState.getType().isItem() && Probability.ofPercent(50).evaluate()) {
                 ItemUtils.spawnItem(getPlayer(),
                 ItemUtils.spawnItem(getPlayer(),
                         Misc.getBlockCenter(blockState),
                         Misc.getBlockCenter(blockState),
                         new ItemStack(blockState.getType()),
                         new ItemStack(blockState.getType()),