Advertisement
nicka101

SuperSimpleSpawners Modification (Line 246 Start)

Apr 23rd, 2012
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.59 KB | None | 0 0
  1. if (placedBlock.getState() instanceof CreatureSpawner
  2.                 && player.getGameMode().equals(GameMode.SURVIVAL)) {
  3.             if (player.getItemInHand().getAmount() > 1) { //Changed To player.getItemInHand() because itemInHand Was Changed in previous code.
  4.                 player.getItemInHand().setAmount(player.getItemInHand().getAmount() - 1);
  5.             } else {
  6.                 player.setItemInHand(new ItemStack(Material.AIR)); //From Experience It Seems Setting To null Requires an Inventory Update but new ItemStack(Material.AIR) doesnt seem to need it.
  7.             }
  8.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement