Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #multiblock structure
- #rename function
- options:
- logo: &6&lBS&8:&7
- function gui(p: Player):
- open chest with 6 rows named "&8Anvil" to {_p}
- wait 2 ticks
- loop 9 times:
- set slot loop-value - 1 of {_p}'s current inventory to gray stained glass pane named "&8"
- set slot 54-loop-value of {_p}'s current inventory to gray stained glass pane named "&8"
- loop 5 times:
- set slot loop-value * 9 of {_p}'s current inventory to gray stained glass pane named "&8"
- set slot loop-value * 9-1 of {_p}'s current inventory to gray stained glass pane named "&8"
- on rightclick on smooth stone:
- if player is not sneaking:
- if {anvil.%location of clicked block%} is true:
- gui(player)
- cancel event
- on rightclick holding stone axe:
- if clicked block is smooth stone or iron block or diamond block:
- if {anvil.%location of event-block%} is not true:
- set {anvil.%location of event-block%} to true
- set {_tier} to "Tier I"
- if clicked block is smooth stone:
- set {anvil.%location of event-block%.tier} to 1
- else if clicked block is iron block:
- set {anvil.%location of event-block%.tier} to 2
- set {_tier} to "Tier II"
- else:
- set {anvil.%location of event-block%.tier} to 3
- set {_tier} to "Tier III"
- set {_s} to 6
- loop all players in radius 6 around event-block:
- set {_v} to ({_s} - distance between loop-player and event-block)
- play sound "block.anvil.place" with volume {_v} and pitch 0 to loop-player
- send "{@logo} Successfully created an anvil of %{_tier}%."
- summon armor stand at location 0.7 meters below event-block
- set name of last spawned armor stand to "&7%{_tier}%"
- add "{Invisible:1b,NoGravity:1b,NoAI:1b,CustomNameVisible:1}" to NBT of last spawned armor stand
- on break of smooth stone or iron block or diamond block:
- if {anvil.%location of event-block%} is true:
- set {_s} to 6
- loop all players in radius 6 around event-block:
- set {_v} to ({_s} - distance between loop-player and event-block)
- play sound "block.anvil.place" with volume {_v} and pitch 0 to loop-player
- delete {anvil.%location of event-block%}
- delete {anvil.%location of event-block%.tier}
- loop entities in radius 1 around event-block:
- if type of loop-entity is armor stand:
- kill loop-entity
- on inventory click:
- if type of clicked inventory is chest inventory:
- if inventory name of player's current inventory is "&8Anvil":
- cancel event
- command /stair:
- trigger:
- send "%block 1 meters below player%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement