Advertisement
tahg

Untitled

May 16th, 2015
371
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float p_77648_8_, float p_77648_9_, float p_77648_10_)
  2. {
  3. if (side != 1)
  4. {
  5. return false;
  6. }
  7. else if (player.canPlayerEdit(x, y, z, side, stack) && player.canPlayerEdit(x, y + 1, z, side, stack))
  8. {
  9. if (world.getBlock(x, y, z).canSustainPlant(world, x, y, z, ForgeDirection.UP, this) && world.isAirBlock(x, y + 1, z))
  10. {
  11. world.setBlock(x, y + 1, z, this.field_150925_a);
  12. --stack.stackSize;
  13. return true;
  14. }
  15. else
  16. {
  17. return false;
  18. }
  19. }
  20. else
  21. {
  22. return false;
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement