-
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update rope ladders * use gm4 water block tag * make hitbox larger, prevent back placement * uses destroy for particles, uses gm4:replaceable * remove unused file
- Loading branch information
1 parent
9bd5e70
commit c39d15f
Showing
16 changed files
with
37 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...ta/gm4_rope_ladders/functions/mechanics/right_click_detection/rcd_manager/loop.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
# loops as long as a "right click detection" villager exists | ||
# loops as long as a "right click detection" interaction exists | ||
# run from function: gm4_rope_ladders:mechanics/right_click_detection/rcd_manager/spawn_rcd | ||
|
||
# reset scoreboard | ||
scoreboard players remove $rcd_found gm4_rol_data 1 | ||
|
||
# execute as rcd | ||
execute as @e[type=villager,tag=gm4_rol_rcd_ladder,tag=gm4_rol_rcd] at @s store success score $rcd_found gm4_rol_data run function gm4_rope_ladders:mechanics/right_click_detection/rcd_manager/process | ||
execute as @e[type=interaction,tag=gm4_rol_rcd_ladder,tag=gm4_rol_rcd] at @s store success score $rcd_found gm4_rol_data run function gm4_rope_ladders:mechanics/right_click_detection/rcd_manager/process | ||
|
||
# loop | ||
execute if score $rcd_found gm4_rol_data matches -9.. run schedule function gm4_rope_ladders:mechanics/right_click_detection/rcd_manager/loop 10t |
12 changes: 6 additions & 6 deletions
12
...gm4_rope_ladders/functions/mechanics/right_click_detection/rcd_manager/process.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
# processes the "right click detection" villager so that it is despawned when unneeded | ||
# processes the "right click detection" interaction so that it is despawned when unneeded | ||
# run from function: gm4_rope_ladders:mechanics/right_click_detection/rcd_manager/loop | ||
|
||
# kill rcd if uneeded | ||
execute unless entity @a[tag=gm4_rol_holding_ladder,distance=..5] run tp @s ~ -1000 ~ | ||
execute unless entity @a[tag=gm4_rol_holding_ladder,distance=..5] run tp @s ~ -1000 ~ | ||
execute unless block ~ ~ ~ ladder run tp @s ~ -1000 ~ | ||
execute if block ~ ~-1 ~ ladder unless block ~ ~1 ~ #gm4:air run tp @s ~ -1000 ~ | ||
execute if entity @e[type=villager,tag=gm4_rol_rcd_ladder,distance=0.1..10] run tp @s ~ -1000 ~ | ||
scoreboard players set $killed_rcd gm4_rol_data 0 | ||
execute if score $killed_rcd gm4_rol_data matches 0 store success score $killed_rcd gm4_rol_data unless entity @a[tag=gm4_rol_holding_ladder,distance=..5] run kill @s | ||
execute if score $killed_rcd gm4_rol_data matches 0 store success score $killed_rcd gm4_rol_data unless block ~ ~ ~ ladder run kill @s | ||
execute if score $killed_rcd gm4_rol_data matches 0 store success score $killed_rcd gm4_rol_data if block ~ ~-1 ~ ladder unless block ~ ~1 ~ #gm4:air run kill @s | ||
execute if score $killed_rcd gm4_rol_data matches 0 store success score $killed_rcd gm4_rol_data if entity @e[type=interaction,tag=gm4_rol_rcd_ladder,distance=0.1..10] run kill @s |
5 changes: 2 additions & 3 deletions
5
...4_rope_ladders/functions/mechanics/right_click_detection/rcd_manager/spawn_rcd.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
# spawns a baby villager that handles right click detection | ||
# spawns a baby interaction that handles right click detection | ||
# @s = player holding ladder | ||
# at position of ladder block, align xyz positioned ~.5 ~ ~.5 (varies based on rotation) | ||
# run from function: gm4_rope_ladders:mechanics/right_click_detection/detect_ladder_raycast/found | ||
|
||
# spawn rcd | ||
summon villager ~ ~100 ~ {NoGravity:1b,Silent:1b,Invulnerable:1b,NoAI:1b,Age:-2147483648,Tags:["gm4_rol_rcd","gm4_rol_rcd_ladder","smithed.entity","smithed.strict"],ActiveEffects:[{Id:14,Amplifier:0b,Duration:999999,ShowParticles:0b}],Offers:{}} | ||
execute positioned ~ ~100 ~ run tp @e[type=villager,tag=gm4_rol_rcd_ladder,dx=0] ~ ~-100 ~ | ||
summon interaction ~0.0 ~0.0 ~0.0 {Glowing:1b,width:0.2f,height:1.05f,response:1b,Tags:["gm4_rol_rcd","gm4_rol_rcd_ladder","smithed.entity","smithed.strict"]} | ||
|
||
# start loop | ||
function gm4_rope_ladders:mechanics/right_click_detection/rcd_manager/loop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
gm4_rope_ladders/data/gm4_rope_ladders/tags/blocks/ladder_scan.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
{ | ||
"values": [ | ||
"#gm4:air", | ||
"water", | ||
"#gm4:replaceable", | ||
"minecraft:ladder" | ||
] | ||
} |
6 changes: 0 additions & 6 deletions
6
gm4_rope_ladders/data/gm4_rope_ladders/tags/blocks/valid_replace.json
This file was deleted.
Oops, something went wrong.