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