Guest User

Custom Food

a guest
Jul 18th, 2016
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. Command used in the video:
  2.  
  3. /scoreboard players tag @a add FoodHold {SelectedItem:{id:minecraft:emerald}}
  4. /scoreboard players tag @e[tag=FoodStand] add EatEmerald {HandItems:[{id:minecraft:emerald,Count:1b},{}]}
  5. /execute @e[tag=EatEmerald,type=ArmorStand] ~ ~ ~ /scoreboard players set @p FoodEat 30
  6. /execute @e[tag=EatEmerald,type=ArmorStand] ~ ~ ~ /scoreboard players tag @p add EatEmerald
  7. /effect @a[score_FoodEat_min=1,score_FoodEat=1,tag=EatEmerald] minecraft:saturation 1 7
  8. /effect @a[score_FoodEat_min=1,score_FoodEat=1,tag=EatEmerald] minecraft:regeneration 30 2
  9. /execute @a[tag=EatEmerald,score_FoodEat_min=1] ~ ~ ~ /particle iconcrack ~ ~1.5 ~ 0.1 0.1 0.1 0.01 1 normal @a 388
  10. /scoreboard players tag @a[score_FoodEat_min=1,score_FoodEat=1,tag=EatEmerald] remove EatEmerald
  11.  
  12. Sounds:
  13.  
  14. /stopsound @a[tag=EatEmerald] player minecraft:entity.generic.eat
  15. /execute @a[tag=EatEmerald,score_FoodSound_min=3] ~ ~ ~ /playsound minecraft:entity.slime.jump player @a
  16.  
  17. /scoreboard players set @a[tag=EatEmerald] FoodSound 0
  18. /execute @a[tag=EatEmerald] ~ ~ ~ /playsound minecraft:entity.slime.jump player @a
  19.  
  20. If you want to use skulls:
  21.  
  22. /scoreboard players tag @a add FoodHold {SelectedItem:{id:minecraft:skull}}
  23. /scoreboard players tag @e[tag=FoodStand] add EatEmerald {ArmorItems:[{},{},{},{id:minecraft:skull,Count:1b}]}
Advertisement
Add Comment
Please, Sign In to add comment