Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- every 10 seconds:
- loop {generators::*}:
- if {generatorhopper::%loop-value%} is set:
- if block at {generatorhopper::%loop-value%} is not a hopper:
- delete {generatorhopper::%loop-value%}
- if {generatorstatus::%loop-value%} is true:
- if {generatorhopper::%loop-value%} is set:
- if inventory of block at {generatorhopper::%loop-value%} doesn't have space for {generatorlevel::%loop-value%} of {generatordrops::%loop-value%}:
- set line 4 of {generatorholograms::%loop-value%} to "&cHopper Full"
- else if inventory of block at {generatorhopper::%loop-value%} has space for {generatorlevel::%loop-value%} of {generatordrops::%loop-value%}:
- add {generatorlevel::%loop-value%} of {generatordrops::%loop-value%} to inventory of block at {generatorhopper::%loop-value%}
- delete line 4 of {generatorholograms::%loop-value%}
- play 10 happy villager at block at loop-value
- else if {generatorhopper::%loop-value%} is not set:
- drop {generatorlevel::%loop-value%} of {generatordrops::%loop-value%} at block above block at loop-value without velocity
- delete line 4 of {generatorholograms::%loop-value%}
- play 10 happy villager at block at loop-value
- on right click on smoker:
- if {generators::*} contains event-location:
- cancel event
- set {_block} to event-location
- open virtual chest inventory with size 4 named "Generator Properties" to player
- set {_i} to 0
- loop 36 times:
- format a gui slot {_i} of player with black stained glass pane named "&7" to do nothing
- add 1 to {_i}
- if {generatorlevel::%event-location%} is less than or equal to 4:
- set {_level} to {generatorlevel::%event-location%} + 1
- if {generatorlevel::%event-location%} is 5:
- set {_level} to "N/A &7(Max Generator Level)"
- format a gui slot 13 of player with smoker named "&6Plasma Generator &8[%{generatorstars::%event-location%}%&8]" with lore "" and "&fSimply place the generator and allow" and "&fit to generate the specified items" and "" and "&dDrops: &d&l%{generatortype::%event-location%}% &d&lFragment" and "&dCurrent Level: &d&l%{generatorlevel::%event-location%}%" and "&dNext Level: &d&l%{_level}%" and "" to do nothing
- if {generatorstatus::%{_block}%} is true:
- set {_generator} to "&a&lENABLED"
- else if {generatorstatus::%{_block}%} is false:
- set {_generator} to "&c&lDISABLED"
- format a gui slot 20 of player with flower pot named "&6Disable/Enable this generator" with lore "" and "&fClick to toggle this generator to enable" and "&for disable items from being dispensed" and "" and "&fGenerator Status: %{_generator}%" and "" to run:
- if {generatorstatus::%{_block}%} is true:
- set line 5 of lore of slot 20 of player's current inventory to "&fGenerator Status: &c&lDISABLED"
- set line 1 of {generatorholograms::%{_block}%} to "&c%{generatortype::%{_block}%}% &cGenerator"
- set {generatorstatus::%{_block}%} to false
- else if {generatorstatus::%{_block}%} is false:
- set line 5 of lore of slot 20 of player's current inventory to "&fGenerator Status: &a&lENABLED"
- set line 1 of {generatorholograms::%{_block}%} to "&a%{generatortype::%{_block}%}% &aGenerator"
- set {generatorstatus::%{_block}%} to true
- if {generatorhopper::%{_block}%} is set:
- set {_hopper} to {generatorhopper::%{_block}%}
- else if {generatorhopper::%{_block}%} is not set:
- set {_hopper} to "&c&lN/A"
- format a gui slot 22 of player with hopper named "&6Attach/Detach a hopper" with lore "" and "&fClick to attach/detach a hopper that" and "&fwill automatically collect the materials" and "" and "&fCurrent Hopper: &a&l%{_hopper}%" and "" to run:
- close player's inventory
- set {selecthopperblock::%player%} to {_block}
- set {block::%player's uuid%} to {generatorhopper::%{_block}%}
- if {selecthopper::%player%} is not set:
- set {selecthopper::%player%} to true
- else if {selecthopper::%player%} is true:
- set action bar of player to "&cCancelled hopper allocating setup"
- delete {selecthopper::%player%}
- every second:
- loop all players:
- if {selecthopper::%loop-player%} is set:
- set action bar of loop-player to "&aRight-Click a hopper to apply it to the selected generator"
- on right click on hopper:
- if {selecthopper::%player%} is set:
- cancel event
- if {generatorhopper::%{selecthopperblock::%player%}%} is event-location:
- delete {generatorhopper::%{selecthopperblock::%player%}%}
- delete {selecthopper::%player%}
- play 5 happy villager at block at event-block
- send "&cRemoved the clicked hopper from the generator collector" to player
- else if {generatorhopper::%{selecthopperblock::%player%}%} is not event-location:
- set {generatorhopper::%{selecthopperblock::%player%}%} to event-location
- delete {selecthopper::%player%}
- play 5 happy villager at block at event-block
- send "&aAdded the clicked hopper to the generator collector" to player
- on place of cauldron:
- if name of player's tool contains "&6Chunk Buster":
- add location of event-block to {chunkbusters::*}
- create a hologram with lines "&6Chunk Buster" and "&fRight-Click to use" at block above above event-block and store it in {chunkbusterholograms::%event-location%}
- on break of cauldron:
- if {chunkbusters::*} contains event-location:
- cancel drops
- remove location of event-location from {chunkbusters::*}
- delete holo {chunkbusterholograms::%event-location%}
- give cauldron named "&6Chunk Buster" with lore "&7## Purchasable & Tradeable ##" and "" and "&fUse this to destroy a chunk" and "&fthis will remove all blocks in the chunk" and "" and "&dUses: &d&lTrading" to player
- on right click on cauldron:
- if {chunkbusters::*} contains event-location:
- cancel event
- set {_block} to event-block
- open virtual hopper inventory named "Chunk Buster" to player
- format a gui slot 0 and 1 and 3 and 4 of player with black stained glass pane named "&7" to do nothing
- format a gui slot 2 of player with flower pot named "&6Click to clear this chunk" with lore "" and "&fClick to remove all placed blocks in" and "&fthis chunk &cExcluding Special Blocks" and "" and "&dBlocks: &d&l%size of {chunkblocks::%chunk at event-block%::*}%" to run:
- close player's inventory
- set {_chunk} to chunk at {_block}
- set {_loc} to location of {_block}
- loop {chunkblocks::%{_chunk}%::*}:
- set block at loop-value to air
- wait 1 ticks
- delete {chunkblocks::%{_chunk}%::*}
- set block at {_block} to air
- delete holo {chunkbusterholograms::%{_loc}%}
- remove {_loc} from {chunkbusters::*}
- on place:
- if event-block is not cauldron or smoker:
- if player's gamemode is survival:
- add event-location to {chunkblocks::%chunk at event-block%::*}
- on break:
- if event-block is not cauldron or smoker:
- remove event-location from {chunkblocks::%chunk at event-block%::*}
Advertisement
Add Comment
Please, Sign In to add comment