Advertisement
SuzukazeK

Untitled

Mar 3rd, 2020
552
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. on right click on ender chest:
  2. cancel event
  3. block over the event-block is air
  4. player is not sneaking
  5. play sound "block.enderchest.open" with volume 0.5 and pitch 1 at player
  6. EnderChestOpen(player)
  7.  
  8. function EnderChestOpen(p: player):
  9. open chest with 6 row named "&8ストレージ選択 &7- &d&l&o[&8&o拡張エンダーチェスト&d&l&o]" to {_p}
  10. loop 54 times:
  11. set slot loop-number - 1 of {_p}'s current inventory to chest named "&fストレージ %loop-number%" with lore "&7&o%{EnderChest.%loop-number%.1.%{_p}%}%","&7&o%{EnderChest.%loop-number%.2.%{_p}%}%" ,"&7&o%{EnderChest.%loop-number%.3.%{_p}%}%" and "&8&o..."
  12.  
  13. on inventory click:
  14. name of event-inventory is "&8ストレージ選択 &7- &d&l&o[&8&o拡張エンダーチェスト&d&l&o]"
  15. play sound "block.enderchest.open" with volume 0.25 and pitch 2 at player
  16. open chest with 6 row named "&8&lストレージ %clicked slot + 1% &7- &d&l&o[&8&o拡張エンダーチェスト&d&l&o]" to player
  17. loop 54 times:
  18. set slot loop-number - 1 of player's current inventory to {EnderChest.%clicked slot + 1%.%loop-number%.%player%}
  19.  
  20. on inventory close:
  21. if name of event-inventory is "&8ストレージ選択 &7- &d&l&o[&8&o拡張エンダーチェスト&d&l&o]":
  22. play sound "block.enderchest.close" with volume 0.5 and pitch 1 at player
  23. stop
  24. loop 54 times:
  25. name of event-inventory is "&8&lストレージ %loop-number% &7- &d&l&o[&8&o拡張エンダーチェスト&d&l&o]"
  26. play sound "block.enderchest.close" with volume 0.25 and pitch 2 at player
  27. loop 54 times:
  28. set {EnderChest.%loop-number-1%.%loop-number-2%.%player%} to slot -1 + loop-number-2 of player's current inventory
  29. wait a tick
  30. EnderChestOpen(player)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement