-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from nea-c/dev
update: v3.3
- Loading branch information
Showing
28 changed files
with
149 additions
and
233 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
47 changes: 0 additions & 47 deletions
47
MarkerMotion/data/marker_motion/functions/get_move.mcfunction
This file was deleted.
Oops, something went wrong.
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
46 changes: 0 additions & 46 deletions
46
MarkerMotion/data/marker_motion/functions/set_arrival_pos.mcfunction
This file was deleted.
Oops, something went wrong.
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,25 +1,52 @@ | ||
#> marker_motion:tp/ | ||
# | ||
# 移動先目標までの間にブロックがあるか探す処理 | ||
# その際にヒットボックスでのヒットを行ったりできる | ||
# 到達目標位置をへ自身を移動させ、その間をチェック | ||
# | ||
# @within | ||
# function marker_motion:main | ||
# @within function marker_motion:main | ||
|
||
|
||
# プレイヤーの視線をx軸で反転させた角度 | ||
execute as @e[type=#marker_motion:selector,tag=MarkerMotion.this,limit=1] positioned 0.0 0.0 0.0 positioned ^ ^ ^2 positioned 0.0 ~ ~ positioned ^ ^ ^-1 facing 0.0 0.0 0.0 positioned as @s run tp @s ~ ~ ~ ~ ~ | ||
# 相対で移動 | ||
scoreboard players operation #MarkerMotion.TMP neac_value = #MarkerMotion.Speed neac_value | ||
|
||
# 初期化 | ||
data modify storage neac: _.tp set value [[{success:0b}],[{success:0b}],[{success:0b}],[{success:0b}],[{success:0b}],[{success:0b}],[{success:0b}],[{success:0b}]] | ||
execute if score #MarkerMotion.TMP neac_value matches 2048.. positioned as @s run tp @s ^ ^ ^20.48 | ||
execute if score #MarkerMotion.TMP neac_value matches 2048.. run scoreboard players remove #MarkerMotion.TMP neac_value 2048 | ||
execute if score #MarkerMotion.TMP neac_value matches 1024.. positioned as @s run tp @s ^ ^ ^10.24 | ||
execute if score #MarkerMotion.TMP neac_value matches 1024.. run scoreboard players remove #MarkerMotion.TMP neac_value 1024 | ||
execute if score #MarkerMotion.TMP neac_value matches 512.. positioned as @s run tp @s ^ ^ ^5.12 | ||
execute if score #MarkerMotion.TMP neac_value matches 512.. run scoreboard players remove #MarkerMotion.TMP neac_value 512 | ||
execute if score #MarkerMotion.TMP neac_value matches 256.. positioned as @s run tp @s ^ ^ ^2.56 | ||
execute if score #MarkerMotion.TMP neac_value matches 256.. run scoreboard players remove #MarkerMotion.TMP neac_value 256 | ||
execute if score #MarkerMotion.TMP neac_value matches 128.. positioned as @s run tp @s ^ ^ ^1.28 | ||
execute if score #MarkerMotion.TMP neac_value matches 128.. run scoreboard players remove #MarkerMotion.TMP neac_value 128 | ||
execute if score #MarkerMotion.TMP neac_value matches 64.. positioned as @s run tp @s ^ ^ ^0.64 | ||
execute if score #MarkerMotion.TMP neac_value matches 64.. run scoreboard players remove #MarkerMotion.TMP neac_value 64 | ||
execute if score #MarkerMotion.TMP neac_value matches 32.. positioned as @s run tp @s ^ ^ ^0.32 | ||
execute if score #MarkerMotion.TMP neac_value matches 32.. run scoreboard players remove #MarkerMotion.TMP neac_value 32 | ||
execute if score #MarkerMotion.TMP neac_value matches 16.. positioned as @s run tp @s ^ ^ ^0.16 | ||
execute if score #MarkerMotion.TMP neac_value matches 16.. run scoreboard players remove #MarkerMotion.TMP neac_value 16 | ||
execute if score #MarkerMotion.TMP neac_value matches 8.. positioned as @s run tp @s ^ ^ ^0.08 | ||
execute if score #MarkerMotion.TMP neac_value matches 8.. run scoreboard players remove #MarkerMotion.TMP neac_value 8 | ||
execute if score #MarkerMotion.TMP neac_value matches 4.. positioned as @s run tp @s ^ ^ ^0.04 | ||
execute if score #MarkerMotion.TMP neac_value matches 4.. run scoreboard players remove #MarkerMotion.TMP neac_value 4 | ||
execute if score #MarkerMotion.TMP neac_value matches 2.. positioned as @s run tp @s ^ ^ ^0.02 | ||
execute if score #MarkerMotion.TMP neac_value matches 2.. run scoreboard players remove #MarkerMotion.TMP neac_value 2 | ||
execute if score #MarkerMotion.TMP neac_value matches 1.. positioned as @s run tp @s ^ ^ ^0.01 | ||
execute if score #MarkerMotion.TMP neac_value matches 1.. run scoreboard players remove #MarkerMotion.TMP neac_value 1 | ||
|
||
# ifに引っかからない対策で少しだけ後ろに移動しておく | ||
execute positioned as @s run tp @s ^ ^ ^-0.0000152587890625 | ||
|
||
# 到達目標位置が近くてspeedが0以下であれば停止 | ||
execute if entity @e[type=#marker_motion:selector,tag=MarkerMotion.this,distance=..0.0078125,limit=1] if score #MarkerMotion.Speed neac_value matches ..0 run tag @s add MarkerMotion.speed.0 | ||
# GravitySumが0でなければ移動後のY座標から重力分を引いた座標に移動する | ||
execute unless score #MarkerMotion.GravitySum neac_value matches 0 store result score #MarkerMotion.TMP neac_value run data get entity @s Pos[1] 1000000 | ||
execute unless score #MarkerMotion.GravitySum neac_value matches 0 store result entity @s Pos[1] double 0.000001 run scoreboard players operation #MarkerMotion.TMP neac_value -= #MarkerMotion.GravitySum neac_value | ||
|
||
# 最大ループ回数指定 | ||
scoreboard players set #MarkerMotion.loop neac_value 41 | ||
# 到達目標位置が近くになければそこまでの間のブロックをループでチェック | ||
execute unless entity @e[type=#marker_motion:selector,tag=MarkerMotion.this,distance=..0.0078125,limit=1] positioned ^ ^ ^0.5 run function marker_motion:tp/1 | ||
# スコアリセット | ||
scoreboard players reset #MarkerMotion.loop | ||
scoreboard players reset #MarkerMotion.TMP | ||
|
||
|
||
# 自身の方向を見てチェックしていく | ||
execute facing entity @s feet run function marker_motion:tp/0 | ||
|
||
|
||
# kill | ||
kill @s |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#> marker_motion:tp/0 | ||
# | ||
# 移動先目標までの間にブロックがあるか探す処理 | ||
# その際にヒットボックスでのヒットを行ったりできる | ||
# | ||
# @within | ||
# function marker_motion:main | ||
|
||
|
||
# プレイヤーの視線をx軸で反転させた角度 | ||
execute positioned 0.0 0.0 0.0 positioned ^ ^ ^2 positioned 0.0 ~ ~ positioned ^ ^ ^-1 facing 0.0 0.0 0.0 positioned as @s run tp @s ~ ~ ~ ~ ~ | ||
|
||
# 初期化 | ||
data modify storage neac: _.tp set value [[{success:0b}],[{success:0b}],[{success:0b}],[{success:0b}],[{success:0b}],[{success:0b}],[{success:0b}],[{success:0b}]] | ||
|
||
# 到達目標位置が近くてspeedが0以下であれば停止 | ||
execute if entity @s[distance=..0.0078125] if score #MarkerMotion.Speed neac_value matches ..0 run tag @e[type=marker,tag=MarkerMotion.me,limit=1] add MarkerMotion.speed.0 | ||
|
||
# 最大ループ回数指定 | ||
scoreboard players set #MarkerMotion.loop neac_value 41 | ||
# 到達目標位置が近くになければそこまでの間のブロックをループでチェック | ||
execute unless entity @s[distance=..0.0078125] positioned ^ ^ ^0.5 run function marker_motion:tp/1 | ||
# スコアリセット | ||
scoreboard players reset #MarkerMotion.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
Oops, something went wrong.