diff --git a/gm4_zauber_cauldrons/beet.yaml b/gm4_zauber_cauldrons/beet.yaml index 7ca844aae9..328102e0de 100644 --- a/gm4_zauber_cauldrons/beet.yaml +++ b/gm4_zauber_cauldrons/beet.yaml @@ -29,7 +29,7 @@ meta: schedule_loops: - main - - cauldron/extra_items/crack_bottle + - cauldron/extra_items/process_bottled_vex_items website: description: Powerful potions, Wormholes, portable Beacons and special armour that makes you stronger! Zauber Cauldrons adds an entire magic branch to the game. recommended: diff --git a/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/extra_items/catch_possessed_items.mcfunction b/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/extra_items/catch_possessed_items.mcfunction index 5926b84e49..85b0b5c522 100644 --- a/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/extra_items/catch_possessed_items.mcfunction +++ b/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/extra_items/catch_possessed_items.mcfunction @@ -6,13 +6,26 @@ execute store result storage gm4_zauber_cauldrons:temp/item/bottled_vex gm4_zauber_cauldrons.vex_count int 1 run scoreboard players get @s gm4_zc_fullness # read coordinates -execute store result storage gm4_zauber_cauldrons:temp/item/bottled_vex gm4_zauber_cauldrons.cauldron_pos.x int 1 run data get entity @s Pos[0] -execute store result storage gm4_zauber_cauldrons:temp/item/bottled_vex gm4_zauber_cauldrons.cauldron_pos.y int 1 run data get entity @s Pos[1] -execute store result storage gm4_zauber_cauldrons:temp/item/bottled_vex gm4_zauber_cauldrons.cauldron_pos.z int 1 run data get entity @s Pos[2] +execute store result score $cauldron_x gm4_zc_data run data get entity @s Pos[0] +execute store result score $cauldron_y gm4_zc_data run data get entity @s Pos[1] +execute store result score $cauldron_z gm4_zc_data run data get entity @s Pos[2] +execute store result storage gm4_zauber_cauldrons:temp/item/bottled_vex gm4_zauber_cauldrons.cauldron_pos.x int 1 run scoreboard players get $cauldron_x gm4_zc_data +execute store result storage gm4_zauber_cauldrons:temp/item/bottled_vex gm4_zauber_cauldrons.cauldron_pos.y int 1 run scoreboard players get $cauldron_y gm4_zc_data +execute store result storage gm4_zauber_cauldrons:temp/item/bottled_vex gm4_zauber_cauldrons.cauldron_pos.z int 1 run scoreboard players get $cauldron_z gm4_zc_data # read dimension execute store result storage gm4_zauber_cauldrons:temp/item/bottled_vex gm4_zauber_cauldrons.cauldron_pos.dimension int 1 run scoreboard players get @e[type=marker,tag=gm4_dimension,distance=0..,limit=1] gm4_dimension +# calculate and store preferred moon phase +scoreboard players operation $cauldron_x gm4_zc_data /= #256 gm4_zc_moon_phase +scoreboard players operation $cauldron_y gm4_zc_data /= #256 gm4_zc_moon_phase +scoreboard players operation $cauldron_z gm4_zc_data /= #256 gm4_zc_moon_phase +scoreboard players operation $cauldron_x gm4_zc_data += $cauldron_y gm4_zc_data +scoreboard players operation $cauldron_x gm4_zc_data += $cauldron_z gm4_zc_data +scoreboard players operation $cauldron_x gm4_zc_data += $magicol_offset gm4_zc_moon_phase +scoreboard players operation $cauldron_x gm4_zc_data %= #8 gm4_zc_moon_phase +execute store result storage gm4_zauber_cauldrons:temp/item/bottled_vex gm4_zauber_cauldrons.preferred_moon_phase int 1 run scoreboard players get $cauldron_x gm4_zc_data + # spawn item loot spawn ~ ~.2 ~ loot gm4_zauber_cauldrons:items/bottled_vex @@ -22,5 +35,10 @@ execute align xyz as @e[type=item,dx=0,dy=0,dz=0] run data modify entity @s Pick # reset storage data remove storage gm4_zauber_cauldrons:temp/item/bottled_vex gm4_zauber_cauldrons +# reset fake players +scoreboard players reset $cauldron_x gm4_zc_data +scoreboard players reset $cauldron_y gm4_zc_data +scoreboard players reset $cauldron_z gm4_zc_data + # store success scoreboard players set $bottled_possessed_items gm4_zc_data 1 diff --git a/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/extra_items/crack_bottle.mcfunction b/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/extra_items/crack_bottle.mcfunction deleted file mode 100644 index cbcd19ccef..0000000000 --- a/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/extra_items/crack_bottle.mcfunction +++ /dev/null @@ -1,9 +0,0 @@ -# @s = none -# at world spawn -# scheduled from init - -# release vexes from bottled vexes -execute as @e[type=item,nbt={Item:{tag:{gm4_zauber_cauldrons:{item:"bottled_vex"}}}}] at @s run function gm4_zauber_cauldrons:cauldron/extra_items/release_from_bottle - -# reschedule -schedule function gm4_zauber_cauldrons:cauldron/extra_items/crack_bottle 48t diff --git a/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/extra_items/process_bottled_vex_items.mcfunction b/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/extra_items/process_bottled_vex_items.mcfunction new file mode 100644 index 0000000000..cb50388ef5 --- /dev/null +++ b/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/extra_items/process_bottled_vex_items.mcfunction @@ -0,0 +1,13 @@ +# @s = none +# at world spawn +# scheduled every 48t + +# get current moon phase +execute store result score $current gm4_zc_moon_phase run time query day +scoreboard players operation $current gm4_zc_moon_phase %= #8 gm4_zc_moon_phase + +# release vexes from bottled vexes +execute as @e[type=item,nbt={Item:{tag:{gm4_zauber_cauldrons:{item:"bottled_vex"}}}}] at @s run function gm4_zauber_cauldrons:cauldron/extra_items/release_from_bottle/crack_bottle + +# reschedule +schedule function gm4_zauber_cauldrons:cauldron/extra_items/process_bottled_vex_items 48t diff --git a/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/extra_items/release_from_bottle.mcfunction b/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/extra_items/release_from_bottle.mcfunction deleted file mode 100644 index ce82514505..0000000000 --- a/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/extra_items/release_from_bottle.mcfunction +++ /dev/null @@ -1,13 +0,0 @@ -# @s = bottled vex item -# run from main -# at @s - -scoreboard players add @s gm4_zc_data 1 -# moves vex content to score -execute if score @s gm4_zc_data matches 2.. store result score @s gm4_zc_fullness run data get entity @s Item.tag.gm4_zauber_cauldrons.vex_count 1 -# release the vexes -execute if score @s gm4_zc_data matches 1.. run particle minecraft:block glass ~ ~ ~ 0.12 0.12 0.12 0 15 -execute if score @s gm4_zc_data matches 1 run playsound minecraft:block.glass.break block @a[distance=..8] ~ ~ ~ 0.1 1.9 -execute if score @s gm4_zc_data matches 2.. run playsound minecraft:block.glass.break block @a[distance=..8] ~ ~ ~ 1 1.3 -execute if score @s gm4_zc_data matches 2.. run function gm4_zauber_cauldrons:cauldron/extra_items/create_possessed_items -execute if score @s gm4_zc_data matches 2.. run kill @s diff --git a/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/extra_items/release_from_bottle/crack_bottle.mcfunction b/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/extra_items/release_from_bottle/crack_bottle.mcfunction new file mode 100644 index 0000000000..47f73f2862 --- /dev/null +++ b/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/extra_items/release_from_bottle/crack_bottle.mcfunction @@ -0,0 +1,17 @@ +# @s = bottled vex item +# run from cauldron/extra_items/process_bottled_vex_items +# at @s + +# initialize newly thrown bottles +execute unless score @s gm4_zc_bottled_vex_escape_timer matches 0.. run scoreboard players set @s gm4_zc_bottled_vex_escape_timer 3 + +# decrease timer +execute if score @s gm4_zc_bottled_vex_escape_timer matches 0.. run scoreboard players remove @s gm4_zc_bottled_vex_escape_timer 1 +execute if score @s gm4_zc_bottled_vex_escape_timer matches 0.. run particle minecraft:block glass ~ ~ ~ 0.1 0.1 0.1 0 1 + +# play sound +execute if score @s gm4_zc_bottled_vex_escape_timer matches 0.. run playsound minecraft:block.glass.break block @a[distance=..8] ~ ~ ~ 0.1 1.9 + +# break free +execute if score @s gm4_zc_bottled_vex_escape_timer matches 1 run function gm4_zauber_cauldrons:cauldron/extra_items/release_from_bottle/prepare_release +execute if score @s gm4_zc_bottled_vex_escape_timer matches ..0 run function gm4_zauber_cauldrons:cauldron/extra_items/release_from_bottle/release diff --git a/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/extra_items/release_from_bottle/prepare_release.mcfunction b/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/extra_items/release_from_bottle/prepare_release.mcfunction new file mode 100644 index 0000000000..d08836f396 --- /dev/null +++ b/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/extra_items/release_from_bottle/prepare_release.mcfunction @@ -0,0 +1,11 @@ +# @s = bottled vex item +# run from cauldron/extra_items/release_from_bottle/crack_bottle +# at @s + +# load data from item +data modify storage gm4_zauber_cauldrons:temp/cauldron/extra_items bottled_vex set from entity @s Item.tag.gm4_zauber_cauldrons +execute store result score @s gm4_zc_moon_phase run data get storage gm4_zauber_cauldrons:temp/cauldron/extra_items bottled_vex.preferred_moon_phase +execute store result score @s gm4_zc_fullness run data get storage gm4_zauber_cauldrons:temp/cauldron/extra_items bottled_vex.vex_count + +# unless it is the vex's preferred moon phase, start release one tick early +execute unless score @s gm4_zc_moon_phase = $current gm4_zc_moon_phase run function gm4_zauber_cauldrons:cauldron/extra_items/release_from_bottle/release diff --git a/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/extra_items/release_from_bottle/release.mcfunction b/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/extra_items/release_from_bottle/release.mcfunction new file mode 100644 index 0000000000..04314a0b68 --- /dev/null +++ b/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/extra_items/release_from_bottle/release.mcfunction @@ -0,0 +1,9 @@ +# @s = bottled vex item +# run from cauldron/extra_items/release_from_bottle/prepare_release +# at @s + +# release vex and kill bottled vex item +function gm4_zauber_cauldrons:cauldron/extra_items/create_possessed_items +playsound minecraft:block.glass.break block @a[distance=..8] ~ ~ ~ 1 1.3 +particle minecraft:block glass ~ ~ ~ 0.12 0.12 0.12 0 16 +kill @s diff --git a/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/liquid/magicol/check_liquid_id.mcfunction b/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/liquid/magicol/check_liquid_id.mcfunction new file mode 100644 index 0000000000..0f64d206a8 --- /dev/null +++ b/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/liquid/magicol/check_liquid_id.mcfunction @@ -0,0 +1,7 @@ +# confirms the liquid id to be 'magicol' before displaying particles +# @s = zauber cauldron with valid structure +# at @s align xyz +# run via function tag #gm4_zauber_cauldrons:cauldron/liquid/cauldron_particles from cauldron/structure/valid + +# check liquid id unless another expansion already displayed a particle +execute unless score $displayed_liquid_particle gm4_zc_data matches 1.. if data storage gm4_zauber_cauldrons:temp/cauldron/ingredients liquid{id:"magicol"} run function gm4_zauber_cauldrons:cauldron/liquid/magicol/particles diff --git a/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/liquid/magicol/particles.mcfunction b/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/liquid/magicol/particles.mcfunction index c1b40abb3c..387977a453 100644 --- a/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/liquid/magicol/particles.mcfunction +++ b/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/liquid/magicol/particles.mcfunction @@ -1,13 +1,20 @@ # particles displayed over a cauldron when it is filled with magicol # @s = zauber cauldron with valid structure # at @s align xyz -# run via function tag #gm4_zauber_cauldrons:cauldron/liquid/cauldron_particles from cauldron/structure/valid +# run from gm4_zauber_cauldrons:cauldron/liquid/magicol/check_liquid_id -# if liquid id is magicol, display particles +# display enchant particles for players with full zauber armor during the correct moon phase +execute store result score $preferred gm4_zc_moon_phase run data get storage gm4_zauber_cauldrons:temp/cauldron/ingredients liquid.magicol.moon_phase +execute if score $preferred gm4_zc_moon_phase = $current gm4_zc_moon_phase run particle enchant ~.5 ~.75 ~.5 0.1 0.1 0.1 0.4 6 normal @a[distance=..8,advancements={gm4_zauber_cauldrons:equipment/has_full_armor=true}] +scoreboard players reset $preferred gm4_zc_moon_phase +# if liquid id is magicol, display particles # generated with the help of bolt for color_data in ctx.meta['magicol_colors']: - execute unless score $displayed_particle gm4_zc_data matches 1.. store success score $displayed_particle gm4_zc_data if data storage gm4_zauber_cauldrons:temp/cauldron/ingredients liquid{id:"magicol",magicol:{color:color_data['color']}} run summon area_effect_cloud ~.5 ~.75 ~.5 {Particle:"entity_effect",Radius:0.1f,Duration:10,Color:int(color_data['particle_color'])} + execute unless score $displayed_magicol_particle gm4_zc_data matches 1.. store success score $displayed_magicol_particle gm4_zc_data if data storage gm4_zauber_cauldrons:temp/cauldron/ingredients liquid{id:"magicol",magicol:{color:color_data['color']}} run summon area_effect_cloud ~.5 ~.75 ~.5 {Particle:"entity_effect",Radius:0.1f,Duration:10,Color:int(color_data['particle_color'])} + +# set flag +scoreboard players set $displayed_liquid_particle gm4_zc_data 1 # reset fake player -scoreboard players reset $displayed_particle gm4_zc_data +scoreboard players reset $displayed_magicol_particle gm4_zc_data diff --git a/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/recipe_checks.mcfunction b/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/recipe_checks.mcfunction index 5ca8ddcec9..024ad0d01e 100644 --- a/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/recipe_checks.mcfunction +++ b/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/recipe_checks.mcfunction @@ -34,6 +34,8 @@ execute unless score $recipe_success gm4_zc_data matches 1.. if score $has_water # magicol execute unless score $recipe_success gm4_zc_data matches 1.. if score $has_water gm4_zc_data matches 1 if data storage gm4_zauber_cauldrons:temp/cauldron/ingredients items[{Count:1b,tag:{gm4_zauber_cauldrons:{item:"bottled_vex"}}}] if data storage gm4_zauber_cauldrons:temp/cauldron/ingredients items[{Count:1b,tag:{gm4_zauber_cauldrons:{item:"enchanted_prismarine_shard"}}}] run function gm4_zauber_cauldrons:recipes/magicol/select_color +# + # reset fake players and storage scoreboard players reset $recipe_success gm4_zc_data scoreboard players reset $has_bottle gm4_zc_fullness diff --git a/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/structure/valid.mcfunction b/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/structure/valid.mcfunction index 691481d8d8..f6d072aacb 100644 --- a/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/structure/valid.mcfunction +++ b/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/cauldron/structure/valid.mcfunction @@ -17,6 +17,7 @@ data modify storage gm4_zauber_cauldrons:temp/cauldron/ingredients liquid set fr execute if score $has_water gm4_zc_data matches 1 run particle minecraft:poof ~.5 ~.5 ~.5 .005 .2 .005 .0005 4 execute if score $has_powder_snow gm4_zc_data matches 1 run particle minecraft:dripping_water ~.5 ~0.88 ~.5 0.14 0 0.14 1 1 execute if score @s gm4_zc_liquid_level matches 1..3 run function #gm4_zauber_cauldrons:cauldron/liquid/cauldron_particles +scoreboard players reset $displayed_liquid_particle gm4_zc_data # check for recipes if at least one item is found inside execute if score @s gm4_zc_fullness matches 1.. positioned ~.5 ~.5 ~.5 run function gm4_zauber_cauldrons:cauldron/recipe_checks diff --git a/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/init.mcfunction b/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/init.mcfunction index 0f0d53fa98..848b572e82 100644 --- a/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/init.mcfunction +++ b/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/init.mcfunction @@ -1,4 +1,5 @@ scoreboard objectives add gm4_entity_version dummy +scoreboard objectives add gm4_zc_bottled_vex_escape_timer dummy scoreboard objectives add gm4_zc_chorus dummy scoreboard objectives add gm4_zc_crystal dummy scoreboard objectives add gm4_zc_data dummy @@ -7,17 +8,18 @@ scoreboard objectives add gm4_zc_flowers dummy scoreboard objectives add gm4_zc_fullness dummy scoreboard objectives add gm4_zc_id dummy scoreboard objectives add gm4_zc_liquid_level dummy -scoreboard objectives add gm4_zc_rabtarget dummy +scoreboard objectives add gm4_zc_moon_phase dummy scoreboard objectives add gm4_zc_no_explode dummy -function gm4_zauber_cauldrons:recipes/flowers/initiate_flower_types -function gm4_zauber_cauldrons:recipes/chorus/initiate_chorus_amounts +scoreboard objectives add gm4_zc_rabtarget dummy +execute unless score $seed gm4_zc_flowers matches -2147483648..2147483647 run function gm4_zauber_cauldrons:recipes/flowers/initiate_flower_types +execute unless score seed gm4_zc_chorus matches -2147483648..2147483647 run function gm4_zauber_cauldrons:recipes/chorus/initiate_chorus_amounts +execute unless score $magicol_offset gm4_zc_moon_phase matches -2147483648..2147483647 run function gm4_zauber_cauldrons:recipes/magicol/initiate_moon_phase_offset scoreboard players set #modulo gm4_zc_fullness 3 +scoreboard players set #8 gm4_zc_moon_phase 8 +scoreboard players set #256 gm4_zc_moon_phase 256 team add gm4_hide_name team modify gm4_hide_name nametagVisibility never -# This module includes the gm4_forceload library. If you didn't get this pack from our website, make sure you have the gm4_forceload library installed! -# This module includes the gm4_player_heads library. If you didn't get this pack from our website, make sure you have the gm4_player_heads library installed! - # register skulls execute unless data storage gm4_player_heads:register heads[{id:"gm4_zauber_cauldrons:crystal/instant_damage/v0"}] run data modify storage gm4_player_heads:register heads append value {id:"gm4_zauber_cauldrons:crystal/instant_damage/v0",name:'[Drop to Fix Item] gm4_zauber_cauldrons:crystal/instant_damage/v0',value:'ewogICJ0aW1lc3RhbXAiIDogMTYyNzU4NzQ1MDY4OCwKICAicHJvZmlsZUlkIiA6ICJmMGIzYmRkMjEwNDg0Y2VlYjZhNTQyYmZiOGEyNTdiMiIsCiAgInByb2ZpbGVOYW1lIiA6ICJBbm9uaW1ZVFQiLAogICJzaWduYXR1cmVSZXF1aXJlZCIgOiB0cnVlLAogICJ0ZXh0dXJlcyIgOiB7CiAgICAiU0tJTiIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTUxN2E0NDE1NDI5NzQ2OTZjNjcxYWI3MmQ1ZmQwMTVhNTI5ZTVmZjVhZjRhYTEwNDM4MWY1ZjllYWYyM2EwYSIsCiAgICAgICJtZXRhZGF0YSIgOiB7CiAgICAgICAgIm1vZGVsIiA6ICJzbGltIgogICAgICB9CiAgICB9CiAgfQp9',item:{CustomModelData:3420054,gm4_zauber_cauldrons:{item:"crystal",type:"instant_damage"},HideFlags:1,display:{Name:'{"italic":false,"translate":"item.gm4.zauber_cauldrons.crystal.instant_damage","fallback":"Crystal of Harming"}',Lore:['{"italic":false,"color":"red","translate":"potion.withAmplifier","with":[{"translate":"effect.minecraft.instant_damage"},{"translate":"potion.potency.1"}]}']}}} execute unless data storage gm4_player_heads:register heads[{id:"gm4_zauber_cauldrons:crystal/instant_health/v0"}] run data modify storage gm4_player_heads:register heads append value {id:"gm4_zauber_cauldrons:crystal/instant_health/v0",name:'[Drop to Fix Item] gm4_zauber_cauldrons:crystal/instant_health/v0',value:'ewogICJ0aW1lc3RhbXAiIDogMTYyNzU4Nzc2NjExMSwKICAicHJvZmlsZUlkIiA6ICI2NGExOGZiZmQ0YWY0Yzg0YjliN2FjZmNlNDRmMTAzZCIsCiAgInByb2ZpbGVOYW1lIiA6ICJieVJPTkFMX1lUIiwKICAic2lnbmF0dXJlUmVxdWlyZWQiIDogdHJ1ZSwKICAidGV4dHVyZXMiIDogewogICAgIlNLSU4iIDogewogICAgICAidXJsIiA6ICJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlLzIxY2Y1YmM2OTJjZmQwZjI3YzkzNTUyOWJjNjE1ZmRjYjc0ZmZkZWJlYWFlY2JkOTU3OGFhOGUwMzFjNDRjYmYiLAogICAgICAibWV0YWRhdGEiIDogewogICAgICAgICJtb2RlbCIgOiAic2xpbSIKICAgICAgfQogICAgfQogIH0KfQ==',item:{CustomModelData:3420055,gm4_zauber_cauldrons:{item:"crystal",type:"instant_health"},HideFlags:1,display:{Name:'{"italic":false,"translate":"item.gm4.zauber_cauldrons.crystal.instant_health","fallback":"Crystal of Healing"}',Lore:['{"italic":false,"color":"blue","translate":"potion.withAmplifier","with":[{"translate":"effect.minecraft.instant_health"},{"translate":"potion.potency.1"}]}', '{"italic":false,"color":"red","translate":"potion.withAmplifier","with":[{"translate":"effect.minecraft.nausea"},{"translate":"potion.potency.0"}]}']}}} @@ -40,7 +42,7 @@ scoreboard players set zauber_cauldrons gm4_modules 1 schedule function gm4_zauber_cauldrons:main 1t # start vex in a bottle release meachanism -schedule function gm4_zauber_cauldrons:cauldron/extra_items/crack_bottle 2t +schedule function gm4_zauber_cauldrons:cauldron/extra_items/process_bottled_vex_items 2t # guidebook execute if score gm4_guidebook load.status matches 1 run summon marker ~ 5366.749169930782 ~ {CustomName:'"gm4_zauber_cauldrons_guide"',Tags:["gm4_guide"],data:{type:"module",id:"zauber_cauldrons",page_count:14,line_count:1,module_name:"Zauber Cauldrons"}} diff --git a/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/recipes/magicol/initiate_moon_phase_offset.mcfunction b/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/recipes/magicol/initiate_moon_phase_offset.mcfunction new file mode 100644 index 0000000000..7f0fc0ce8f --- /dev/null +++ b/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/functions/recipes/magicol/initiate_moon_phase_offset.mcfunction @@ -0,0 +1,7 @@ +# no @s. +# at world spawn +# called by init + +# generates a random moon_phase_offset based on the world seed on module installation +random reset gm4_zauber_cauldrons:bottled_vex/moon_phase_offset 0 true true +execute store result score $magicol_offset gm4_zc_data run random value 0..7 gm4_zauber_cauldrons:bottled_vex/moon_phase_offset diff --git a/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/tags/functions/cauldron/liquid/cauldron_particles.json b/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/tags/functions/cauldron/liquid/cauldron_particles.json index 9b9fc29ae9..6aa94de4eb 100644 --- a/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/tags/functions/cauldron/liquid/cauldron_particles.json +++ b/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/tags/functions/cauldron/liquid/cauldron_particles.json @@ -1,5 +1,5 @@ { "values": [ - "gm4_zauber_cauldrons:cauldron/liquid/magicol/particles" + "gm4_zauber_cauldrons:cauldron/liquid/magicol/check_liquid_id" ] } diff --git a/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/templates/functions/magicol/craft_magicol.mcfunction b/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/templates/functions/magicol/craft_magicol.mcfunction index e98b3b0783..1d355edc10 100644 --- a/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/templates/functions/magicol/craft_magicol.mcfunction +++ b/gm4_zauber_cauldrons/data/gm4_zauber_cauldrons/templates/functions/magicol/craft_magicol.mcfunction @@ -17,6 +17,7 @@ execute if block ~ ~ ~ minecraft:water_cauldron[level=2] run scoreboard players execute if block ~ ~ ~ minecraft:water_cauldron[level=3] run scoreboard players set @s gm4_zc_liquid_level 3 # set liquid type data modify entity @s data.gm4_zauber_cauldrons.liquid set value {id:"magicol",magicol:{color:"{{color}}"}} +data modify entity @s data.gm4_zauber_cauldrons.liquid.magicol.moon_phase set from storage gm4_zauber_cauldrons:temp/cauldron/ingredients items[{Count:1b,tag:{gm4_zauber_cauldrons:{item:"bottled_vex"}}}].tag.gm4_zauber_cauldrons.preferred_moon_phase # visuals summon minecraft:item_display ~ ~.0781 ~ {item:{id:"minecraft:{{color}}_concrete_powder",Count:1b,tag:{CustomModelData:{{custom_model_data}}}},item_display:"fixed",transformation:[1.984f,0f,0f,0f,0f,0f,0f,0f,0f,0f,1.984f,0f,0f,0f,0f,1f],Tags:["gm4_zc_liquid","gm4_zc_magicol","gm4_zc_{{color}}_magicol"]}