Paste #127778: composting

Date: 2024/11/03 15:23:05 UTC-08: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


Cooking_Composter:
    type: world
    events:
        on player right clicks composter:
        - foreach <context.location.material.level> as:compost_level:
          - if <player.item_in_hand.has_flag[seed]> && <[compost_level]> <= 7:
            - determine passively cancelled
            - take iteminhand quantity:1
            - playsound sound:block_composter_fill at:<context.location> sound_category:blocks
            - if <util.random_chance[30]>:
              - adjustblock <context.location> level:<[compost_level].add[1]>
              - playeffect effect:COMPOSTER_FILL_ATTEMPT at:<context.location>
              - playsound sound:BLOCK_COMPOSTER_FILL_SUCCESS at:<context.location> sound_category:blocks
          - if <player.item_in_hand.has_flag[food]> && <[compost_level]> <= 7:
            - determine passively cancelled
            - take iteminhand quantity:1
            - playsound sound:block_composter_fill at:<context.location> sound_category:blocks
            - if <util.random_chance[65]>:
              - adjustblock <context.location> level:<[compost_level].add[1]>
              - playeffect effect:COMPOSTER_FILL_ATTEMPT at:<context.location>
              - playsound sound:BLOCK_COMPOSTER_FILL_SUCCESS at:<context.location> sound_category:blocks