Date: 2023/06/22 04:35:16 UTC-07:00
Type: Denizen Script
corn_growth_handler:
type: world
debug: true
events:
#Check if the world time is 7:00 AM
after time 7 in world:
- foreach <server.flag[farmingbox]> as:FB:
- if <[FB].has_flag[watered]>:
- choose <context.location.blocks_flagged[corn]>:
- case stage1:
- spawn crops_stand <context.location.center.below[0.87]> save:cs
- equip <entry[cs].spawned_entity> head:<item[corn_stage2]>
- flag <context.location> corn:stage2
- case stage2:
- spawn crops_stand <context.location.center.below[0.87]> save:cs
- equip <entry[cs].spawned_entity> head:<item[corn_stage3]>
- flag <context.location> corn:stage3
- case stage3:
- spawn crops_stand <context.location.center.below[0.87]> save:cs
- equip <entry[cs].spawned_entity> head:<item[corn_stage4]>
- flag <context.location> corn:stage4
- else:
- determine passively cancelled