first commit
This commit is contained in:
@ -0,0 +1,7 @@
|
||||
# Terralith
|
||||
scoreboard players set Compat_Terralith fkob.options 0
|
||||
execute if score %USED tr.first matches 0.. run scoreboard players set Compat_Terralith fkob.options 1
|
||||
|
||||
# No worldgen
|
||||
scoreboard players set Compat_Vanilla fkob.options 1
|
||||
execute if score Compat_Terralith fkob.options matches 1 run scoreboard players set Compat_Vanilla fkob.options 0
|
@ -0,0 +1,11 @@
|
||||
scoreboard objectives add fkob.options dummy {"text":"OceanBreaths Options","color":"#008058"}
|
||||
|
||||
function fkob:properties
|
||||
function fkob:schedule/list
|
||||
schedule function fkob:compatibility 21t
|
||||
|
||||
tellraw @a ["",{"text":"[OceanBreaths] ","bold":true,"color":"gold","hoverEvent":{"action":"show_text","value":[{"text":"Developed with love by "},{"text":"FunkyToc","color":"dark_purple","bold":true}]}},{"text":"Enabled ! "},{"text":"More infos on "},{"text":"funkytoc.fr","color":"dark_purple","clickEvent":{"action":"open_url","value":"https://funkytoc.fr/en/home/"}}]
|
||||
execute if score McVersion fktool matches ..11904 run tellraw @a ["",{"text":"[OceanBreaths] ","bold":true,"color":"gold","hoverEvent":{"action":"show_text","value":[{"text":"Developed with love by "},{"text":"FunkyToc","color":"dark_purple","bold":true}]}},{"text":"Version 1.19.4 or inferior detected !","color":"red"}]
|
||||
execute if score McVersion fktool matches ..11904 run tellraw @a ["",{"text":"[OceanBreaths] ","bold":true,"color":"gold","hoverEvent":{"action":"show_text","value":[{"text":"Developed with love by "},{"text":"FunkyToc","color":"dark_purple","bold":true}]}},{"text":"This datapack needs 1.20+","color":"red"}]
|
||||
execute if score McVersion fktool matches 12000.. run tellraw @a ["",{"text":"[OceanBreaths] ","bold":true,"color":"gold","hoverEvent":{"action":"show_text","value":[{"text":"Developed with love by "},{"text":"FunkyToc","color":"dark_purple","bold":true}]}},{"text":"Modify Options "},{"text":"[click here]","bold":true,"color":"aqua","clickEvent":{"action":"suggest_command","value":"/function fkob:options/get"}}]
|
||||
execute if score McVersion fktool matches 12000.. run tellraw @a ["",{"text":"[OceanBreaths] ","bold":true,"color":"gold","hoverEvent":{"action":"show_text","value":[{"text":"Developed with love by "},{"text":"FunkyToc","color":"dark_purple","bold":true}]}},{"text":"You're playing the FREE version, get the customizable version "},{"text":"[becoming a Patreon]","bold":true,"color":"aqua","clickEvent":{"action":"open_url","value":"https://www.patreon.com/funkytoc"}}]
|
@ -0,0 +1,3 @@
|
||||
function fkob:systems/bubble/create
|
||||
function fkob:systems/chimney/create
|
||||
function fkob:systems/trail/detect
|
@ -0,0 +1,15 @@
|
||||
tellraw @s ["",{"text":"\n"}]
|
||||
tellraw @s ["",{"text":"[OceanBreaths] ","bold":true,"color":"gold"},{"text":"Available options list","bold":true}]
|
||||
|
||||
tellraw @s ["",{"text":"[OceanBreaths] ","bold":true,"color":"gold"},{"text":" - Bubble","hoverEvent":{"action":"show_text","contents":[{"text":"Allow bubbles to spawn at the ocean floor\n"},{"text":"Default: 1\n","color":"gray"},{"text":"0: disabled\n"},{"text":"1: enabled"}]}},{"text":" "},{"text":"[edit]","bold":true,"color":"aqua","clickEvent":{"action":"suggest_command","value":"/scoreboard players set Bubble fkob.options 1"}}]
|
||||
tellraw @s ["",{"text":"[OceanBreaths] ","bold":true,"color":"gold"},{"text":" - BubbleMultiplier","hoverEvent":{"action":"show_text","contents":[{"text":"Bubble spawn count multiplier\n"},{"text":"Default: 2\n","color":"gray"},{"text":"Range: 1 - 3"}]}},{"text":" "},{"text":"[edit]","bold":true,"color":"aqua","clickEvent":{"action":"suggest_command","value":"/scoreboard players set BubbleMultiplier fkob.options 2"}}]
|
||||
tellraw @s ["",{"text":"[OceanBreaths] ","bold":true,"color":"gold"},{"text":" - BubbleOxygen","hoverEvent":{"action":"show_text","contents":[{"text":"Oxygen time recovered per bubble (seconds)\n"},{"text":"Default: 20\n","color":"gray"},{"text":"Range : 1 - 600\n","color":"gray"},{"text":"10: 10 seconds of oxygen\n"},{"text":"20: 20 seconds of oxygen\n"},{"text":"60: 1 minute of oxygen"}]}},{"text":" "},{"text":"[edit]","bold":true,"color":"aqua","clickEvent":{"action":"suggest_command","value":"/scoreboard players set BubbleOxygen fkob.options 20"}}]
|
||||
tellraw @s ["",{"text":"[OceanBreaths] ","bold":true,"color":"gold"},{"text":" - Chimney","hoverEvent":{"action":"show_text","contents":[{"text":"Allow chimneys to spawn at the ocean floor\n"},{"text":"Default: 1\n","color":"gray"},{"text":"0: disabled\n"},{"text":"1: enabled"}]}},{"text":" "},{"text":"[edit]","bold":true,"color":"aqua","clickEvent":{"action":"suggest_command","value":"/scoreboard players set Chimney fkob.options 1"}}]
|
||||
tellraw @s ["",{"text":"[OceanBreaths] ","bold":true,"color":"gold"},{"text":" - ChimneyMultiplier","hoverEvent":{"action":"show_text","contents":[{"text":"Chimney spawn count multiplier\n"},{"text":"Default: 2\n","color":"gray"},{"text":"Range: 1 - 3"}]}},{"text":" "},{"text":"[edit]","bold":true,"color":"aqua","clickEvent":{"action":"suggest_command","value":"/scoreboard players set ChimneyMultiplier fkob.options 2"}}]
|
||||
tellraw @s ["",{"text":"[OceanBreaths] ","bold":true,"color":"gold"},{"text":" - ChimneyOxygen","hoverEvent":{"action":"show_text","contents":[{"text":"Oxygen time recovered staying close to the chimney (seconds)\n"},{"text":"Default: 30\n","color":"gray"},{"text":"Range : 1 - 600\n","color":"gray"},{"text":"10: 10 seconds of oxygen\n"},{"text":"30: 30 seconds of oxygen\n"},{"text":"60: 1 minute of oxygen"}]}},{"text":" "},{"text":"[edit]","bold":true,"color":"aqua","clickEvent":{"action":"suggest_command","value":"/scoreboard players set ChimneyOxygen fkob.options 30"}}]
|
||||
tellraw @s ["",{"text":"[OceanBreaths] ","bold":true,"color":"gold"},{"text":" - Trail","hoverEvent":{"action":"show_text","contents":[{"text":"Cosmetic dust trails when walking on the ocean floor\n"},{"text":"Default: 1\n","color":"gray"},{"text":"0: disabled\n"},{"text":"1: enabled"}]}},{"text":" "},{"text":"[edit]","bold":true,"color":"aqua","clickEvent":{"action":"suggest_command","value":"/scoreboard players set Trail fkob.options 1"}}]
|
||||
|
||||
tellraw @s ["",{"text":"[OceanBreaths] ","bold":true,"color":"gold"},{"text":" + Kill Bubbles ","color":"gray"},{"text":"[command]","bold":true,"color":"green","clickEvent":{"action":"run_command","value":"/kill @e[type=minecraft:marker,tag=fkob.bubble]"}}]
|
||||
tellraw @s ["",{"text":"[OceanBreaths] ","bold":true,"color":"gold"},{"text":" + Kill Chimneys ","color":"gray"},{"text":"[command]","bold":true,"color":"green","clickEvent":{"action":"run_command","value":"/execute as @e[type=minecraft:marker,tag=fkob.chimney] at @s run function fkob:systems/chimney/remove"}}]
|
||||
tellraw @s ["",{"text":"[OceanBreaths] ","bold":true,"color":"gold"},{"text":"Messed up with options ? ","color":"gray"},{"text":"[reset]","bold":true,"color":"red","clickEvent":{"action":"suggest_command","value":"/function fkob:options/reset"}}]
|
||||
tellraw @s ["",{"text":"[OceanBreaths] ","bold":true,"color":"gold"},{"text":"Uninstall datapack ? ","color":"gray"},{"text":"[uninstall]","bold":true,"color":"red","clickEvent":{"action":"suggest_command","value":"/function fkob:uninstall"}}]
|
@ -0,0 +1,9 @@
|
||||
scoreboard players set Bubble fkob.options 1
|
||||
scoreboard players set BubbleMultiplier fkob.options 2
|
||||
scoreboard players set BubbleOxygen fkob.options 20
|
||||
scoreboard players set Chimney fkob.options 1
|
||||
scoreboard players set ChimneyMultiplier fkob.options 2
|
||||
scoreboard players set ChimneyOxygen fkob.options 30
|
||||
scoreboard players set Trail fkob.options 1
|
||||
|
||||
tellraw @s ["",{"text":"[OceanBreaths] ","bold":true,"color":"gold"},{"text":"Options have been reset","color":"red"}]
|
@ -0,0 +1,45 @@
|
||||
### OceanBreaths Datapack
|
||||
###
|
||||
### Developped by FunkyToc
|
||||
### With love
|
||||
### And a big amount of time
|
||||
|
||||
|
||||
## CONFIG
|
||||
|
||||
# Allow bubbles to spawn at the ocean floor
|
||||
# 0 : disable
|
||||
# 1 : enable
|
||||
execute unless score Bubble fkob.options matches 0.. run scoreboard players set Bubble fkob.options 1
|
||||
|
||||
# Bubble spawn count multiplier
|
||||
# Default : 2
|
||||
# Range : 1 - 3
|
||||
execute unless score BubbleMultiplier fkob.options matches 0.. run scoreboard players set BubbleMultiplier fkob.options 2
|
||||
|
||||
# Oxygen time recovered per bubble (seconds)
|
||||
# Default : 20
|
||||
# Range : 1 - 600
|
||||
execute unless score BubbleOxygen fkob.options matches 0.. run scoreboard players set BubbleOxygen fkob.options 20
|
||||
|
||||
|
||||
# Allow chimneys to spawn at the ocean floor
|
||||
# 0 : disable
|
||||
# 1 : enable
|
||||
execute unless score Chimney fkob.options matches 0.. run scoreboard players set Chimney fkob.options 1
|
||||
|
||||
# Chimney spawn count multiplier
|
||||
# Default : 2
|
||||
# Range : 1 - 3
|
||||
execute unless score ChimneyMultiplier fkob.options matches 0.. run scoreboard players set ChimneyMultiplier fkob.options 2
|
||||
|
||||
# Oxygen time recovered staying close to the chimney (seconds)
|
||||
# Default : 30
|
||||
# Range : 1 - 600
|
||||
execute unless score ChimneyOxygen fkob.options matches 0.. run scoreboard players set ChimneyOxygen fkob.options 30
|
||||
|
||||
|
||||
# Cosmetic dust trails when walking on the ocean floor
|
||||
# 0 : disable
|
||||
# 1 : enable
|
||||
execute unless score Trail fkob.options matches 0.. run scoreboard players set Trail fkob.options 1
|
@ -0,0 +1,5 @@
|
||||
execute as @e[type=minecraft:marker,tag=fkob.bubble.prepare] at @s run function fkob:systems/bubble/prepare
|
||||
execute as @e[type=minecraft:marker,tag=fkob.bubble.pop] at @s run function fkob:systems/bubble/pop
|
||||
execute as @a[predicate=fktool:entity/in_water_eye] at @s if entity @e[type=minecraft:marker,tag=fkob.bubble.pop,distance=..2.5] run function fkob:systems/bubble/consume
|
||||
|
||||
execute if entity @e[type=minecraft:marker,tag=fkob.bubble] run schedule function fkob:schedule/bubble_life 5t
|
@ -0,0 +1,5 @@
|
||||
execute as @e[type=minecraft:marker,tag=fkob.chimney.prepare] at @s run function fkob:systems/chimney/prepare
|
||||
execute as @e[type=minecraft:marker,tag=fkob.chimney.pop] at @s run function fkob:systems/chimney/pop
|
||||
execute as @a[predicate=fktool:entity/in_water_eye] at @s if entity @e[type=minecraft:marker,tag=fkob.chimney.pop,distance=..1.5] run function fkob:systems/chimney/consume
|
||||
|
||||
execute at @a if entity @e[type=minecraft:marker,tag=fkob.chimney,distance=..32,limit=1] run schedule function fkob:schedule/chimney_life 5t
|
@ -0,0 +1 @@
|
||||
function fkob:tick
|
@ -0,0 +1,4 @@
|
||||
execute as @e[type=minecraft:marker,tag=fkob.trail] at @s run function fkob:systems/trail/life
|
||||
execute as @a[gamemode=!spectator,predicate=fktool:entity/in_water] at @s if predicate fkob:ocean_ground run summon minecraft:marker ~ ~ ~ {Tags:["fkob.trail"]}
|
||||
|
||||
execute if entity @e[type=minecraft:marker,tag=fkob.trail,limit=1] run schedule function fkob:schedule/trail_life 6t
|
@ -0,0 +1,7 @@
|
||||
execute anchored eyes rotated ~ 0 run particle minecraft:bubble_pop ^ ^ ^.6 .3 .3 .3 .01 10
|
||||
playsound minecraft:entity.player.swim player @a[predicate=fktool:entity/in_water_eye,distance=..16] ~ ~ ~ .5 .5 .01
|
||||
playsound minecraft:block.pointed_dripstone.drip_water_into_cauldron player @a[predicate=fktool:entity/in_water_eye,distance=..16] ~ ~ ~ 3 .5 .01
|
||||
|
||||
function fkob:systems/bubble/get_air
|
||||
|
||||
kill @e[type=minecraft:marker,tag=fkob.bubble.pop,distance=..2.5,limit=1]
|
@ -0,0 +1,2 @@
|
||||
function fkob:systems/bubble/summon
|
||||
schedule function fkob:schedule/bubble_life 2s append
|
@ -0,0 +1 @@
|
||||
effect give @s minecraft:water_breathing 020 0 true
|
@ -0,0 +1,4 @@
|
||||
execute unless predicate fktool:location/is_water run kill @s
|
||||
execute if score Compat_Vanilla fkob.options matches 1 unless predicate fktool:biome/in_ocean run kill @s
|
||||
execute if score Compat_Terralith fkob.options matches 1 unless predicate fkob:compatibility/terralith_oceans run kill @s
|
||||
tag @s remove fkob.bubble.init
|
@ -0,0 +1,3 @@
|
||||
particle minecraft:bubble_column_up ~ ~ ~ .4 .4 .4 .001 10
|
||||
tp @s ~ ~.3 ~
|
||||
execute unless predicate fktool:entity/in_water_eye run kill @s
|
@ -0,0 +1,2 @@
|
||||
tp @s ~ ~-.4 ~
|
||||
execute unless predicate fktool:entity/in_water_feet run function fkob:systems/bubble/transform
|
@ -0,0 +1,15 @@
|
||||
# summon chance
|
||||
execute if predicate fkob:bubble_chance rotated ~-60 0 positioned ^ ^ ^25 run summon minecraft:marker ~ ~ ~ {Tags:["fkob.bubble","fkob.bubble.prepare","fkob.bubble.init"]}
|
||||
execute if predicate fkob:bubble_chance rotated ~-20 0 positioned ^ ^ ^30 run summon minecraft:marker ~ ~ ~ {Tags:["fkob.bubble","fkob.bubble.prepare","fkob.bubble.init"]}
|
||||
execute if predicate fkob:bubble_chance rotated ~020 0 positioned ^ ^ ^30 run summon minecraft:marker ~ ~ ~ {Tags:["fkob.bubble","fkob.bubble.prepare","fkob.bubble.init"]}
|
||||
execute if predicate fkob:bubble_chance rotated ~060 0 positioned ^ ^ ^25 run summon minecraft:marker ~ ~ ~ {Tags:["fkob.bubble","fkob.bubble.prepare","fkob.bubble.init"]}
|
||||
|
||||
# randomize pos
|
||||
execute as @e[type=minecraft:marker,tag=fkob.bubble.init,limit=1,sort=random] at @s run tp @s ~-2 ~-2 ~4
|
||||
execute as @e[type=minecraft:marker,tag=fkob.bubble.init,limit=1,sort=random] at @s run tp @s ~4 ~2 ~-2
|
||||
execute as @e[type=minecraft:marker,tag=fkob.bubble.init,limit=1,sort=random] at @s run tp @s ~-3 ~2 ~
|
||||
execute as @e[type=minecraft:marker,tag=fkob.bubble.init,limit=1,sort=random] at @s run tp @s ~ ~-2 ~3
|
||||
execute as @e[type=minecraft:marker,tag=fkob.bubble.init,limit=1,sort=random] at @s run tp @s ~2 ~ ~2
|
||||
|
||||
# check
|
||||
execute as @e[type=minecraft:marker,tag=fkob.bubble.init] at @s run function fkob:systems/bubble/init
|
@ -0,0 +1,5 @@
|
||||
tag @s add fkob.bubble.pop
|
||||
tag @s remove fkob.bubble.prepare
|
||||
particle minecraft:campfire_cosy_smoke ~ ~.5 ~ .3 .1 .3 .001 10
|
||||
particle minecraft:campfire_signal_smoke ~ ~1 ~ .02 .4 .02 .001 5
|
||||
tp @s ~ ~1 ~
|
@ -0,0 +1,3 @@
|
||||
execute anchored eyes rotated ~ 0 run particle minecraft:bubble_pop ^ ^ ^.6 .3 .3 .3 .01 1
|
||||
|
||||
function fkob:systems/chimney/get_air
|
@ -0,0 +1,2 @@
|
||||
execute unless entity @e[type=minecraft:marker,tag=fkob.chimney,distance=..64,limit=1] run function fkob:systems/chimney/summon
|
||||
schedule function fkob:schedule/chimney_life 2s append
|
@ -0,0 +1 @@
|
||||
effect give @s minecraft:water_breathing 030 0 true
|
@ -0,0 +1,4 @@
|
||||
execute unless predicate fktool:location/is_water run kill @s
|
||||
execute if score Compat_Vanilla fkob.options matches 1 unless predicate fktool:biome/in_ocean run kill @s
|
||||
execute if score Compat_Terralith fkob.options matches 1 unless predicate fkob:compatibility/terralith_oceans run kill @s
|
||||
tag @s remove fkob.chimney.init
|
@ -0,0 +1,7 @@
|
||||
particle minecraft:bubble_column_up ~ ~ ~ .1 .1 .1 .001 3
|
||||
|
||||
# check destroyed
|
||||
execute if block ~ ~ ~ minecraft:water run setblock ~ ~1 ~ minecraft:water
|
||||
execute if block ~ ~ ~ minecraft:water run kill @s
|
||||
execute unless block ~ ~1 ~ minecraft:light run setblock ~ ~ ~ minecraft:water
|
||||
execute unless block ~ ~1 ~ minecraft:light run kill @s
|
@ -0,0 +1,3 @@
|
||||
tp @s ~ ~-.5 ~
|
||||
execute if entity @e[type=minecraft:marker,tag=fkob.chimney,distance=1..64] run kill @s
|
||||
execute unless predicate fktool:entity/in_water_feet run function fkob:systems/chimney/transform
|
@ -0,0 +1,3 @@
|
||||
setblock ~ ~1 ~ minecraft:water
|
||||
setblock ~ ~ ~ minecraft:water
|
||||
kill @s
|
@ -0,0 +1,7 @@
|
||||
# summon chance
|
||||
execute if predicate fkob:chimney_chance rotated ~-50 0 positioned ^ ^ ^25 run summon minecraft:marker ~ ~ ~ {Tags:["fkob.chimney","fkob.chimney.prepare","fkob.chimney.init"]}
|
||||
execute if predicate fkob:chimney_chance rotated ~000 0 positioned ^ ^ ^30 run summon minecraft:marker ~ ~ ~ {Tags:["fkob.chimney","fkob.chimney.prepare","fkob.chimney.init"]}
|
||||
execute if predicate fkob:chimney_chance rotated ~050 0 positioned ^ ^ ^25 run summon minecraft:marker ~ ~ ~ {Tags:["fkob.chimney","fkob.chimney.prepare","fkob.chimney.init"]}
|
||||
|
||||
# check
|
||||
execute as @e[type=minecraft:marker,tag=fkob.chimney.init] at @s run function fkob:systems/chimney/init
|
@ -0,0 +1,11 @@
|
||||
tag @s add fkob.chimney.pop
|
||||
tag @s remove fkob.chimney.prepare
|
||||
particle minecraft:campfire_cosy_smoke ~ ~.5 ~ .6 .6 .6 .001 50
|
||||
particle minecraft:campfire_signal_smoke ~ ~1 ~ .3 .6 .3 .001 20
|
||||
execute align xyz run tp @s ~.5 ~1.8 ~.5
|
||||
|
||||
execute at @s if block ~ ~-1 ~ minecraft:sand if predicate fktool:rng/60 run setblock ~ ~ ~ minecraft:sandstone_wall[waterlogged=true] destroy
|
||||
execute at @s if block ~ ~-1 ~ minecraft:prismarine if predicate fktool:rng/80 run setblock ~ ~ ~ minecraft:prismarine_wall[waterlogged=true] destroy
|
||||
execute at @s unless block ~ ~ ~ minecraft:sandstone_wall unless block ~ ~ ~ minecraft:prismarine_wall run setblock ~ ~ ~ minecraft:mossy_cobblestone_wall[waterlogged=true] destroy
|
||||
|
||||
execute at @s run setblock ~ ~1 ~ minecraft:light[level=12,waterlogged=true]
|
@ -0,0 +1 @@
|
||||
execute if predicate fkob:ocean_ground run function fkob:schedule/trail_life
|
@ -0,0 +1,2 @@
|
||||
particle minecraft:campfire_cosy_smoke ~ ~-.1 ~ .1 .1 .1 .001 1
|
||||
kill @s
|
@ -0,0 +1,3 @@
|
||||
execute if score McVersion fktool matches 12000.. as @a[gamemode=!creative,gamemode=!spectator,predicate=fktool:entity/in_water_feet] at @s align y run function fkob:tick_compat
|
||||
|
||||
schedule function fkob:tick 5s
|
@ -0,0 +1,2 @@
|
||||
execute if score Compat_Vanilla fkob.options matches 1 if predicate fktool:biome/in_ocean run function fkob:loop
|
||||
execute if score Compat_Terralith fkob.options matches 1 if predicate fkob:compatibility/terralith_oceans run function fkob:loop
|
@ -0,0 +1,14 @@
|
||||
execute as @e[type=minecraft:marker,tag=fkob.chimney] at @s run function fkob:systems/chimney/remove
|
||||
kill @e[type=minecraft:marker,tag=fkob.bubble]
|
||||
kill @e[type=minecraft:marker,tag=fkob.chimney]
|
||||
|
||||
scoreboard players reset * fkob.options
|
||||
scoreboard objectives remove fkob.options
|
||||
|
||||
function fktool:uninstall
|
||||
|
||||
datapack disable "file/OceanBreaths.zip"
|
||||
datapack disable "file/OceanBreaths_FREE.zip"
|
||||
datapack disable "file/oceanbreaths-free.zip"
|
||||
|
||||
tellraw @s ["",{"text":"[OceanBreaths] ","bold":true,"color":"gold"},{"text":"Uninstalled","color":"red"}]
|
Reference in New Issue
Block a user