From 85d0d3e97e5159b43cd268f6770ca32ef46c9e84 Mon Sep 17 00:00:00 2001 From: FlamingTaco113 <164125083+FlamingTaco113@users.noreply.github.com> Date: Sun, 24 Mar 2024 13:06:25 -0600 Subject: [PATCH] New Update Multiple Bug Fixes and Improvements --- .../choose_origin/changelog.mcfunction | 7 +++---- .../choose_origin/origin_list.mcfunction | 2 +- .../choose_origin/origins/merling.mcfunction | 1 + .../origins/blazeborn/blazeborn.mcfunction | 6 +++--- .../blazeborn/blazeborn_damage.mcfunction | 2 +- .../blazeborn/blazeborn_load.mcfunction | 3 +-- .../blazeborn_spawn_check.mcfunction | 4 ++-- .../origins/enderian/enderian.mcfunction | 4 ++-- .../enderian/enderian_damage.mcfunction | 2 +- .../origins/merling/merling.mcfunction | 20 +++++++++++++------ .../merling/merling_suffocate.mcfunction | 4 ++-- .../player/player_technical.mcfunction | 4 +++- .../functions/technical/load.mcfunction | 4 +++- .../data/origins/predicates/waterlogged.json | 13 ++++++------ .../predicates/waterlogged_no_offset.json | 8 ++++++++ .../data/origins/tags/blocks/air.json | 8 ++++++++ 16 files changed, 60 insertions(+), 32 deletions(-) create mode 100644 Origins Datapack/data/origins/predicates/waterlogged_no_offset.json create mode 100644 Origins Datapack/data/origins/tags/blocks/air.json diff --git a/Origins Datapack/data/origins/functions/choose_origin/changelog.mcfunction b/Origins Datapack/data/origins/functions/choose_origin/changelog.mcfunction index d9410bc..4c85771 100644 --- a/Origins Datapack/data/origins/functions/choose_origin/changelog.mcfunction +++ b/Origins Datapack/data/origins/functions/choose_origin/changelog.mcfunction @@ -1,11 +1,10 @@ execute at @s run playsound minecraft:entity.experience_orb.pickup master @s ~ ~ ~ 2 1 1 -tellraw @a {"text":" origins-datapack v1.0.3","color":"yellow"} +tellraw @a {"text":" origins-datapack v1.0.4","color":"yellow"} tellraw @a {"text":"--------------------------------------","color":"white"} tellraw @s {"text":"Balance Changes","color":"yellow"} -tellraw @s {"text":" N/A"} +tellraw @s {"text":" -Merling now has breathing similar to\n normal air"} tellraw @s {"text":"","color":"yellow"} tellraw @s {"text":"Bug Fixes/Improvements","color":"yellow"} -tellraw @s {"text":" -Fixed Merling Bug where merlings could\nsuffocate in waterlogged blocks"} -tellraw @s {"text":" -Optimized Avian code to remove need for\nscoreboards objectives"} +tellraw @s {"text":" -Fixed Merling code to detect if head is in\n water, not feet"} tellraw @a {"text":"--------------------------------------","color":"white"} \ No newline at end of file diff --git a/Origins Datapack/data/origins/functions/choose_origin/origin_list.mcfunction b/Origins Datapack/data/origins/functions/choose_origin/origin_list.mcfunction index 559ea5c..ceaa5e9 100644 --- a/Origins Datapack/data/origins/functions/choose_origin/origin_list.mcfunction +++ b/Origins Datapack/data/origins/functions/choose_origin/origin_list.mcfunction @@ -8,7 +8,7 @@ tellraw @s {"text":" [hover over the origin to see pros and cons]","color tellraw @s {"text":"--------------------------------------------------","color":"gold"} -tellraw @a {"text":"[Avian]","color":"gold","italic":false,"hoverEvent":{"action":"show_text","value":[{"text":"[Infinite Slow Falling] [Quicker Speeds] [Cannot eat meat]"}]},"clickEvent":{"action":"run_command","value":"/trigger zzav_p"}} +tellraw @s {"text":"[Avian]","color":"gold","italic":false,"hoverEvent":{"action":"show_text","value":[{"text":"[Infinite Slow Falling] [Quicker Speeds] [Cannot eat meat]"}]},"clickEvent":{"action":"run_command","value":"/trigger zzav_p"}} tellraw @s {"text":"[Blazeborn]","color":"red","italic":false,"hoverEvent":{"action":"show_text","value":[{"text":"[Fire Resistance] [Poison Resistance] [Spawns in Nether] [Takes Damage in Water]"}]},"clickEvent":{"action":"run_command","value":"/trigger zzbl_p"}} diff --git a/Origins Datapack/data/origins/functions/choose_origin/origins/merling.mcfunction b/Origins Datapack/data/origins/functions/choose_origin/origins/merling.mcfunction index 84a08be..b94fc03 100644 --- a/Origins Datapack/data/origins/functions/choose_origin/origins/merling.mcfunction +++ b/Origins Datapack/data/origins/functions/choose_origin/origins/merling.mcfunction @@ -3,6 +3,7 @@ scoreboard players set @s picked 1 scoreboard players reset @s pick_origin function origins:choose_origin/disable_picks scoreboard players set @s zzme_p 0 +scoreboard players set @s out_of_water 0 tellraw @s {"text":"--------------------------------------------------","color":"gold"} tellraw @s {"text":"You selected Merling","color":"blue"} diff --git a/Origins Datapack/data/origins/functions/origins/blazeborn/blazeborn.mcfunction b/Origins Datapack/data/origins/functions/origins/blazeborn/blazeborn.mcfunction index 851ffa3..8befdc9 100644 --- a/Origins Datapack/data/origins/functions/origins/blazeborn/blazeborn.mcfunction +++ b/Origins Datapack/data/origins/functions/origins/blazeborn/blazeborn.mcfunction @@ -7,11 +7,11 @@ execute if data entity @s SpawnY run scoreboard players set @s respawn_in_nether execute if entity @s[scores={blazeborn_death=1..}] run function origins:origins/blazeborn/blazeborn_spawn_check -execute at @s if block ~ ~2.5 ~ air run execute if block ~ ~3 ~ air if block ~ ~4 ~ air if block ~ ~5 ~ air if block ~ ~6 ~ air if block ~ ~7 ~ air if block ~ ~8 ~ air if block ~ ~9 ~ air if block ~ ~10 ~ air if predicate origins:enderian_rain if predicate origins:is_raining unless biome ~ ~ ~ desert unless biome ~ ~ ~ #c:mesa unless biome ~ ~ ~ #c:savanna run function origins:origins/blazeborn/blazeborn_damage +execute at @s if blocks ~ ~1 ~ ~ 319 ~ ~ ~ ~ masked if predicate origins:enderian_rain if predicate origins:is_raining unless biome ~ ~ ~ desert unless biome ~ ~ ~ #c:mesa unless biome ~ ~ ~ #c:savanna run function origins:origins/blazeborn/blazeborn_damage -execute at @s if block ~ ~ ~ water run function origins:origins/blazeborn/blazeborn_damage +execute at @s if predicate origins:waterlogged_no_offset run function origins:origins/blazeborn/blazeborn_damage effect give @s fire_resistance infinite 0 true effect clear @s poison -execute if entity @s[scores={blazeborn_time_died=100..}] run scoreboard players set @s blazeborn_time_died 10 \ No newline at end of file +execute at @s if blocks 10000 0 100000 ~ ~ ~ ~ ~320 ~ masked run say hi \ No newline at end of file diff --git a/Origins Datapack/data/origins/functions/origins/blazeborn/blazeborn_damage.mcfunction b/Origins Datapack/data/origins/functions/origins/blazeborn/blazeborn_damage.mcfunction index 1477d41..36fd2d0 100644 --- a/Origins Datapack/data/origins/functions/origins/blazeborn/blazeborn_damage.mcfunction +++ b/Origins Datapack/data/origins/functions/origins/blazeborn/blazeborn_damage.mcfunction @@ -1,2 +1,2 @@ advancement grant @s only origins:origins/blazeborn_water -damage @s 1 minecraft:drown \ No newline at end of file +damage @s 2 minecraft:drown \ No newline at end of file diff --git a/Origins Datapack/data/origins/functions/origins/blazeborn/blazeborn_load.mcfunction b/Origins Datapack/data/origins/functions/origins/blazeborn/blazeborn_load.mcfunction index f5b1e35..54e61fe 100644 --- a/Origins Datapack/data/origins/functions/origins/blazeborn/blazeborn_load.mcfunction +++ b/Origins Datapack/data/origins/functions/origins/blazeborn/blazeborn_load.mcfunction @@ -1,3 +1,2 @@ scoreboard objectives add respawn_in_nether dummy -scoreboard objectives add blazeborn_death deathCount -scoreboard objectives add blazeborn_time_died minecraft.custom:minecraft.time_since_death \ No newline at end of file +scoreboard objectives add blazeborn_death deathCount \ No newline at end of file diff --git a/Origins Datapack/data/origins/functions/origins/blazeborn/blazeborn_spawn_check.mcfunction b/Origins Datapack/data/origins/functions/origins/blazeborn/blazeborn_spawn_check.mcfunction index 4bc5229..541bb1c 100644 --- a/Origins Datapack/data/origins/functions/origins/blazeborn/blazeborn_spawn_check.mcfunction +++ b/Origins Datapack/data/origins/functions/origins/blazeborn/blazeborn_spawn_check.mcfunction @@ -1,3 +1,3 @@ -execute if score @s blazeborn_time_died matches ..5 if score @s respawn_in_nether matches 1 run function origins:origins/blazeborn/blazeborn_nether_spawn +execute if score @s time_died matches ..5 if score @s respawn_in_nether matches 1 run function origins:origins/blazeborn/blazeborn_nether_spawn -execute if score @s blazeborn_time_died matches ..5 if score @s respawn_in_nether matches 0 run function origins:origins/blazeborn/blazeborn_reset \ No newline at end of file +execute if score @s time_died matches ..5 if score @s respawn_in_nether matches 0 run function origins:origins/blazeborn/blazeborn_reset \ No newline at end of file diff --git a/Origins Datapack/data/origins/functions/origins/enderian/enderian.mcfunction b/Origins Datapack/data/origins/functions/origins/enderian/enderian.mcfunction index e94f600..798190a 100644 --- a/Origins Datapack/data/origins/functions/origins/enderian/enderian.mcfunction +++ b/Origins Datapack/data/origins/functions/origins/enderian/enderian.mcfunction @@ -1,8 +1,8 @@ execute if entity @s[scores={use_ender_pearl=1..}] run function origins:origins/enderian/enderian_teleport -execute at @s if block ~ ~2.5 ~ air run execute if block ~ ~3 ~ air if block ~ ~4 ~ air if block ~ ~5 ~ air if block ~ ~6 ~ air if block ~ ~7 ~ air if block ~ ~8 ~ air if block ~ ~9 ~ air if block ~ ~10 ~ air if predicate origins:enderian_rain if predicate origins:is_raining unless biome ~ ~ ~ desert unless biome ~ ~ ~ #c:mesa unless biome ~ ~ ~ #c:savanna run function origins:origins/enderian/enderian_damage +execute at @s if blocks ~ ~1 ~ ~ 319 ~ ~ ~ ~ masked if predicate origins:enderian_rain if predicate origins:is_raining unless biome ~ ~ ~ desert unless biome ~ ~ ~ #c:mesa unless biome ~ ~ ~ #c:savanna run function origins:origins/enderian/enderian_damage -execute at @s if block ~ ~ ~ water run function origins:origins/enderian/enderian_damage +execute at @s if predicate origins:waterlogged_no_offset run function origins:origins/enderian/enderian_damage execute at @s if entity @e[distance=..10,nbt={Inventory:[{id:"minecraft:carved_pumpkin",Slot:103b}]}] run effect give @s blindness 3 1 true execute at @s if entity @e[distance=..10,nbt={ArmorItems:[{},{},{},{id:"minecraft:carved_pumpkin",Count:1b}]}] run effect give @s blindness 3 1 true \ No newline at end of file diff --git a/Origins Datapack/data/origins/functions/origins/enderian/enderian_damage.mcfunction b/Origins Datapack/data/origins/functions/origins/enderian/enderian_damage.mcfunction index a265d6a..d6b9656 100644 --- a/Origins Datapack/data/origins/functions/origins/enderian/enderian_damage.mcfunction +++ b/Origins Datapack/data/origins/functions/origins/enderian/enderian_damage.mcfunction @@ -1,2 +1,2 @@ -damage @s 1 minecraft:drown +damage @s 2 minecraft:drown advancement grant @s only origins:origins/enderian_water \ No newline at end of file diff --git a/Origins Datapack/data/origins/functions/origins/merling/merling.mcfunction b/Origins Datapack/data/origins/functions/origins/merling/merling.mcfunction index 31055bd..559aa96 100644 --- a/Origins Datapack/data/origins/functions/origins/merling/merling.mcfunction +++ b/Origins Datapack/data/origins/functions/origins/merling/merling.mcfunction @@ -1,17 +1,25 @@ effect give @s water_breathing infinite 0 true effect give @s dolphins_grace infinite 0 true -execute at @s if predicate origins:waterlogged run effect give @s night_vision 15 0 true -execute at @s if predicate origins:waterlogged run effect give @s haste 1 20 true +execute as @s at @s if predicate origins:waterlogged if score @s out_of_water matches 1.. if score @s out_of_water matches ..1 at @s positioned ~ ~1.5 ~ run particle minecraft:bubble ^ ^ ^0.25 0 0.1 0 0.1 5 +execute as @s at @s if predicate origins:waterlogged if score @s out_of_water matches 1.. if score @s out_of_water matches ..1 run playsound minecraft:entity.drowned.swim master @s +execute as @s at @s unless predicate origins:waterlogged unless block ~ ~ ~ water_cauldron if score @s out_of_water matches 269.. if score @s out_of_water matches ..269 at @s run playsound minecraft:entity.drowned.swim master @s +execute at @s if predicate origins:waterlogged unless block ~ ~ ~ #slabs unless block ~ ~ ~ #air run effect give @s night_vision 15 0 true +execute at @s if predicate origins:waterlogged unless block ~ ~ ~ #slabs unless block ~ ~ ~ #air run effect give @s haste 1 20 true -execute at @s if predicate origins:waterlogged run scoreboard players set @s out_of_water 0 -execute at @s if predicate origins:is_raining unless biome ~ ~ ~ #c:desert unless biome ~ ~ ~ #c:mesa unless biome ~ ~ ~ #c:savanna unless dimension minecraft:the_nether run scoreboard players set @s out_of_water 0 -execute at @s if block ~ ~ ~ minecraft:water_cauldron run scoreboard players set @s out_of_water 0 + +execute at @s if predicate origins:is_raining unless biome ~ ~ ~ #c:desert unless biome ~ ~ ~ #c:mesa unless biome ~ ~ ~ #c:savanna unless dimension minecraft:the_nether run scoreboard players remove @s out_of_water 1 execute at @s unless predicate origins:waterlogged run scoreboard players add @s out_of_water 1 -execute if score @s out_of_water matches 30.. run function origins:origins/merling/merling_suffocate \ No newline at end of file +execute if score @s out_of_water matches 300.. run function origins:origins/merling/merling_suffocate + +execute at @s if predicate origins:waterlogged run scoreboard players remove @s out_of_water 1 +execute at @s if block ~ ~ ~ minecraft:water_cauldron run scoreboard players remove @s out_of_water 2 +execute as @s if score @s out_of_water matches ..0 run scoreboard players set @s out_of_water 0 + +execute as @s if score @s time_died matches ..5 run scoreboard players set @s out_of_water 0 \ No newline at end of file diff --git a/Origins Datapack/data/origins/functions/origins/merling/merling_suffocate.mcfunction b/Origins Datapack/data/origins/functions/origins/merling/merling_suffocate.mcfunction index 99798af..c3b5c72 100644 --- a/Origins Datapack/data/origins/functions/origins/merling/merling_suffocate.mcfunction +++ b/Origins Datapack/data/origins/functions/origins/merling/merling_suffocate.mcfunction @@ -1,3 +1,3 @@ -damage @s 2 minecraft:dry_out +damage @s 2 minecraft:drown advancement grant @s only origins:origins/merling_suffocate -scoreboard players set @s out_of_water 0 +scoreboard players set @s out_of_water 270 diff --git a/Origins Datapack/data/origins/functions/player/player_technical.mcfunction b/Origins Datapack/data/origins/functions/player/player_technical.mcfunction index 5b2c19a..6f9512d 100644 --- a/Origins Datapack/data/origins/functions/player/player_technical.mcfunction +++ b/Origins Datapack/data/origins/functions/player/player_technical.mcfunction @@ -4,4 +4,6 @@ scoreboard players add @a elytrian_cooldown 0 scoreboard players add @a evoker_cooldown 0 scoreboard players add @a picked 0 execute as @a if score @s picked matches 0 run function origins:choose_origin/enable_picks -execute as @a if score @s picked matches 0 run function origins:choose_origin/check_picked \ No newline at end of file +execute as @a if score @s picked matches 0 run function origins:choose_origin/check_picked + +execute as @a if entity @s[scores={time_died=100..}] run scoreboard players set @s time_died 10 \ No newline at end of file diff --git a/Origins Datapack/data/origins/functions/technical/load.mcfunction b/Origins Datapack/data/origins/functions/technical/load.mcfunction index 1c5c9bf..a2ea86e 100644 --- a/Origins Datapack/data/origins/functions/technical/load.mcfunction +++ b/Origins Datapack/data/origins/functions/technical/load.mcfunction @@ -6,7 +6,7 @@ tellraw @a {"text":"--------------------------------------","color":"white"} tellraw @a {"text":" Origins Datapack","color":"gold"} tellraw @a {"text":"--------------------------------------","color":"white"} -tellraw @a {"text":"Version: [1.0.3]","color":"yellow"} +tellraw @a {"text":"Version: [1.0.4]","color":"yellow"} tellraw @a {"text":""} tellraw @a [{"text":"Created by "},{"text":"[FlamingTaco113]","color":"yellow"}] tellraw @a [{"text":"Type "},{"text":"/trigger help","color": "yellow"},{"text": " for more information"}] @@ -15,11 +15,13 @@ tellraw @a {"text":"--------------------------------------","color":"white"} gamerule sendCommandFeedback false + scoreboard objectives add test dummy scoreboard objectives add pick_origin trigger scoreboard objectives add help trigger scoreboard objectives add picked dummy scoreboard objectives add origins_sneaking minecraft.custom:minecraft.sneak_time +scoreboard objectives add time_died minecraft.custom:minecraft.time_since_death function origins:choose_origin/choose_origin_load function origins:interactions/interactions_load diff --git a/Origins Datapack/data/origins/predicates/waterlogged.json b/Origins Datapack/data/origins/predicates/waterlogged.json index 61141ac..dd63627 100644 --- a/Origins Datapack/data/origins/predicates/waterlogged.json +++ b/Origins Datapack/data/origins/predicates/waterlogged.json @@ -1,8 +1,9 @@ { - "condition": "minecraft:location_check", - "predicate": { - "fluid": { - "tag": "minecraft:water" - } + "condition": "minecraft:location_check", + "offsetY": 1, + "predicate": { + "fluid": { + "tag": "minecraft:water" } - } \ No newline at end of file + } +} diff --git a/Origins Datapack/data/origins/predicates/waterlogged_no_offset.json b/Origins Datapack/data/origins/predicates/waterlogged_no_offset.json new file mode 100644 index 0000000..5bdce0d --- /dev/null +++ b/Origins Datapack/data/origins/predicates/waterlogged_no_offset.json @@ -0,0 +1,8 @@ +{ + "condition": "minecraft:location_check", + "predicate": { + "fluid": { + "tag": "minecraft:water" + } + } +} diff --git a/Origins Datapack/data/origins/tags/blocks/air.json b/Origins Datapack/data/origins/tags/blocks/air.json new file mode 100644 index 0000000..ce39c4a --- /dev/null +++ b/Origins Datapack/data/origins/tags/blocks/air.json @@ -0,0 +1,8 @@ +{ + "values": [ + "minecraft:air", + "minecraft:cave_air", + "minecraft:void_air" + ] + } + \ No newline at end of file