customjack

FreeRPG Flame Pick Blocks

Jul 27th, 2020
21
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. switch (block.getType()) {
  2. case IRON_ORE:
  3. block.setType(Material.AIR);
  4. if (chanceDrop > rand.nextDouble()) {
  5. if ((int) pStat.get("mining").get(13) > 0) {
  6. dropAmount *= 3;
  7. }
  8. else {
  9. dropAmount *= 2;
  10. }
  11. }
  12. world.dropItemNaturally(block.getLocation(), new ItemStack(Material.IRON_INGOT, dropAmount));
  13. increaseStats.changeEXP("smelting",getEXP(Material.IRON_INGOT));
  14. damageTool();
  15. if (0.7 > rand.nextDouble()) {
  16. ((ExperienceOrb) world.spawn(block.getLocation(), ExperienceOrb.class)).setExperience(1);
  17. }
  18. break;
  19. case GOLD_ORE:
  20. block.setType(Material.AIR);
  21. if (chanceDrop > rand.nextDouble()) {
  22. if ((int) pStat.get("mining").get(13) > 0) {
  23. dropAmount *= 3;
  24. }
  25. else {
  26. dropAmount *= 2;
  27. }
  28. }
  29. world.dropItemNaturally(block.getLocation(), new ItemStack(Material.GOLD_INGOT, dropAmount));
  30. increaseStats.changeEXP("smelting",getEXP(Material.GOLD_INGOT));
  31. damageTool();
  32. ((ExperienceOrb) world.spawn(block.getLocation(), ExperienceOrb.class)).setExperience(1);
  33. break;
  34. case COBBLESTONE:
  35. block.setType(Material.AIR);
  36. world.dropItemNaturally(block.getLocation(), new ItemStack(Material.STONE, dropAmount));
  37. increaseStats.changeEXP("smelting",getEXP(Material.STONE));
  38. damageTool();
  39. break;
  40. case SANDSTONE:
  41. block.setType(Material.AIR);
  42. world.dropItemNaturally(block.getLocation(), new ItemStack(Material.SMOOTH_SANDSTONE, dropAmount));
  43. increaseStats.changeEXP("smelting",getEXP(Material.SMOOTH_SANDSTONE));
  44. damageTool();
  45. break;
  46. case RED_SANDSTONE:
  47. block.setType(Material.AIR);
  48. world.dropItemNaturally(block.getLocation(), new ItemStack(Material.SMOOTH_RED_SANDSTONE, dropAmount));
  49. increaseStats.changeEXP("smelting",getEXP(Material.SMOOTH_RED_SANDSTONE));
  50. damageTool();
  51. break;
  52. case STONE:
  53. block.setType(Material.AIR);
  54. world.dropItemNaturally(block.getLocation(), new ItemStack(Material.SMOOTH_STONE, dropAmount));
  55. increaseStats.changeEXP("smelting",getEXP(Material.SMOOTH_STONE));
  56. damageTool();
  57. break;
  58. case SAND:
  59. block.setType(Material.AIR);
  60. world.dropItemNaturally(block.getLocation(), new ItemStack(Material.GLASS, dropAmount));
  61. increaseStats.changeEXP("smelting",getEXP(Material.GLASS));
  62. damageTool();
  63. break;
  64. case QUARTZ_BLOCK:
  65. block.setType(Material.AIR);
  66. world.dropItemNaturally(block.getLocation(), new ItemStack(Material.SMOOTH_QUARTZ, dropAmount));
  67. increaseStats.changeEXP("smelting",getEXP(Material.SMOOTH_QUARTZ));
  68. damageTool();
  69. break;
  70. case NETHERRACK:
  71. block.setType(Material.AIR);
  72. world.dropItemNaturally(block.getLocation(), new ItemStack(Material.NETHER_BRICK, dropAmount));
  73. increaseStats.changeEXP("smelting",getEXP(Material.NETHER_BRICK));
  74. damageTool();
  75. break;
  76. case CLAY:
  77. block.setType(Material.AIR);
  78. world.dropItemNaturally(block.getLocation(), new ItemStack(Material.TERRACOTTA, dropAmount));
  79. increaseStats.changeEXP("smelting",getEXP(Material.TERRACOTTA));
  80. damageTool();
  81. break;
  82. case WET_SPONGE:
  83. block.setType(Material.AIR);
  84. world.dropItemNaturally(block.getLocation(), new ItemStack(Material.SPONGE, dropAmount));
  85. increaseStats.changeEXP("smelting",getEXP(Material.SPONGE));
  86. damageTool();
  87. break;
  88. case CACTUS:
  89. block.setType(Material.AIR);
  90. world.dropItemNaturally(block.getLocation(), new ItemStack(Material.GREEN_DYE, dropAmount));
  91. increaseStats.changeEXP("smelting",getEXP(Material.GREEN_DYE));
  92. damageTool();
  93. break;
  94. case ACACIA_LOG:
  95. case BIRCH_LOG:
  96. case DARK_OAK_LOG:
  97. case JUNGLE_LOG:
  98. case OAK_LOG:
  99. case SPRUCE_LOG:
  100. block.setType(Material.AIR);
  101. if (chanceLogDrop > rand.nextDouble()) {
  102. dropAmount *= 2;
  103. }
  104. world.dropItemNaturally(block.getLocation(), new ItemStack(Material.CHARCOAL, dropAmount));
  105. increaseStats.changeEXP("smelting",getEXP(Material.CHARCOAL));
  106. damageTool();
  107. break;
  108. default:
  109. break;
RAW Paste Data