templatetools_world_cleanup: debug: false type: world events: after server start: - foreach ]> as:schematic: - schematic unload name:<[schematic]> - foreach as:player: - flag <[player]> templatetools_undo:! templatetools_world_preview: debug: false type: world events: on player walks: - if !: - stop - if !: - stop - if !: - stop - if !: - stop - run templatetools_preview_queue def.player: def.schematic: on player scrolls their hotbar: - if !: - stop - if !: - stop - if : - if !: - stop - determine cancelled passively - if > : - if == 1 && == 9: - run templatetools_pack_increment def.player: - else: - run templatetools_pack_decrement def.player: - else: - if == 9 && == 1: - run templatetools_pack_decrement def.player: - else: - run templatetools_pack_increment def.player: - run templatetools_schematic_set_index def.player: - run templatetools_preview_queue def.player: def.schematic: - else: - if !: - stop - if ].material.name> == spider_eye: - run templatetools_preview_queue def.player: def.schematic: - else: - run templatetools_preview_clear def.player: after player clicks in inventory: - if !: - stop - if !: - stop - if !: - stop - if : - run templatetools_preview def.player: def.schematic: - determine cancelled passively - else: - run templatetools_preview_clear def.player: on player left clicks block: - if !: - stop - if !: - stop - if !: - stop - if !: - stop - determine cancelled passively - if : - schematic rotate name: angle:90 - run templatetools_preview_queue def.player: def.schematic: - actionbar "<&e>Rotated schematic 90 degrees." - else: - run templatetools_preview_paste def.player: def.schematic: save:return - define count - narrate format:templatetools_formats_main "Placed schematic (<[count]>)." templatetools_world_redtorchtool: debug: false type: world events: on player right clicks block: - if !: - stop - if !: - stop - if : - stop - determine cancelled passively - if != null: - switch no_physics - narrate format:templatetools_formats_main "Switched block state."