瀏覽代碼

blast mining bonus drops are now RNG and no longer guaranteed, yield ceiling clamped

nossr50 4 月之前
父節點
當前提交
25c89c5bd3
共有 2 個文件被更改,包括 18 次插入11 次删除
  1. 4 0
      Changelog.txt
  2. 14 11
      src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java

+ 4 - 0
Changelog.txt

@@ -1,5 +1,9 @@
 Version 2.2.032
 Version 2.2.032
     Blast Mining no longer drops infested block variants
     Blast Mining no longer drops infested block variants
+    Reduced bonus drops on Blast Mining and randomized results (see notes)
+
+    NOTES:
+    A balance pass for Blast Mining is coming, but for now, I've reduced the total bonus drops and clamped the yield ceiling as Blast Mining is a bit too good.
 
 
 Version 2.2.031
 Version 2.2.031
     Fixed potential NPE when player or blockstate is null for Inventory events on Furnaces
     Fixed potential NPE when player or blockstate is null for Inventory events on Furnaces

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

@@ -35,7 +35,10 @@ import static com.gmail.nossr50.util.ItemUtils.isPickaxe;
 public class MiningManager extends SkillManager {
 public class MiningManager extends SkillManager {
 
 
     public static final String BUDDING_AMETHYST = "budding_amethyst";
     public static final String BUDDING_AMETHYST = "budding_amethyst";
-    public static final Collection<Material> BLAST_MINING_BLACKLIST = Set.of(Material.SPAWNER);
+    public static final Collection<Material> BLAST_MINING_BLACKLIST = Set.of(Material.SPAWNER,
+            Material.INFESTED_COBBLESTONE, Material.INFESTED_DEEPSLATE, Material.INFESTED_STONE,
+            Material.INFESTED_STONE_BRICKS, Material.INFESTED_CRACKED_STONE_BRICKS,
+            Material.INFESTED_CHISELED_STONE_BRICKS, Material.INFESTED_MOSSY_STONE_BRICKS);
     private final static Set<String> INFESTED_BLOCKS = Set.of("infested_stone", "infested_cobblestone",
     private final static Set<String> INFESTED_BLOCKS = Set.of("infested_stone", "infested_cobblestone",
             "infested_stone_bricks", "infested_cracked_stone_bricks", "infested_mossy_stone_bricks",
             "infested_stone_bricks", "infested_cracked_stone_bricks", "infested_mossy_stone_bricks",
             "infested_chiseled_stone_bricks", "infested_deepslate");
             "infested_chiseled_stone_bricks", "infested_deepslate");
@@ -158,9 +161,7 @@ public class MiningManager extends SkillManager {
 
 
         TNTPrimed tnt = player.getWorld().spawn(targetBlock.getLocation(), TNTPrimed.class);
         TNTPrimed tnt = player.getWorld().spawn(targetBlock.getLocation(), TNTPrimed.class);
 
 
-        //SkillUtils.sendSkillMessage(player, SuperAbilityType.BLAST_MINING.getAbilityPlayer(player));
         NotificationManager.sendPlayerInformation(player, NotificationType.SUPER_ABILITY, "Mining.Blast.Boom");
         NotificationManager.sendPlayerInformation(player, NotificationType.SUPER_ABILITY, "Mining.Blast.Boom");
-        //player.sendMessage(LocaleLoader.getString("Mining.Blast.Boom"));
 
 
         tnt.setMetadata(MetadataConstants.METADATA_KEY_TRACKED_TNT, mmoPlayer.getPlayerMetadata());
         tnt.setMetadata(MetadataConstants.METADATA_KEY_TRACKED_TNT, mmoPlayer.getPlayerMetadata());
         tnt.setFuseTicks(0);
         tnt.setFuseTicks(0);
@@ -211,7 +212,7 @@ public class MiningManager extends SkillManager {
             if (isDropIllegal(block.getType()))
             if (isDropIllegal(block.getType()))
                 continue;
                 continue;
 
 
-            if (block.getType().isItem() && Probability.ofPercent(50).evaluate()) {
+            if (block.getType().isItem() && Probability.ofPercent(10).evaluate()) {
                 ItemUtils.spawnItem(getPlayer(),
                 ItemUtils.spawnItem(getPlayer(),
                         Misc.getBlockCenter(block),
                         Misc.getBlockCenter(block),
                         new ItemStack(block.getType()),
                         new ItemStack(block.getType()),
@@ -220,7 +221,7 @@ public class MiningManager extends SkillManager {
         }
         }
         for (Block block : ores) {
         for (Block block : ores) {
             // currentOreYield only used for drop calculations for ores
             // currentOreYield only used for drop calculations for ores
-            float currentOreYield = increasedYieldFromBonuses;
+            float currentOreYield = Math.min(increasedYieldFromBonuses, 3F);
 
 
             if (isDropIllegal(block.getType())) {
             if (isDropIllegal(block.getType())) {
                 continue;
                 continue;
@@ -237,12 +238,14 @@ public class MiningManager extends SkillManager {
                             oreDrops, BLAST_MINING_BLACKLIST, ItemSpawnReason.BLAST_MINING_ORES);
                             oreDrops, BLAST_MINING_BLACKLIST, ItemSpawnReason.BLAST_MINING_ORES);
 
 
                     if (mcMMO.p.getAdvancedConfig().isBlastMiningBonusDropsEnabled()) {
                     if (mcMMO.p.getAdvancedConfig().isBlastMiningBonusDropsEnabled()) {
-                        for (int i = 1; i < dropMultiplier; i++) {
-                            ItemUtils.spawnItems(getPlayer(),
-                                    Misc.getBlockCenter(block),
-                                    oreDrops,
-                                    BLAST_MINING_BLACKLIST,
-                                    ItemSpawnReason.BLAST_MINING_ORES_BONUS_DROP);
+                        if (Probability.ofValue(0.5F).evaluate()) {
+                            for (int i = 1; i < dropMultiplier; i++) {
+                                ItemUtils.spawnItems(getPlayer(),
+                                        Misc.getBlockCenter(block),
+                                        oreDrops,
+                                        BLAST_MINING_BLACKLIST,
+                                        ItemSpawnReason.BLAST_MINING_ORES_BONUS_DROP);
+                            }
                         }
                         }
                     }
                     }
                 }
                 }