Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Variables:
- #Block Type
- {_block.A} = iron block
- {_block.B} = gold block
- {_block.C} = diamond block
- {_block.D} = emerald block
- #Numbers of Blocks
- {_number.block.Base} = 83
- {_number.block.Coil} = 32
- {_number.block.Total} = 115
- {_number.block.CoilAir} = 311
- #Generation Rate (MT/s)
- {_generate.iron} = 10
- {_generate.gold} = 15
- {_generate.diamond} = 25
- {_generate.emerald} = 40
- #Loop both base and coil
- On left click on beacon with nether star:
- set {_center.Coil} to the block above block above the block above the block above the block above event-block
- loop blocks in radius 6 around event-block:
- if loop-block is iron block:
- add 1 to {_count.block.A.Total}
- if loop-block is gold block:
- add 1 to {_count.block.B.Total}
- if loop-block is diamond block:
- add 1 to {_count.block.C.Total}
- if loop-block is emerald block:
- add 1 to {_count.block.D.Total}
- if loop-block is a lever:
- set {_switch} to location of loop-block
- #Loop coil
- loop blocks in radius 6 around {_center.Coil}:
- if loop-block is air:
- add 1 to {_count.block.air.Coil}
- if loop-block is {_block.A}:
- add 1 to {_count.block.A.Coil}
- if loop-block is {_block.B}:
- add 1 to {_count.block.B.Coil}
- if loop-block is {_block.C}:
- add 1 to {_count.block.C.Coil}
- if loop-block is {_block.D}:
- add 1 to {_count.block.D.Coil}
- #Debug only
- send "&c&lDebug: &fYou have %{_count.block.A.Total}% iron blocks, %{_count.block.B.Total}% gold blocks,
- %{_count.block.C.Total}% diamond blocks, %{_count.block.D.Total}% emerald blocks" to player
- # Checking Multiblock
- if {_switch} is set:
- if {_count.block.A.Total} >= {_number.block.Total}:
- set {_type.Base} to iron block
- set {_type.Coil} to iron block
- else if {_count.block.B.Total} >= {_number.block.Total}:
- set {_type.Base} to gold block
- set {_type.Coil} to gold block
- else if {_count.block.C.Total} >= {_number.block.Total}:
- set {_type.Base} to diamond block
- set {_type.Coil} to diamond block
- else if {_count.block.D.Total} >= {_number.block.Total}:
- set {_type.Base} to emerald block
- set {_type.Coil} to emerald block
- else:
- if {_count.block.air.Coil} >= {_number.block.CoilAir}:
- if {_count.block.A.Coil} >= {_number.block.Coil}:
- set {_type.Coil} to iron block
- else if {_count.block.B.Coil} >= {_number.block.Coil}:
- set {_type.Coil} to gold block
- else if {_count.block.C.Coil} >= {_number.block.Coil}:
- set {_type.Coil} to diamond block
- else if {_count.block.D.Coil} >= {_number.block.Coil}:
- set {_type.Coil} to emerald block
- else:
- send "&9System> &eInvalid setup!" to player
- stop trigger
- if {_count.block.A.Total} >= {_number.block.Base}:
- set {_type.Base} to iron block
- else if {_count.block.B.Total} >= {_number.block.Base}:
- set {_type.Base} to gold block
- else if {_count.block.C.Total} >= {_number.block.Base}:
- set {_type.Base} to diamond block
- else if {_count.block.D.Total} >= {_number.block.Base}:
- set {_type.Base} to emerald block
- else:
- send "&9System>&eInvalid setup!" to player
- stop trigger
- else:
- send "&9System> &eInvalid setup!" to player
- stop trigger
- else:
- send "&9System> &eInvalid setup!" to player
- stop trigger
- #Calculating output
- if {_type.Base} is iron block:
- set {_output} to "%{_generate.iron}%^3"
- else if {_type.Base} is gold block:
- if {_type.Coil} is iron block:
- set {_output} to "(%{_generate.gold}% ^ 2) * %{_generate.iron}%"
- else if {_type.Coil} is gold block:
- set {_output} to "%{_generate.gold}% ^ 3"
- else if {_type.Base} is diamond block:
- if {_type.Coil} is iron block:
- set {_output} to "(%{_generate.diamond}% ^ 2) * %{_generate.iron}%"
- else if {_type.Coil} is gold block:
- set {_output} to "(%{_generate.diamond}% ^ 2) * %{_generate.gold}%"
- else if {_type.Coil} is diamond block:
- set {_output} to "%{_generate.diamond}% ^ 3"
- else if {_type.Base} is emerald block:
- if {_type.Coil} is iron block:
- set {_output} to "(%{_generate.emerald}% ^ 2) * %{_generate.iron}%"
- else if {_type.Coil} is gold block:
- set {_output} to "(%{_generate.emerald}% ^ 2) * %{_generate.gold}%"
- else if {_type.Coil} is diamond block:
- set {_output} to "(%{_generate.emerald}% ^ 2) * %{_generate.diamond}%"
- else if {_type.Coil} is emerald block:
- set {_output} to "%{_generate.emerald}% ^ 3"
- send "&9System> &eSetup success! Current output is &b%{_output}%&e!" to player
Advertisement
Add Comment
Please, Sign In to add comment