Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- SIZE: 0.5 # The size of the cube that will be displayed, 0.5 is by default the size of a block from center as cube.
- DENSITY: 20 # The density of lines
- COLOUR: PINK # The colour
- function Cube(l: location, s: num):
- set {_negitive} to {_s} * -1
- set {_a} to {_l} ~ vector({_s},{_s},{_s})
- set {_b} to {_l} ~ vector({_negitive},{_s},{_s})
- set {_c} to {_l} ~ vector({_negitive},{_s},{_negitive})
- set {_d} to {_l} ~ vector({_s},{_s},{_negitive})
- set {_e} to {_l} ~ vector({_s},{_negitive},{_s})
- set {_f} to {_l} ~ vector({_negitive},{_negitive},{_s})
- set {_g} to {_l} ~ vector({_negitive},{_negitive},{_negitive})
- set {_h} to {_l} ~ vector({_s},{_negitive},{_negitive})
- add AddLine({_a}, {_b}) to {_s::*}
- add AddLine({_b}, {_b}) to {_s::*}
- add AddLine({_c}, {_c}) to {_s::*}
- add AddLine({_d}, {_a}) to {_s::*}
- add AddLine({_e}, {_f}) to {_s::*}
- add AddLine({_f}, {_g}) to {_s::*}
- add AddLine({_g}, {_h}) to {_s::*}
- add AddLine({_h}, {_e}) to {_s::*}
- add AddLine({_a}, {_e}) to {_s::*}
- add AddLine({_b}, {_f}) to {_s::*}
- add AddLine({_c}, {_g}) to {_s::*}
- add AddLine({_d}, {_h}) to {_s::*}
- function AddLine(l: location, l2: location) :: locations:
- set {_v} to vector from {_l} to {_l2}
- loop (distance between {_l} and {_l2} * {@DENSITY}) times:
- set vector length of {_v} to loop-value / {@DENSITY}
- add {_l} ~ {_v} to {_r::*}
- return {_r::*}
- command /ToggleOverlay:
- trigger:
- if {Overlay::%player's uuid%} is set:
- delete {Overlay::%player's uuid%}
- send "&7Toggled off!"
- else:
- set {Overlay::%player's uuid%} to true
- send "&7Toggled on!"
- every tick:
- loop all players:
- if {Overlay::%loop-player's uuid%} is set:
- set {_loc} to target block of loop-player ~ vector(0,1,0)
- draw 1 of dust using dustOption({COLOUR}, 0.5) at Cube({_loc}, {SIZE})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement