spawn_woodsman: type: item debug: true material: stick display name: summon woodsman recipes: 1: type: shaped input: - air|air|air - air|oak_log|air - air|stick|air spawn_woodsmand_handler: type: world debug: true events: on player right clicks block with:spawn_woodsman: - create player WoodsMan save:WoodsMan - equip hand:iron_axe - adjust can_pickup_items:true - assignment set script:woodsman_npc_assignment npc: woodsman_npc_assignment: type: assignment debug: true actions: on assignment: - trigger name:click state:true - define woodsman_chest_location - wait 1t - foreach as:WOOD: - walk <[WOOD].right> auto_range - wait 1s system - while : - wait 3s system - chat "distance above <[WOOD].y.sub[]>" - if <[WOOD].y.sub[]> < 4: - break <[WOOD]> radius:3 - foreach as:LEAVES: - ~walk <[LEAVES].below> auto_range - wait 1s system - while : - wait .1s system - chat "distance above <[LEAVES].y.sub[]>" - if <[LEAVES].y.sub[]> < 4: - break <[LEAVES]> radius:3 on click: - chat "hello"