Paste #125846: Unnamed Denizen Script Paste

Date: 2024/08/22 14:47:21 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
16
17
18
19
20
21


chemtest:
    debug: true
    type: task
    script:
    - define schem:"Cherry_Tree01"
    - if <[schem]> not in <schematic.list>:
        - ~schematic load name:Cherry_Tree01

    - define PlayerLoc:<player.location>
    - narrate <[PlayerLoc]>
    - narrate <schematic[<[schem]>].cuboid[<[PlayerLoc]>]>
    - define cuboid_area:<schematic[<[schem]>].cuboid[<[PlayerLoc]>]>

    # Filter out all solid blocks within the cuboid
    - define solid_blocks <[cuboid_area].blocks.filter_tag[material.is_solid]>

    # You can now loop through or manipulate the solid blocks as needed
    - foreach <[solid_blocks]> as:solid_block:
      - narrate "Solid block found: <[solid_block].material.name>"
    #
    #- ~schematic paste name:<[parts].get[2]> <location[<[PlaceX]>,<[PlaceY]>,<[PlaceZ]>,<[PlaceW]>]>