Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (material == Material.IRON_ORE && player.getGameMode().equals(GameMode.SURVIVAL)
- && player.getItemInHand().getType().toString().toLowerCase().contains("pickaxe")) {
- Material i1 = Material.COAL;
- Material i2 = Material.ARROW;
- Material i3 = Material.STICK;
- Material i4 = Material.FLINT;
- Material i5 = Material.IRON_INGOT;
- Material i6 = Material.STRING;
- Material i7 = Material.DIAMOND;
- Material id1 = Material.COAL;
- Material id2 = Material.ARROW;
- Material id3 = Material.STICK;
- Material id4 = Material.FLINT;
- Material id5 = Material.DIAMOND;
- Material id6 = Material.DIAMOND;
- Material id7 = Material.DIAMOND;
- ironAL.add(i1);
- ironAL.add(i2);
- ironAL.add(i3);
- ironAL.add(i4);
- ironAL.add(i5);
- ironAL.add(i6);
- ironAL.add(i7);
- idAL.add(id1);
- idAL.add(id2);
- idAL.add(id3);
- idAL.add(id4);
- idAL.add(id5);
- idAL.add(id6);
- idAL.add(id7);
- Random diceRoll = new Random();
- int number;
- number = diceRoll.nextInt(6);
- Random secondDiceRoll = new Random();
- int amountDropped;
- amountDropped = secondDiceRoll.nextInt(4);
- event.setCancelled(true);
- event.getBlock().setType(Material.AIR);
- event.getBlock().getWorld().dropItemNaturally(event.getBlock().getLocation().add(.5, .5, .5),
- new ItemStack(ironAL.get(number), amountDropped + 1));
- event.getBlock().getWorld().dropItemNaturally(event.getBlock().getLocation().add(.6, .6, .6),
- new ItemStack(ironAL.get(number), amountDropped + 1));
- number = diceRoll.nextInt(7);
- amountDropped = secondDiceRoll.nextInt(3);
- event.getBlock().getWorld().dropItemNaturally(event.getBlock().getLocation().add(.4, .4, .4),
- new ItemStack(idAL.get(number), amountDropped));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement