-
-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rope Ladders Update #881
Merged
Bloo-dev
merged 5 commits into
Gamemode4Dev:master
from
MichaelModulo:gm4_rope_ladders-update
Sep 22, 2023
Merged
Rope Ladders Update #881
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
3666340
update rope ladders
MichaelModulo 51695e2
use gm4 water block tag
MichaelModulo 97408fd
make hitbox larger, prevent back placement
MichaelModulo ea0719f
uses destroy for particles, uses gm4:replaceable
MichaelModulo 7f16fc4
remove unused file
MichaelModulo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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_rope_ladders:valid_replace", | ||
"minecraft:ladder" | ||
] | ||
} |
3 changes: 1 addition & 2 deletions
3
gm4_rope_ladders/data/gm4_rope_ladders/tags/blocks/valid_replace.json
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this file isn't used anywhere and could be removed |
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,6 +1,5 @@ | ||
{ | ||
"values": [ | ||
"#gm4:air", | ||
"water" | ||
"#gm4:replaceable" | ||
] | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
technically this means that if the ladder above is waterlogged it will incorrectly copy a waterlogged ladder. However the only method I found to do this is by replacing light blocks (as they are replaceable but stop water flow), so it's not a big deal.