Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- notMinion: &eThis is not your minion!
- minionName: %player%'s minion
- minionNameColor: yellow
- armorColor: 16759145
- balance: player's balance
- balanceInFunction: {_p}'s balance
- # /summon armor_stand ~ ~ ~ {Invulnerable:1b,NoBasePlate:1b,ShowArms:1b,Small:1b,ArmorItems:[{id:"leather_boots",Count:1b,tag:{display:{color:16759145}}},{id:"leather_leggings",Count:1b,tag:{display:{color:16759145}}},{id:"leather_chestplate",Count:1b,tag:{display:{color:16759145}}},{id:"leather_helmet",Count:1b,tag:{display:{color:16759145}}}],HandItems:[{id:"minecraft:diamond_pickaxe",Count:1b},{}],CustomName:"{\"text\":\"%player%'s minion\",\"color\":\"yellow\"}",CustomNameVisible:1b,Pose:{Head:[357f,0f,0f],RightArm:[354f,0f,0f]}}
- on place of iron block:
- spawn armor stand at block above event-block
- add "{Type:iron,MinionOwner:[{%player's uuid%}],Invulnerable:1b,NoBasePlate:1b,ShowArms:1b,Small:1b,ArmorItems:[{id:""leather_boots"",Count:1b,tag:{display:{color:{@armorColor}}}},{id:""leather_leggings"",Count:1b,tag:{display:{color:{@armorColor}}}},{id:""leather_chestplate"",Count:1b,tag:{display:{color:{@armorColor}}}},{id:""leather_helmet"",Count:1b,tag:{display:{color:{@armorColor}}}}],HandItems:[{id:""minecraft:iron_pickaxe"",Count:1b},{}],Pose:{Head:[357f,0f,0f],RightArm:[354f,0f,0f]}, Slots:1,CustomName:""{\""text\"":\""{@minionName}\"",\""color\"":\""{@minionNameColor}\""}"",CustomNameVisible:1b}" to nbt of last spawned entity
- set {blocksmined.stack.1::%last spawned entity%} to 0
- set {blocksmined.stack.2::%last spawned entity%} to 0
- set {blocksmined.stack.3::%last spawned entity%} to 0
- set {blocksmined.stack.4::%last spawned entity%} to 0
- set {blocksmined.stack.5::%last spawned entity%} to 0
- set {blocksmined.stack.6::%last spawned entity%} to 0
- set {blocksmined.stack.7::%last spawned entity%} to 0
- set {blocksmined.stack.8::%last spawned entity%} to 0
- set {blocksmined.stack.9::%last spawned entity%} to 0
- loop all blocks within radius 5 of block under last spaned entity:
- y axis of loop-block = y axis of block under event-entity
- loop-block is not iron block
- set loop-block to iron ore
- every 15 seconds:
- loop all entities:
- loop-entity is armor stand
- if nbt of loop-entity contains "Type:iron":
- mine(loop-entity, iron)
- on right click on armor stand:
- nbt of event-entity contains "MinionOwner:[{%player's uuid%}]":
- nbt of event-entity contains "Type:iron":
- open virtual chest inventory with size 5 named "Iron Minion" to player
- format gui slot 0, 1, 2, 3, 4, 5, 6, 7, 8, 36, 37, 38, 39, 40, 41, 42, 43, and 44 with black stained glass pane named " "
- format gui slot 9, 10, 11, 12, 13, 14, 18, 19, 20, 21, 22, 23, 27, 28, 29, 30, 31, and 32 with dark gray stained glass pane named " "
- if nbt of event-entity contains "Slots:1":
- format gui slot 16, 17, 24, 25, 26, 33, 34, and 35 of player with barrier named " "
- format gui slot 15 of player with {blocksmined.stack.1::%event-entity%} of iron ore named "&7Iron Ore"
- else if nbt of event-entity contains "Slots:2":
- format gui slot 17, 24, 25, 26, 33, 34, and 35 of player with barrier named " "
- format gui slot 15 of player with {blocksmined.stack.1::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 16 of player with {blocksmined.stack.2::%event-entity%} of iron ore named "&7Iron Ore"
- else if nbt of event-entity contains "Slots:3":
- format gui slot 24, 25, 26, 33, 34, and 35 of player with barrier named " "
- format gui slot 15 of player with {blocksmined.stack.1::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 16 of player with {blocksmined.stack.2::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 17 of player with {blocksmined.stack.3::%event-entity%} of iron ore named "&7Iron Ore"
- else if nbt of event-entity contains "Slots:4":
- format gui slot 25, 26, 33, 34, and 35 of player with barrier named " "
- format gui slot 15 of player with {blocksmined.stack.1::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 16 of player with {blocksmined.stack.2::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 17 of player with {blocksmined.stack.3::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 24 of player with {blocksmined.stack.4::%event-entity%} of iron ore named "&7Iron Ore"
- else if nbt of event-entity contains "Slots:5":
- format gui slot 26, 33, 34, and 35 of player with barrier named " "
- format gui slot 15 of player with {blocksmined.stack.1::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 16 of player with {blocksmined.stack.2::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 17 of player with {blocksmined.stack.3::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 24 of player with {blocksmined.stack.4::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 25 of player with {blocksmined.stack.5::%event-entity%} of iron ore named "&7Iron Ore"
- else if nbt of event-entity contains "Slots:6":
- format gui slot 33, 34, and 35 of player with barrier named " "
- format gui slot 15 of player with {blocksmined.stack.1::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 16 of player with {blocksmined.stack.2::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 17 of player with {blocksmined.stack.3::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 24 of player with {blocksmined.stack.4::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 25 of player with {blocksmined.stack.5::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 26 of player with {blocksmined.stack.6::%event-entity%} of iron ore named "&7Iron Ore"
- else if nbt of event-entity contains "Slots:7":
- format gui slot 34 and 35 of player with barrier named " "
- format gui slot 15 of player with {blocksmined.stack.1::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 16 of player with {blocksmined.stack.2::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 17 of player with {blocksmined.stack.3::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 24 of player with {blocksmined.stack.4::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 25 of player with {blocksmined.stack.5::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 26 of player with {blocksmined.stack.6::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 33 of player with {blocksmined.stack.7::%event-entity%} of iron ore named "&7Iron Ore"
- else if nbt of event-entity contains "Slots:8":
- format gui slot 25 of player with barrier named " "
- format gui slot 15 of player with {blocksmined.stack.1::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 16 of player with {blocksmined.stack.2::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 17 of player with {blocksmined.stack.3::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 24 of player with {blocksmined.stack.4::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 25 of player with {blocksmined.stack.5::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 26 of player with {blocksmined.stack.6::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 33 of player with {blocksmined.stack.7::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 34 of player with {blocksmined.stack.8::%event-entity%} of iron ore named "&7Iron Ore"
- else if nbt of event-entity contains "Slots:9":
- format gui slot 15 of player with {blocksmined.stack.1::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 16 of player with {blocksmined.stack.2::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 17 of player with {blocksmined.stack.3::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 24 of player with {blocksmined.stack.4::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 25 of player with {blocksmined.stack.5::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 26 of player with {blocksmined.stack.6::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 33 of player with {blocksmined.stack.7::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 34 of player with {blocksmined.stack.8::%event-entity%} of iron ore named "&7Iron Ore"
- format gui slot 35 of player with {blocksmined.stack.9::%event-entity%} of iron ore named "&7Iron Ore"
- else:
- send "&eThat is not your minion!"
- function mine(a: entity, t: item):
- loop all blocks within radius 5 of block under {_a}:
- y axis of loop-block = y axis of block under {_a}:
- event-block is {_t}
- chance of 30%:
- if {blocksmined.stack.1::%{_a}%} < 64:
- add 1 to {blocksmined.stack.1::%{_a}%}
- set event-block to air
- else if {blocksmined.stack.2::%{_a}%} < 64:
- nbt of {_a} contains "Slots:2", "Slots:3", "Slots:4", "Slots:5", "Slots:6", "Slots:7", "Slots:8", or "Slots:9"
- add 1 to {blocksmined.stack.2::%{_a}%}
- set event-block to air
- else if {blocksmined.stack.3::%{_a}%} < 64:
- nbt of {_a} contains "Slots:3", "Slots:4", "Slots:5", "Slots:6", "Slots:7", "Slots:8", or "Slots:9"
- add 1 to {blocksmined.stack.3::%{_a}%}
- set event-block to air
- else if {blocksmined.stack.4::%{_a}%} < 64:
- nbt of {_a} contains "Slots:4", "Slots:5", "Slots:6", "Slots:7", "Slots:8", or "Slots:9"
- add 1 to {blocksmined.stack.4::%{_a}%}
- set event-block to air
- else if {blocksmined.stack.5::%{_a}%} < 64:
- nbt of {_a} contains "Slots:5", "Slots:6", "Slots:7", "Slots:8", or "Slots:9"
- add 1 to {blocksmined.stack.5::%{_a}%}
- set event-block to air
- else if {blocksmined.stack.6::%{_a}%} < 64:
- nbt of {_a} contains "Slots:6", "Slots:7", "Slots:8", or "Slots:9"
- add 1 to {blocksmined.stack.6::%{_a}%}
- set event-block to air
- else if {blocksmined.stack.7::%{_a}%} < 64:
- nbt of {_a} contains "Slots:7", "Slots:8", or "Slots:9"
- add 1 to {blocksmined.stack.7::%{_a}%}
- set event-block to air
- else if {blocksmined.stack.8::%{_a}%} < 64:
- nbt of {_a} contains "Slots:8" or "Slots:9"
- add 1 to {blocksmined.stack.8::%{_a}%}
- set event-block to air
- else if {blocksmined.stack.9::%{_a}%} < 64:
- nbt of {_a} contains "Slots:9"
- add 1 to {blocksmined.stack.9::%{_a}%}
- set event-block to air
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement