Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. Callback.addCallback("DestroyBlock", function(c, block, player){
  2. if(block.id == 18 || block.id == 161){
  3. let id;
  4. if(block.id == 18){
  5. if([0, 4, 8].indexOf(block.data) != -1) id = ItemID.OakLeaf;
  6. else if(1, 5, 9].indexOf(block.data) != -1) id = ItemID.PineNeedle;
  7. else if([2, 6, 10].indexOf(block.data) != -1) id = ItemID.BirchLeaf;
  8. else if([3, 7, 11].indexOf(block.data) != -1) id = ItemID.TropicalTreeLeaf;
  9. }else{
  10. if([0, 4, 8].indexOf(block.data) != -1) id = ItemID.AcaciaLeaf;
  11. else if([1, 5, 9].indexOf(block.data) != -1) id = ItemID.AcaciaLeaf;
  12. }
  13. World.drop(c.x, c.y, c.z, id, java.util.Random(3), 0);
  14. }
  15. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement