Paste #126374: Find block in horizontal (nearest)

Date: 2024/09/07 13:11:49 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15


timeCheck2:
    type: task
    script:
        - foreach <server.flag[farmlandLoc]> as:farmland:
            - narrate <[farmland]>
            - repeat 4 as:count:
                - note <[farmland].to_cuboid[<[farmland]>]> as:sArea
                - note <cuboid[sArea].expand_one_side[<[count]>,0,<[count]>]> as:sArea
                - note <cuboid[sArea].expand_one_side[-<[count]>,0,-<[count]>]> as:sArea
                - foreach <cuboid[sArea].list_members> as:member:
                    - foreach <[member].outline> as:check:
                        - if <[check].material> == <material[water]>:
                            - narrate "WATER:  <[check]> <[count]>"
                            - repeat stop