builder_wand_test: type: world debug: true events: on player right clicks block with:job_hammer_test: - if : #Mode selection part - if : - define mode - define modes - define current - define index <[modes].find[<[mode]>]> - define new_mode <[modes].get[<[index].add[1]>].if_null[<[modes].first>]> - playsound sound:entity_experience_orb_pickup - inventory flag slot:HAND mode:<[new_mode]> - actionbar "Marteau mode: <[new_mode]>" - else: - if !: - define block #display shape part #Choose direction - choose : - case north: - choose : #Choose mode - case ligne: - define cuboid ]> - case sol: - define cuboid ]> - case colonne: - define cuboid ]> - case mur: - define cuboid ]> - run build_hammer def:<[block]>|<[cuboid]> build_hammer_task: type: task definitions: build_hammer script: - if !: - debugblock clear - flag holobuild_o: expire:2s - debugblock <[cuboid].blocks> color:lime players: d:2s #Build shape part - else: - if ].quantity[9]>: - debugblock clear - foreach <[cuboid].blocks> as:shape: - foreach next if:!]> - modifyblock <[shape]> <[block]> delayed - playeffect at:<[shape]> effect:white_ash quantity:10 offset:1 visibility:20 - wait 10t