diff --git a/gm4_lively_lily_pads/beet.yaml b/gm4_lively_lily_pads/beet.yaml index b5db60accf..d1fbfe9600 100644 --- a/gm4_lively_lily_pads/beet.yaml +++ b/gm4_lively_lily_pads/beet.yaml @@ -1,6 +1,6 @@ id: gm4_lively_lily_pads name: Lively Lily Pads -version: 3.2.X +version: 3.3.X data_pack: load: . diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/candle/interact_rcd.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/candle/interact_rcd.mcfunction index af1f26bfcd..6aa59fda3e 100644 --- a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/candle/interact_rcd.mcfunction +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/candle/interact_rcd.mcfunction @@ -11,6 +11,7 @@ scoreboard players set $offhand gm4_llp.data 0 scoreboard players set $holding_lighter gm4_llp.data 0 scoreboard players set $holding_candle gm4_llp.data 0 scoreboard players set $ignited gm4_llp.data 0 +scoreboard players set $extinguished gm4_llp.data 0 # item information execute if items entity @s weapon.mainhand #gm4_lively_lily_pads:candle_interactable run function gm4_lively_lily_pads:mechanics/interactions/candle/get_mainhand_data @@ -20,9 +21,14 @@ execute unless score $mainhand gm4_llp.data matches 1 if items entity @s weapon. execute as @e[type=interaction,tag=gm4_llp_candle_rcd,distance=..8] if data entity @s interaction at @s run function gm4_lively_lily_pads:mechanics/interactions/candle/process_interaction # player effects +execute if score $extinguished gm4_llp.data matches 1 run swing @s mainhand + execute if score $ignited gm4_llp.data matches 1 run function gm4_lively_lily_pads:mechanics/interactions/candle/find_igniter + execute if score $placement_success gm4_llp.data matches 1 if score $mainhand gm4_llp.data matches 1 run item modify entity @s[gamemode=!creative] weapon.mainhand {function:"minecraft:set_count",count:-1,add:1b} +execute if score $placement_success gm4_llp.data matches 1 if score $mainhand gm4_llp.data matches 1 run swing @s mainhand execute if score $placement_success gm4_llp.data matches 1 if score $offhand gm4_llp.data matches 1 run item modify entity @s[gamemode=!creative] weapon.offhand {function:"minecraft:set_count",count:-1,add:1b} +execute if score $placement_success gm4_llp.data matches 1 if score $offhand gm4_llp.data matches 1 run swing @s offhand # reset scoreboard players reset $placement_success gm4_llp.data diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/candle/used_mainhand_fire_charge.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/candle/used_mainhand_fire_charge.mcfunction index b5775170ce..af4ac9b144 100644 --- a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/candle/used_mainhand_fire_charge.mcfunction +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/candle/used_mainhand_fire_charge.mcfunction @@ -3,6 +3,7 @@ # at @s # run from mechanics/interactions/candle/find_igniter +swing @s mainhand # sound playsound minecraft:item.firecharge.use player @a[distance=..16] diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/candle/used_mainhand_flint_and_steel.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/candle/used_mainhand_flint_and_steel.mcfunction index 224ce35f06..80a86b0314 100644 --- a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/candle/used_mainhand_flint_and_steel.mcfunction +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/candle/used_mainhand_flint_and_steel.mcfunction @@ -3,6 +3,7 @@ # at @s # run from mechanics/interactions/candle/find_igniter +swing @s mainhand # sound playsound minecraft:item.flintandsteel.use player @a[distance=..16] ~ ~ ~ diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/candle/used_offhand_fire_charge.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/candle/used_offhand_fire_charge.mcfunction index ed13e0f03a..a5415bcec6 100644 --- a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/candle/used_offhand_fire_charge.mcfunction +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/candle/used_offhand_fire_charge.mcfunction @@ -3,6 +3,7 @@ # at @s # run from mechanics/interactions/candle/find_igniter +swing @s offhand # sound playsound minecraft:item.firecharge.use player @a[distance=..16] diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/candle/used_offhand_flint_and_steel.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/candle/used_offhand_flint_and_steel.mcfunction index 4f9346caf4..b0b31757dd 100644 --- a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/candle/used_offhand_flint_and_steel.mcfunction +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/candle/used_offhand_flint_and_steel.mcfunction @@ -3,6 +3,7 @@ # at @s # run from mechanics/interactions/candle/find_igniter +swing @s offhand # sound playsound minecraft:item.flintandsteel.use player @a[distance=..16] ~ ~ ~ diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/candles.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/candles.mcfunction index 17dea5ba05..ed134163f1 100644 --- a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/candles.mcfunction +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/candles.mcfunction @@ -19,7 +19,7 @@ $summon minecraft:block_display ~ ~ ~ {\ right_rotation:[0f,0f,0f,1f]\ }\ } -summon minecraft:interaction ~ ~ ~ {width:0.4f,height:0.4f,response:1b,Tags:["gm4_llp_candle_rcd","gm4_llp_perma_rcd","smithed.entity","smithed.strict"]} +summon minecraft:interaction ~ ~ ~ {width:0.4f,height:0.4f,Tags:["gm4_llp_candle_rcd","gm4_llp_perma_rcd","smithed.entity","smithed.strict"]} # sound playsound minecraft:block.candle.place block @a[distance=..16] ~ ~ ~ diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/copper_lantern.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/copper_lantern.mcfunction index 24c35344dc..195d7a7395 100644 --- a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/copper_lantern.mcfunction +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/copper_lantern.mcfunction @@ -16,7 +16,7 @@ $summon minecraft:block_display ~ ~ ~ {\ right_rotation:[0f,0f,0f,1f]\ }\ } -summon minecraft:interaction ~ ~ ~ {width:0.4f,height:0.4f,response:1b,Tags:["gm4_llp_unwaxed_copper_rcd","gm4_llp_perma_rcd","smithed.entity","smithed.strict"]} +summon minecraft:interaction ~ ~ ~ {width:0.4f,height:0.4f,Tags:["gm4_llp_unwaxed_copper_rcd","gm4_llp_perma_rcd","smithed.entity","smithed.strict"]} # light block setblock ~ ~1 ~ light[level=14] keep diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/interact_rcd.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/interact_rcd.mcfunction index 32cf55fa4b..26037f7fd8 100644 --- a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/interact_rcd.mcfunction +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/interact_rcd.mcfunction @@ -21,7 +21,9 @@ execute as @e[type=interaction,tag=gm4_llp_placement_rcd,distance=..8] if data e # remove item if successful execute if score $placement_success gm4_llp.data matches 1 if score $mainhand gm4_llp.data matches 1 run item modify entity @s[gamemode=!creative] weapon.mainhand {function:"minecraft:set_count",count:-1,add:1b} +execute if score $placement_success gm4_llp.data matches 1 if score $mainhand gm4_llp.data matches 1 run swing @s mainhand execute if score $placement_success gm4_llp.data matches 1 if score $offhand gm4_llp.data matches 1 run item modify entity @s[gamemode=!creative] weapon.offhand {function:"minecraft:set_count",count:-1,add:1b} +execute if score $placement_success gm4_llp.data matches 1 if score $offhand gm4_llp.data matches 1 run swing @s offhand # reset scoreboard players reset $placement_success gm4_llp.data diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/waxed_copper_lantern.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/waxed_copper_lantern.mcfunction index 252f592042..90ab0910be 100644 --- a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/waxed_copper_lantern.mcfunction +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/waxed_copper_lantern.mcfunction @@ -16,7 +16,7 @@ $summon minecraft:block_display ~ ~ ~ {\ right_rotation:[0f,0f,0f,1f]\ }\ } -summon minecraft:interaction ~ ~ ~ {width:0.4f,height:0.4f,response:1b,Tags:["gm4_llp_waxed_copper_rcd","gm4_llp_perma_rcd","smithed.entity","smithed.strict"]} +summon minecraft:interaction ~ ~ ~ {width:0.4f,height:0.4f,Tags:["gm4_llp_waxed_copper_rcd","gm4_llp_perma_rcd","smithed.entity","smithed.strict"]} # light block setblock ~ ~1 ~ light[level=14] keep diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/unwaxed_copper_lantern/interact_rcd.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/unwaxed_copper_lantern/interact_rcd.mcfunction index 5512604df4..3a7f3bfd3d 100644 --- a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/unwaxed_copper_lantern/interact_rcd.mcfunction +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/unwaxed_copper_lantern/interact_rcd.mcfunction @@ -22,6 +22,11 @@ execute as @e[type=interaction,tag=gm4_llp_unwaxed_copper_rcd,distance=..8] if d # item usage execute if score $wax_used gm4_llp.data matches 1 run item modify entity @s[gamemode=!creative] weapon.mainhand {function:"minecraft:set_count",count:-1,add:1b} +execute if score $wax_used gm4_llp.data matches 1 run swing @s mainhand execute if score $wax_used gm4_llp.data matches 2 run item modify entity @s[gamemode=!creative] weapon.offhand {function:"minecraft:set_count",count:-1,add:1b} +execute if score $wax_used gm4_llp.data matches 2 run swing @s offhand + execute if score $axe_used gm4_llp.data matches 1 if entity @s[gamemode=!creative] run function gm4_lively_lily_pads:mechanics/interactions/waxed_copper_lantern/used_mainhand_axe +execute if score $axe_used gm4_llp.data matches 1 run swing @s mainhand execute if score $axe_used gm4_llp.data matches 2 if entity @s[gamemode=!creative] run function gm4_lively_lily_pads:mechanics/interactions/waxed_copper_lantern/used_offhand_axe +execute if score $axe_used gm4_llp.data matches 2 run swing @s offhand diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/interact_rcd.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/interact_rcd.mcfunction index 9d287252fe..27d71f9e0a 100644 --- a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/interact_rcd.mcfunction +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/interact_rcd.mcfunction @@ -23,4 +23,6 @@ execute if score $scraped gm4_llp.data matches 0 run return fail # update axe durability execute if score $mainhand gm4_llp.data matches 1 if entity @s[gamemode=!creative] run function gm4_lively_lily_pads:mechanics/interactions/waxed_copper_lantern/used_mainhand_axe +execute if score $mainhand gm4_llp.data matches 1 run swing @s mainhand execute if score $offhand gm4_llp.data matches 1 if entity @s[gamemode=!creative] run function gm4_lively_lily_pads:mechanics/interactions/waxed_copper_lantern/used_offhand_axe +execute if score $offhand gm4_llp.data matches 1 run swing @s offhand diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/right_click_detection/create.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/right_click_detection/create.mcfunction index 9e54f0bf14..1684e5306c 100644 --- a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/right_click_detection/create.mcfunction +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/right_click_detection/create.mcfunction @@ -3,5 +3,5 @@ # at @s # run from mechanics/right_click_detection/found -data merge entity @s {width:0.4f,height:0.3f,response:1b,Tags:["gm4_llp_placement_rcd","smithed.entity","smithed.strict"]} +data merge entity @s {width:0.4f,height:0.3f,Tags:["gm4_llp_placement_rcd","smithed.entity","smithed.strict"]} scoreboard players operation @s gm4_llp.id = $player gm4_llp.id diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/upgrade_paths/3.3.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/upgrade_paths/3.3.mcfunction new file mode 100644 index 0000000000..5ae072f9b2 --- /dev/null +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/upgrade_paths/3.3.mcfunction @@ -0,0 +1,6 @@ +# remove `response:1b` from gm4_llp_perma_rcd interactions +# @s = player +# at @s +# run via upgrade paths util + +execute as @e[type=interaction,tag=gm4_llp_perma_rcd,nbt={response:1b}] run data modify entity @s response set value 0b diff --git a/gm4_rope_ladders/data/gm4_rope_ladders/function/mechanics/ladder_placement/successful_place.mcfunction b/gm4_rope_ladders/data/gm4_rope_ladders/function/mechanics/ladder_placement/successful_place.mcfunction index 964ee5c515..3e5e8766f7 100644 --- a/gm4_rope_ladders/data/gm4_rope_ladders/function/mechanics/ladder_placement/successful_place.mcfunction +++ b/gm4_rope_ladders/data/gm4_rope_ladders/function/mechanics/ladder_placement/successful_place.mcfunction @@ -9,7 +9,9 @@ playsound minecraft:block.ladder.place ambient @a[distance=..15] ~ ~ ~ # remove 1 ladder from players hand execute store success score $mainhand gm4_rol_data if items entity @s weapon.mainhand ladder execute if score $mainhand gm4_rol_data matches 1 run item modify entity @s[gamemode=!creative] weapon.mainhand {"function": "minecraft:set_count","count": -1,"add": true} +execute if score $mainhand gm4_rol_data matches 1 run swing @s mainhand execute if score $mainhand gm4_rol_data matches 0 run item modify entity @s[gamemode=!creative] weapon.offhand {"function": "minecraft:set_count","count": -1,"add": true} +execute if score $mainhand gm4_rol_data matches 0 run swing @s offhand # grant advancement advancement grant @s only gm4:rope_ladders diff --git a/gm4_rope_ladders/data/gm4_rope_ladders/function/mechanics/right_click_detection/rcd_manager/create_rcd.mcfunction b/gm4_rope_ladders/data/gm4_rope_ladders/function/mechanics/right_click_detection/rcd_manager/create_rcd.mcfunction index af73280f97..273e88509f 100644 --- a/gm4_rope_ladders/data/gm4_rope_ladders/function/mechanics/right_click_detection/rcd_manager/create_rcd.mcfunction +++ b/gm4_rope_ladders/data/gm4_rope_ladders/function/mechanics/right_click_detection/rcd_manager/create_rcd.mcfunction @@ -4,7 +4,7 @@ # run from function: gm4_rope_ladders:mechanics/right_click_detection/detect_ladder_raycast/found # init -data merge entity @s {width:0.2f,height:1.05f,response:1b,Tags:["gm4_rol_rcd_ladder","smithed.entity","smithed.strict"]} +data merge entity @s {width:0.2f,height:1.05f,Tags:["gm4_rol_rcd_ladder","smithed.entity","smithed.strict"]} scoreboard players operation @s gm4_rol_id = $player gm4_rol_id # start loop