Date: 2023/06/11 23:47:14 UTC-07:00
Type: Denizen Script
ev_wool_spores:
type: world
events:
on player right clicks block with:it_wool_spores:
- determine passively cancelled
- if <context.location.material.name> in <script[game_data].data_key[rainbow_wool]>:
- playsound <context.location> sound:ITEM_NETHER_WART_PLANT volume:5
- flag server wool_spore_appetite:<script[items].parsed_key[it_wool_spores.appetite]>
- take slot:<context.hand>
- run ev_burn_wool def:<context.location>
ev_burn_wool:
type: task
definitions: location
script:
- modifyblock <[location]> black_wool
- playsound <[location]> sound:block_composter_fill volume:0.25
- wait <script[items].parsed_key[it_wool_spores.spread_speed]>
- if not <[location].center.exists>:
- determine cancelled
- foreach <[location].center.find_blocks[<script[game_data].data_key[rainbow_wool]>].within[1.74]> as:spread_location:
- if <server.flag[wool_spore_appetite].is_more_than[0]>:
- flag server wool_spore_appetite:<server.flag[wool_spore_appetite].sub[1]>
- run ev_burn_wool def:<[spread_location]>
- playeffect effect:smoke at:<[location].center> quantity:100 offset:0.25
- wait <script[items].parsed_key[it_wool_spores.eat_speed]>
- playeffect effect:block_dust at:<[location].center> special_data:<[location].material> quantity:25 offset:0.25
- playeffect effect:smoke_large at:<[location].center> quantity:10 offset:0.3
- modifyblock <[location]> air
- playsound <[location]> sound:block_composter_ready volume:0.25 pitch:2
- blockcrack <[location]> progress:0