customjack

FreeRPG hooked Drops

Jul 27th, 2020
63
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if (hookedEntity.getType() == EntityType.BLAZE) {
  2. drop.setType(Material.BLAZE_ROD);
  3. increaseStats.changeEXP("fishing",800);
  4. } else if (hookedEntity.getType() == EntityType.GHAST) {
  5. double randomNum = rand.nextDouble();
  6. if (randomNum < .5) {
  7. drop.setType(Material.GHAST_TEAR);
  8. } else {
  9. drop.setType(Material.GUNPOWDER);
  10. }
  11. increaseStats.changeEXP("fishing",800);
  12. } else if (hookedEntity.getType() == EntityType.ZOMBIFIED_PIGLIN) {
  13. double randomNum = rand.nextDouble();
  14. if (randomNum < .5) {
  15. drop.setType(Material.ROTTEN_FLESH);
  16. } else {
  17. drop.setType(Material.GOLD_NUGGET);
  18. }
  19. increaseStats.changeEXP("fishing",800);
  20. } else if (hookedEntity.getType() == EntityType.ZOMBIE) {
  21. double randomNum = rand.nextDouble();
  22. if (randomNum < .98) {
  23. drop.setType(Material.ROTTEN_FLESH);
  24. } else {
  25. drop.setType(Material.ZOMBIE_HEAD);
  26. }
  27. increaseStats.changeEXP("fishing",1000);
  28. } else if (hookedEntity.getType() == EntityType.SPIDER) {
  29. double randomNum = rand.nextDouble();
  30. if (randomNum < .5) {
  31. drop.setType(Material.STRING);
  32. } else {
  33. drop.setType(Material.SPIDER_EYE);
  34. }
  35. increaseStats.changeEXP("fishing",1000);
  36. } else if (hookedEntity.getType() == EntityType.CAVE_SPIDER) {
  37. double randomNum = rand.nextDouble();
  38. if (randomNum < .49) {
  39. drop.setType(Material.STRING);
  40. } else if (randomNum < .98) {
  41. drop.setType(Material.SPIDER_EYE);
  42. } else if (randomNum < .99) {
  43. drop.setType(Material.SPLASH_POTION);
  44. PotionMeta pm = (PotionMeta) drop.getItemMeta();
  45. assert pm != null;
  46. pm.addCustomEffect(new PotionEffect(PotionEffectType.POISON, 15, 0), false);
  47. pm.setDisplayName(ChatColor.YELLOW + "Splash Potion of Poison");
  48. drop.setItemMeta(pm);
  49.  
  50. } else {
  51. drop.setType(Material.COBWEB);
  52. }
  53. increaseStats.changeEXP("fishing",1000);
  54. } else if (hookedEntity.getType() == EntityType.PIG) {
  55. drop.setType(Material.PORKCHOP);
  56. increaseStats.changeEXP("fishing",600);
  57. } else if (hookedEntity.getType() == EntityType.CHICKEN) {
  58. double randomNum = rand.nextDouble();
  59. if (randomNum < .33) {
  60. drop.setType(Material.EGG);
  61. } else if (randomNum > .66) {
  62. drop.setType(Material.CHICKEN);
  63. } else {
  64. drop.setType(Material.FEATHER);
  65. }
  66. increaseStats.changeEXP("fishing",600);
  67. } else if (hookedEntity.getType() == EntityType.CREEPER) {
  68. double randomNum = rand.nextDouble();
  69. if (randomNum < .99) {
  70. drop.setType(Material.GUNPOWDER);
  71. } else {
  72. drop.setType(Material.CREEPER_HEAD);
  73. }
  74. increaseStats.changeEXP("fishing",1000);
  75. } else if (hookedEntity.getType() == EntityType.SKELETON) {
  76. double randomNum = rand.nextDouble();
  77. if (randomNum < .49) {
  78. drop.setType(Material.BONE);
  79. } else if (randomNum < .98) {
  80. drop.setType(Material.ARROW);
  81. drop.setAmount(rand.nextInt(3) + 1);
  82. } else {
  83. drop.setType(Material.SKELETON_SKULL);
  84. }
  85. increaseStats.changeEXP("fishing",1000);
  86. } else if (hookedEntity.getType() == EntityType.WITHER_SKELETON) {
  87. double randomNum = rand.nextDouble();
  88. if (randomNum < .50) {
  89. drop.setType(Material.BONE);
  90. } else if (randomNum < .99) {
  91. drop.setType(Material.COAL);
  92. drop.setAmount(rand.nextInt(3) + 1);
  93. } else {
  94. drop.setType(Material.WITHER_SKELETON_SKULL);
  95. }
  96. increaseStats.changeEXP("fishing",120);
  97. } else if (hookedEntity.getType() == EntityType.SLIME) {
  98. drop.setType(Material.SLIME_BALL);
  99. increaseStats.changeEXP("fishing",800);
  100. } else if (hookedEntity.getType() == EntityType.MAGMA_CUBE) {
  101. drop.setType(Material.MAGMA_CREAM);
  102. increaseStats.changeEXP("fishing",1000);
  103. } else if (hookedEntity.getType() == EntityType.COW) {
  104. double randomNum = rand.nextDouble();
  105. if (randomNum < .49) {
  106. drop.setType(Material.LEATHER);
  107. } else if (randomNum < .98) {
  108. drop.setType(Material.BEEF);
  109. } else {
  110. drop.setType(Material.MILK_BUCKET);
  111. }
  112. increaseStats.changeEXP("fishing",600);
  113. } else if (hookedEntity.getType() == EntityType.MUSHROOM_COW) {
  114. double randomNum = rand.nextDouble();
  115. if (randomNum < .05) {
  116. drop.setType(Material.MILK_BUCKET);
  117. } else if (randomNum < 0.10) {
  118. drop.setType(Material.MUSHROOM_STEW);
  119. } else if (randomNum < 0.40) {
  120. drop.setType(Material.LEATHER);
  121. } else if (randomNum < 0.70) {
  122. drop.setType(Material.BEEF);
  123. } else {
  124. drop.setType(Material.RED_MUSHROOM);
  125. drop.setAmount(rand.nextInt(3) + 1);
  126. }
  127. increaseStats.changeEXP("fishing",600);
  128. } else if (hookedEntity.getType() == EntityType.ENDERMAN) {
  129. drop.setType(Material.ENDER_PEARL);
  130. increaseStats.changeEXP("fishing",1000);
  131. } else if (hookedEntity.getType() == EntityType.SHEEP) {
  132. drop.setType(Material.WHITE_WOOL);
  133. increaseStats.changeEXP("fishing",600);
  134. } else if (hookedEntity.getType() == EntityType.IRON_GOLEM) {
  135. double randomNum = rand.nextDouble();
  136. if (randomNum < .03) {
  137. drop.setType(Material.PUMPKIN);
  138. } else if (randomNum < 0.15) {
  139. drop.setType(Material.IRON_INGOT);
  140. } else {
  141. drop.setType(Material.POPPY);
  142. }
  143. increaseStats.changeEXP("fishing",600);
  144. } else if (hookedEntity.getType() == EntityType.SNOWMAN) {
  145. double randomNum = rand.nextDouble();
  146. if (randomNum < .03) {
  147. drop.setType(Material.PUMPKIN);
  148. } else {
  149. drop.setType(Material.SNOWBALL);
  150. }
  151. increaseStats.changeEXP("fishing",600);
  152. } else if (hookedEntity.getType() == EntityType.WITCH) {
  153. double randomNum = rand.nextDouble();
  154. if (randomNum < 0.01) {
  155. drop.setType(Material.SPLASH_POTION);
  156. PotionMeta pm = (PotionMeta) drop.getItemMeta();
  157. assert pm != null;
  158. pm.addCustomEffect(new PotionEffect(PotionEffectType.HEAL, 15, 0), false);
  159. pm.setDisplayName(ChatColor.YELLOW + "Splash Potion of Healing");
  160. drop.setItemMeta(pm);
  161. } else if (randomNum < 0.02) {
  162. drop.setType(Material.SPLASH_POTION);
  163. PotionMeta pm = (PotionMeta) drop.getItemMeta();
  164. assert pm != null;
  165. pm.addCustomEffect(new PotionEffect(PotionEffectType.FIRE_RESISTANCE, 15, 0), false);
  166. pm.setDisplayName(ChatColor.YELLOW + "Splash Potion of Fire Resistance");
  167. drop.setItemMeta(pm);
  168. } else if (randomNum < 0.03) {
  169. drop.setType(Material.SPLASH_POTION);
  170. PotionMeta pm = (PotionMeta) drop.getItemMeta();
  171. assert pm != null;
  172. pm.addCustomEffect(new PotionEffect(PotionEffectType.SPEED, 15, 0), false);
  173. pm.setDisplayName(ChatColor.YELLOW + "Splash Potion of Speed");
  174. drop.setItemMeta(pm);
  175. } else if (randomNum < 0.12) {
  176. drop.setType(Material.GLASS_BOTTLE);
  177. } else if (randomNum < 0.24) {
  178. drop.setType(Material.SUGAR);
  179. } else if (randomNum < 0.36) {
  180. drop.setType(Material.SPIDER_EYE);
  181. } else if (randomNum < 0.48) {
  182. drop.setType(Material.GUNPOWDER);
  183. } else if (randomNum < 0.61) {
  184. drop.setType(Material.FERMENTED_SPIDER_EYE);
  185. } else if (randomNum < 0.74) {
  186. drop.setType(Material.GLOWSTONE_DUST);
  187. } else if (randomNum < 0.87) {
  188. drop.setType(Material.REDSTONE);
  189. } else {
  190. drop.setType(Material.STICK);
  191. }
  192. increaseStats.changeEXP("fishing",1200);
  193. } else if (hookedEntity.getType() == EntityType.SHULKER) {
  194. double randomNum = rand.nextDouble();
  195. if (randomNum < .25) {
  196. drop.setType(Material.SHULKER_SHELL);
  197. } else {
  198. drop.setType(Material.PURPUR_BLOCK);
  199. }
  200. increaseStats.changeEXP("fishing",800);
  201. }
RAW Paste Data