commit 0a7ebf7507eb5134a3b5bd625711949fb51ae88a Author: minco Date: Sun Aug 17 21:52:18 2025 +0900 feat: owlaunch diff --git a/README.md b/README.md new file mode 100644 index 0000000..16a7c81 --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# mc-commands + +Various minecraft commands that compiles into one command via [Haskell One-Command Generator](https://git.walruslab.org/mincomk/onecommand-hs) + +## List + +- [OW Launch](/owlaunch): Fly straight with right-click diff --git a/owlaunch/README.md b/owlaunch/README.md new file mode 100644 index 0000000..342e885 --- /dev/null +++ b/owlaunch/README.md @@ -0,0 +1,15 @@ +# OW Launch + +Fly straight with right-click + +## Getting an Item + +Run the command to get an item. + +``` +tag @s add o.w.l.getitem +``` + +## Usage + +Right click the item to fly. diff --git a/owlaunch/fly.mcf b/owlaunch/fly.mcf new file mode 100644 index 0000000..894eea9 --- /dev/null +++ b/owlaunch/fly.mcf @@ -0,0 +1,12 @@ +!REPEATING + +tag @a[tag=!o.w.l.done] add o.w.l.iter + + +execute as @e[tag=o.w.l.cloud] if score @s o.w.l.cloud = @e[limit=1,tag=o.w.l.iter] o.w.l.puid run tag @e[tag=o.w.l.iter] add o.w.launch + + +tag @e[tag=o.w.l.iter,limit=1] add o.w.l.done +tag @e remove o.w.l.iter + +execute unless entity @a[tag=!o.w.l.done] run tag @e remove o.w.l.done diff --git a/owlaunch/get.mcf b/owlaunch/get.mcf new file mode 100644 index 0000000..960bdc7 --- /dev/null +++ b/owlaunch/get.mcf @@ -0,0 +1,4 @@ +!REPEATING + +give @a[tag=o.w.l.getitem] minecraft:feather[consumable={consume_seconds:0.01, has_consume_particles:false, animation:"none", sound: "minecraft:ui.toast.in"}, enchantment_glint_override=true, custom_data={role:"o.w.l.fly"}, custom_name={text:"Shoot",italic:false,color:"aqua"}, max_stack_size=1] +tag @e remove o.w.l.getitem diff --git a/owlaunch/init.mcf b/owlaunch/init.mcf new file mode 100644 index 0000000..3a765a5 --- /dev/null +++ b/owlaunch/init.mcf @@ -0,0 +1,7 @@ +!REPEATING + +scoreboard objectives add o.w.l.internal dummy +scoreboard objectives add o.w.l.puid dummy +scoreboard objectives add o.w.l.cloud dummy +scoreboard objectives add o.w.l.timer dummy +scoreboard objectives add o.w.l.used minecraft.used:minecraft.feather diff --git a/owlaunch/launch.mcf b/owlaunch/launch.mcf new file mode 100644 index 0000000..7074c54 --- /dev/null +++ b/owlaunch/launch.mcf @@ -0,0 +1,18 @@ +!REPEATING + +execute as @e[tag=o.w.launch] if entity @s[gamemode=survival] run scoreboard players set $gm o.w.l.internal 0 +execute as @e[tag=o.w.launch] if entity @s[gamemode=creative] run scoreboard players set $gm o.w.l.internal 1 +execute as @e[tag=o.w.launch] if entity @s[gamemode=adventure] run scoreboard players set $gm o.w.l.internal 2 +execute as @e[tag=o.w.launch] if entity @s[gamemode=spectator] run scoreboard players set $gm o.w.l.internal 3 + +execute as @e[tag=o.w.launch] run gamemode creative @s +execute as @e[tag=o.w.launch] at @s run tp ~ ~10000 ~ +execute as @e[tag=o.w.launch] at @s anchored eyes positioned ^ ^ ^-4 summon minecraft:end_crystal run damage @s 0 +execute as @e[tag=o.w.launch] at @s run tp ~ ~-10000 ~ + +execute as @e[tag=o.w.launch] if score $gm o.w.l.internal matches 0 run gamemode survival @s +execute as @e[tag=o.w.launch] if score $gm o.w.l.internal matches 1 run gamemode creative @s +execute as @e[tag=o.w.launch] if score $gm o.w.l.internal matches 2 run gamemode adventure @s +execute as @e[tag=o.w.launch] if score $gm o.w.l.internal matches 3 run gamemode spectator @s + +tag @e remove o.w.launch diff --git a/owlaunch/puid.mcf b/owlaunch/puid.mcf new file mode 100644 index 0000000..cc2ebc5 --- /dev/null +++ b/owlaunch/puid.mcf @@ -0,0 +1,6 @@ +!REPEATING + +execute as @a[tag=!o.w.l.puid] run scoreboard players add #counter o.w.l.puid 1 +execute as @a[tag=!o.w.l.puid] run scoreboard players operation @s o.w.l.puid = #counter o.w.l.puid +execute as @a[tag=!o.w.l.puid] run tellraw @s [{text:"[",color:"white",bold:false}, {"text":"INFO",color:"green",bold:true}, {text:"]",color:"white",bold:false}, {"text":" New PUID assigned for you: ",color:"white",bold:false}, {score:{name:"@s",objective:"o.w.l.puid"},color:"blue"}] +execute as @a[tag=!o.w.l.puid] run tag @s add o.w.l.puid diff --git a/owlaunch/timer.mcf b/owlaunch/timer.mcf new file mode 100644 index 0000000..9b8ccb2 --- /dev/null +++ b/owlaunch/timer.mcf @@ -0,0 +1,4 @@ +!REPEATING + +execute as @e[tag=o.w.l.cloud] run scoreboard players add @s o.w.l.timer 1 +execute as @e[tag=o.w.l.cloud] if score @s o.w.l.timer matches 15.. run kill @s diff --git a/owlaunch/trigger.mcf b/owlaunch/trigger.mcf new file mode 100644 index 0000000..3194c54 --- /dev/null +++ b/owlaunch/trigger.mcf @@ -0,0 +1,7 @@ +!REPEATING + +execute as @e[tag=o.w.l.trigger] run summon minecraft:marker 0 0 0 {Tags:["o.w.l.cloud-init"]} +execute as @e[tag=o.w.l.cloud-init] store result score @s o.w.l.cloud run scoreboard players get @e[limit=1,tag=o.w.l.trigger] o.w.l.puid +tag @e[tag=o.w.l.cloud-init,limit=1] add o.w.l.cloud +tag @e remove o.w.l.trigger +tag @e remove o.w.l.cloud-init diff --git a/owlaunch/use.mcf b/owlaunch/use.mcf new file mode 100644 index 0000000..08cf7aa --- /dev/null +++ b/owlaunch/use.mcf @@ -0,0 +1,5 @@ +!REPEATING + +execute as @a if score @s o.w.l.used matches 1.. if items entity @s weapon.* minecraft:feather[minecraft:custom_data={role:"o.w.l.fly"}] run tag @s add o.w.l.trigger +execute as @e[tag=o.w.l.trigger] at @s run playsound minecraft:entity.wind_charge.wind_burst player @a ~ ~ ~ 1 1.1 +scoreboard players set @e o.w.l.used 0