mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-10-31 09:13:43 +01:00 
			
		
		
		
	Custom blocks should now work right with Super Breaker.
This commit is contained in:
		| @@ -250,37 +250,7 @@ public class Mining { | |||||||
|         int durabilityLoss = Config.getInstance().getAbilityToolDamage(); |         int durabilityLoss = Config.getInstance().getAbilityToolDamage(); | ||||||
|         FakePlayerAnimationEvent armswing = new FakePlayerAnimationEvent(player); |         FakePlayerAnimationEvent armswing = new FakePlayerAnimationEvent(player); | ||||||
|  |  | ||||||
|         switch (type) { |         if (Config.getInstance().getBlockModsEnabled() && CustomBlocksConfig.getInstance().customItems.contains(new ItemStack(block.getTypeId(), 1, (short) 0, block.getData()))) { | ||||||
|         case OBSIDIAN: |  | ||||||
|             if (tier < 4) { |  | ||||||
|                 return; |  | ||||||
|             } |  | ||||||
|             durabilityLoss = durabilityLoss * 5; //Obsidian needs to do more damage than normal |  | ||||||
|             /* FALL THROUGH */ |  | ||||||
|  |  | ||||||
|         case DIAMOND_ORE: |  | ||||||
|         case GLOWING_REDSTONE_ORE: |  | ||||||
|         case GOLD_ORE: |  | ||||||
|         case LAPIS_ORE: |  | ||||||
|         case REDSTONE_ORE: |  | ||||||
|             if (tier < 3) { |  | ||||||
|                 return; |  | ||||||
|             } |  | ||||||
|             /* FALL THROUGH */ |  | ||||||
|  |  | ||||||
|         case IRON_ORE: |  | ||||||
|             if (tier < 2) { |  | ||||||
|                 return; |  | ||||||
|             } |  | ||||||
|             /* FALL THROUGH */ |  | ||||||
|  |  | ||||||
|         case COAL_ORE: |  | ||||||
|         case ENDER_STONE: |  | ||||||
|         case GLOWSTONE: |  | ||||||
|         case MOSSY_COBBLESTONE: |  | ||||||
|         case NETHERRACK: |  | ||||||
|         case SANDSTONE: |  | ||||||
|         case STONE: |  | ||||||
|             if (mcMMO.placeStore.isTrue(block)) { |             if (mcMMO.placeStore.isTrue(block)) { | ||||||
|                 return; |                 return; | ||||||
|             } |             } | ||||||
| @@ -294,5 +264,51 @@ public class Mining { | |||||||
|                 SpoutSounds.playSoundForPlayer(SoundEffect.POP, player, block.getLocation()); |                 SpoutSounds.playSoundForPlayer(SoundEffect.POP, player, block.getLocation()); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  |         else { | ||||||
|  |             switch (type) { | ||||||
|  |             case OBSIDIAN: | ||||||
|  |                 if (tier < 4) { | ||||||
|  |                     return; | ||||||
|  |                 } | ||||||
|  |                 durabilityLoss = durabilityLoss * 5; //Obsidian needs to do more damage than normal | ||||||
|  |                 /* FALL THROUGH */ | ||||||
|  |  | ||||||
|  |             case DIAMOND_ORE: | ||||||
|  |             case GLOWING_REDSTONE_ORE: | ||||||
|  |             case GOLD_ORE: | ||||||
|  |             case LAPIS_ORE: | ||||||
|  |             case REDSTONE_ORE: | ||||||
|  |                 if (tier < 3) { | ||||||
|  |                     return; | ||||||
|  |                 } | ||||||
|  |                 /* FALL THROUGH */ | ||||||
|  |  | ||||||
|  |             case IRON_ORE: | ||||||
|  |                 if (tier < 2) { | ||||||
|  |                     return; | ||||||
|  |                 } | ||||||
|  |                 /* FALL THROUGH */ | ||||||
|  |  | ||||||
|  |             case COAL_ORE: | ||||||
|  |             case ENDER_STONE: | ||||||
|  |             case GLOWSTONE: | ||||||
|  |             case MOSSY_COBBLESTONE: | ||||||
|  |             case NETHERRACK: | ||||||
|  |             case SANDSTONE: | ||||||
|  |             case STONE: | ||||||
|  |                 if (mcMMO.placeStore.isTrue(block)) { | ||||||
|  |                     return; | ||||||
|  |                 } | ||||||
|  |  | ||||||
|  |                 mcMMO.p.getServer().getPluginManager().callEvent(armswing); | ||||||
|  |                 Skills.abilityDurabilityLoss(player.getItemInHand(), durabilityLoss); | ||||||
|  |  | ||||||
|  |                 miningBlockCheck(player, block); | ||||||
|  |  | ||||||
|  |                 if (Config.getInstance().spoutEnabled) { | ||||||
|  |                     SpoutSounds.playSoundForPlayer(SoundEffect.POP, player, block.getLocation()); | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |         } | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 GJ
					GJ