Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gm4_lively_lily_pads/beet.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id: gm4_lively_lily_pads
name: Lively Lily Pads
version: 3.2.X
version: 3.3.X

data_pack:
load: .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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] ~ ~ ~

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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] ~ ~ ~

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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] ~ ~ ~
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading