Paste #123432: Unnamed Denizen Script Paste

Date: 2024/06/04 01:06:57 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


fire_spread_handler:
    type: world
    events:
        # Only allow blocks flagged with fire_spread_block to be broken by fire
        on block burns:
            - if <context.location.has_flag[fire_spread_block]>:
                - wait 2.5m
                - modifyblock <context.location> <context.material>
                - stop
            - determine cancelled
        after block ignites:
            - if <context.location.material.faces.is_empty>:
                - if !<context.location.below.has_flag[fire_spread_block]>:
                    - modifyblock <context.location> air
                - stop
            - foreach <context.location.material.faces> as:face:
                - if <[face]> == null:
                    - if !<context.location.below.has_flag[fire_spread_block]>:
                        - modifyblock <context.location> air
                    - foreach next
                - define vec <[face].proc[faces_to_normal_vec]>
                - if !<context.location.sub[<[vec]>].has_flag[fire_spread_block]>:
                    - modifyblock <context.location> air