Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on right click on ender chest:
- cancel event
- block over the event-block is air
- player is not sneaking
- play sound "block.enderchest.open" with volume 0.5 and pitch 1 at player
- EnderChestOpen(player)
- function EnderChestOpen(p: player):
- open chest with 6 row named "&8ストレージ選択 &7- &d&l&o[&8&o拡張エンダーチェスト&d&l&o]" to {_p}
- loop 54 times:
- 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..."
- on inventory click:
- name of event-inventory is "&8ストレージ選択 &7- &d&l&o[&8&o拡張エンダーチェスト&d&l&o]"
- play sound "block.enderchest.open" with volume 0.25 and pitch 2 at player
- open chest with 6 row named "&8&lストレージ %clicked slot + 1% &7- &d&l&o[&8&o拡張エンダーチェスト&d&l&o]" to player
- loop 54 times:
- set slot loop-number - 1 of player's current inventory to {EnderChest.%clicked slot + 1%.%loop-number%.%player%}
- on inventory close:
- if name of event-inventory is "&8ストレージ選択 &7- &d&l&o[&8&o拡張エンダーチェスト&d&l&o]":
- play sound "block.enderchest.close" with volume 0.5 and pitch 1 at player
- stop
- loop 54 times:
- name of event-inventory is "&8&lストレージ %loop-number% &7- &d&l&o[&8&o拡張エンダーチェスト&d&l&o]"
- play sound "block.enderchest.close" with volume 0.25 and pitch 2 at player
- loop 54 times:
- set {EnderChest.%loop-number-1%.%loop-number-2%.%player%} to slot -1 + loop-number-2 of player's current inventory
- wait a tick
- EnderChestOpen(player)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement