Paste #76409: Untitled Paste

Date: 2020/10/13 18:15:07 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


Entity_Food_Script:
    type: world
    debug: false
    events:
        on delta time secondly every:5:
            - define data <script[Entity_Food_Data]>
            - define world_animals <world[world].entities[<[data].data_key[entities]>]||null>
            - if <[world_animals]> != null:
                - foreach <[world_animals]> as:animal:
                    - if !<[animal].is_spawned> || !<[animal].location.chunk.is_loaded>:
                        - stop
                        - define blocks <[animal].location.find.surface_blocks[HAY_BLOCK].within[<[data].data_key[block_limit]>]||null>