Forward Block List Utility


Author: Iroh
Created: 2014-07-11T13:30:33-0400
Edited: 2014-07-11T13:31:21-0400
Denizen Version: 0.9.4
Views: 2
Downloads: 846
Likes: 0


WGET
Description: Calculates the blocks in the direction the player is looking. And adds them to the blockList definition.
The version posted here contains two scirpts the first is a world event utilitizing the blockListUtil script.

blockListTester: 
# Change "define range 20" to the amount of blocks 
# you would like the flame to travel. 
  type: world 
  events: 
    on player right clicks with i@stick: 
    - define range 20 
    - ^inject blockListUtil instantly 
    - ^playeffect <def[blockList]> effect:flame qty:100 

blockListUtil: 
# This is the script where the vector math is done.
  type: task 
  script: 
  - ^define blockList li@ 
  - ^repeat %range% { 
    - ^define currentBlock <player.location.add[<player.location.direction.vector.mul[%value%]>]> 
    - ^define blockList <def[blockList].include[%currentBlock%]> 
    } 




Comments
No one has posted a comment! Post one below: