Skip to content

Commit

Permalink
Add break;
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankTCA committed Dec 16, 2022
1 parent 0c132f5 commit f737c6a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/org/infotoast/dropsoverhaul/Listener.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,19 @@ public void onBlockBreak(BlockBreakEvent evt) {
item = new ItemStack(Material.GRASS_BLOCK);
else
item = new ItemStack(Material.DIRT);
break;
case STONE:
if (breaker.getInventory().getItemInMainHand().containsEnchantment(Enchantment.SILK_TOUCH))
item = new ItemStack(Material.STONE);
else
item = new ItemStack(Material.COBBLESTONE);
break;
case GRAVEL:
if (new Random().nextInt(8) == 0)
item = new ItemStack(Material.FLINT);
else
item = new ItemStack(Material.GRAVEL);
break;
}
breaker.getInventory().addItem(item);
blocc.setType(Material.AIR, true);
Expand Down

0 comments on commit f737c6a

Please sign in to comment.