-
Notifications
You must be signed in to change notification settings - Fork 2
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 #5 from K-bai/2.6.2
2.6.2 remaining fixes
- Loading branch information
Showing
39 changed files
with
424 additions
and
303 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
# Create marker | ||
# We use oriented relative coordinates and some math to eassily assing the speed (this case, 0.5 b/t). | ||
# Since it lasts for 10 ticks (Duration), it will travel at max 5 blocks | ||
execute at @s positioned ^ ^ ^.5 run summon area_effect_cloud ~ ~ ~ {Tags:["test_mark","init","mrcd_bullet"],Duration:10} | ||
execute at @s anchored eyes run summon area_effect_cloud ^ ^ ^.5 {Tags:["test_mark","init","mrcd_bullet"],Duration:10} | ||
|
||
# Save speed and direction | ||
execute as @e[tag=init] store result score @s mrcd_x0 run data get entity @s Pos[0] 1000 | ||
execute as @e[tag=init] store result score @s mrcd_y0 run data get entity @s Pos[1] 1000 | ||
execute as @e[tag=init] store result score @s mrcd_z0 run data get entity @s Pos[2] 1000 | ||
execute store result score #var0 mrcd_system run data get entity @s Pos[0] 1000 | ||
execute store result score #var1 mrcd_system run data get entity @s Pos[1] 1000 | ||
execute store result score #var2 mrcd_system run data get entity @s Pos[2] 1000 | ||
execute as @e[tag=init,limit=1] store result score @s mrcd_x0 run data get entity @s Pos[0] 1000 | ||
execute as @e[tag=init,limit=1] store result score @s mrcd_y0 run data get entity @s Pos[1] 1000 | ||
execute as @e[tag=init,limit=1] store result score @s mrcd_z0 run data get entity @s Pos[2] 1000 | ||
|
||
# Rotate to the moving direction and placed it to player eyes | ||
execute at @s anchored eyes run tp @e[tag=init,limit=1] ^ ^ ^ ~ ~ | ||
|
||
execute store result score #var0 mrcd_system run data get entity @e[tag=init,limit=1] Pos[0] 1000 | ||
execute store result score #var1 mrcd_system run data get entity @e[tag=init,limit=1] Pos[1] 1000 | ||
execute store result score #var2 mrcd_system run data get entity @e[tag=init,limit=1] Pos[2] 1000 | ||
scoreboard players operation @e[tag=init,limit=1] mrcd_x0 -= #var0 mrcd_system | ||
scoreboard players operation @e[tag=init,limit=1] mrcd_y0 -= #var1 mrcd_system | ||
scoreboard players operation @e[tag=init,limit=1] mrcd_z0 -= #var2 mrcd_system | ||
|
||
# Rotate to the moving direction and placed it to player eyes | ||
execute at @s anchored eyes positioned ^ ^ ^ run tp @e[tag=init,limit=1] ~ ~ ~ ~ ~ | ||
|
||
# Clear tag | ||
tag @e[tag=init] remove init |
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,21 +1,21 @@ | ||
# Create marker | ||
# We use oriented relative coordinates and some math to eassily assing the speed (this case, 0.5 b/t). | ||
# Since it lasts for 10 ticks (Duration), it will travel at max 5 blocks | ||
execute at @s positioned ^ ^ ^.5 run summon area_effect_cloud ~ ~ ~ {Tags:["test_mark","init","mrcd_bullet","mrcd_entity"],Duration:10} | ||
execute at @s anchored eyes run summon area_effect_cloud ^ ^ ^.5 {Tags:["test_mark","init","mrcd_bullet","mrcd_entity"],Duration:10} | ||
|
||
# Save speed and direction | ||
execute as @e[tag=init] store result score @s mrcd_x0 run data get entity @s Pos[0] 1000 | ||
execute as @e[tag=init] store result score @s mrcd_y0 run data get entity @s Pos[1] 1000 | ||
execute as @e[tag=init] store result score @s mrcd_z0 run data get entity @s Pos[2] 1000 | ||
execute store result score #var0 mrcd_system run data get entity @s Pos[0] 1000 | ||
execute store result score #var1 mrcd_system run data get entity @s Pos[1] 1000 | ||
execute store result score #var2 mrcd_system run data get entity @s Pos[2] 1000 | ||
scoreboard players operation @e[tag=init,limit=1] mrcd_x0 -= #var0 mrcd_system | ||
scoreboard players operation @e[tag=init,limit=1] mrcd_y0 -= #var1 mrcd_system | ||
scoreboard players operation @e[tag=init,limit=1] mrcd_z0 -= #var2 mrcd_system | ||
execute as @e[tag=init,limit=1] store result score @s mrcd_x0 run data get entity @s Pos[0] 1000 | ||
execute as @e[tag=init,limit=1] store result score @s mrcd_y0 run data get entity @s Pos[1] 1000 | ||
execute as @e[tag=init,limit=1] store result score @s mrcd_z0 run data get entity @s Pos[2] 1000 | ||
|
||
# Rotate to the moving direction and placed it to player eyes | ||
execute at @s anchored eyes positioned ^ ^ ^ run tp @e[tag=init,limit=1] ~ ~ ~ ~ ~ | ||
execute at @s anchored eyes run tp @e[tag=init,limit=1] ^ ^ ^ ~ ~ | ||
|
||
execute store result score #var0 mrcd_system run data get entity @e[tag=init,limit=1] Pos[0] 1000 | ||
execute store result score #var1 mrcd_system run data get entity @e[tag=init,limit=1] Pos[1] 1000 | ||
execute store result score #var2 mrcd_system run data get entity @e[tag=init,limit=1] Pos[2] 1000 | ||
scoreboard players operation @e[tag=init,limit=1] mrcd_x0 -= #var0 mrcd_system | ||
scoreboard players operation @e[tag=init,limit=1] mrcd_y0 -= #var1 mrcd_system | ||
scoreboard players operation @e[tag=init,limit=1] mrcd_z0 -= #var2 mrcd_system | ||
# Clear tag | ||
tag @e[tag=init] remove init |
24 changes: 13 additions & 11 deletions
24
data/mrcd/functions/example/bullet_and_entity_instant.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,21 +1,23 @@ | ||
# Create marker | ||
# We use oriented relative coordinates and some math to eassily assing the speed (this case, 10 b/t). | ||
# We use oriented relative coordinates and some math to eassily assing the speed (this case, 5 b/t). | ||
# Since we what it instant, we wont set a Duration | ||
execute at @s positioned ^ ^ ^10 run summon area_effect_cloud ~ ~ ~ {Tags:["test_mark","init","mrcd_bullet","mrcd_entity","instnat"]} | ||
execute at @s anchored eyes run summon area_effect_cloud ^ ^ ^5 {Tags:["test_mark","init","mrcd_bullet","mrcd_entity","instnat"]} | ||
|
||
# Save speed and direction | ||
execute as @e[tag=init] store result score @s mrcd_x0 run data get entity @s Pos[0] 1000 | ||
execute as @e[tag=init] store result score @s mrcd_y0 run data get entity @s Pos[1] 1000 | ||
execute as @e[tag=init] store result score @s mrcd_z0 run data get entity @s Pos[2] 1000 | ||
execute store result score #var0 mrcd_system run data get entity @s Pos[0] 1000 | ||
execute store result score #var1 mrcd_system run data get entity @s Pos[1] 1000 | ||
execute store result score #var2 mrcd_system run data get entity @s Pos[2] 1000 | ||
execute as @e[tag=init,limit=1] store result score @s mrcd_x0 run data get entity @s Pos[0] 1000 | ||
execute as @e[tag=init,limit=1] store result score @s mrcd_y0 run data get entity @s Pos[1] 1000 | ||
execute as @e[tag=init,limit=1] store result score @s mrcd_z0 run data get entity @s Pos[2] 1000 | ||
|
||
# Rotate to the moving direction and placed it to player eyes | ||
execute at @s anchored eyes run tp @e[tag=init,limit=1] ^ ^ ^ ~ ~ | ||
|
||
execute store result score #var0 mrcd_system run data get entity @e[tag=init,limit=1] Pos[0] 1000 | ||
execute store result score #var1 mrcd_system run data get entity @e[tag=init,limit=1] Pos[1] 1000 | ||
execute store result score #var2 mrcd_system run data get entity @e[tag=init,limit=1] Pos[2] 1000 | ||
scoreboard players operation @e[tag=init,limit=1] mrcd_x0 -= #var0 mrcd_system | ||
scoreboard players operation @e[tag=init,limit=1] mrcd_y0 -= #var1 mrcd_system | ||
scoreboard players operation @e[tag=init,limit=1] mrcd_z0 -= #var2 mrcd_system | ||
|
||
# Rotate to the moving direction and placed it to player eyes | ||
execute at @s anchored eyes positioned ^ ^ ^ run tp @e[tag=init,limit=1] ~ ~ ~ ~ ~ | ||
|
||
# Clear tag | ||
tag @e[tag=init] remove init | ||
tag @e[tag=init] remove init |
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,21 +1,22 @@ | ||
# Create marker | ||
# We use oriented relative coordinates and some math to eassily assing the speed (this case, 0.5 b/t). | ||
# Since it lasts for 10 ticks (Duration), it will travel at max 5 blocks | ||
execute at @s positioned ^ ^ ^.5 run summon area_effect_cloud ~ ~ ~ {Tags:["test_mark","init","mrcd_entity","mrcd_entity_bullet"],Duration:10} | ||
execute at @s anchored eyes run summon area_effect_cloud ^ ^ ^.5 {Tags:["test_mark","init","mrcd_entity","mrcd_entity_bullet"],Duration:10} | ||
|
||
# Save speed and direction | ||
execute as @e[tag=init] store result score @s mrcd_x0 run data get entity @s Pos[0] 1000 | ||
execute as @e[tag=init] store result score @s mrcd_y0 run data get entity @s Pos[1] 1000 | ||
execute as @e[tag=init] store result score @s mrcd_z0 run data get entity @s Pos[2] 1000 | ||
execute store result score #var0 mrcd_system run data get entity @s Pos[0] 1000 | ||
execute store result score #var1 mrcd_system run data get entity @s Pos[1] 1000 | ||
execute store result score #var2 mrcd_system run data get entity @s Pos[2] 1000 | ||
execute as @e[tag=init,limit=1] store result score @s mrcd_x0 run data get entity @s Pos[0] 1000 | ||
execute as @e[tag=init,limit=1] store result score @s mrcd_y0 run data get entity @s Pos[1] 1000 | ||
execute as @e[tag=init,limit=1] store result score @s mrcd_z0 run data get entity @s Pos[2] 1000 | ||
|
||
# Rotate to the moving direction and placed it to player eyes | ||
execute at @s anchored eyes run tp @e[tag=init,limit=1] ^ ^ ^ ~ ~ | ||
|
||
execute store result score #var0 mrcd_system run data get entity @e[tag=init,limit=1] Pos[0] 1000 | ||
execute store result score #var1 mrcd_system run data get entity @e[tag=init,limit=1] Pos[1] 1000 | ||
execute store result score #var2 mrcd_system run data get entity @e[tag=init,limit=1] Pos[2] 1000 | ||
scoreboard players operation @e[tag=init,limit=1] mrcd_x0 -= #var0 mrcd_system | ||
scoreboard players operation @e[tag=init,limit=1] mrcd_y0 -= #var1 mrcd_system | ||
scoreboard players operation @e[tag=init,limit=1] mrcd_z0 -= #var2 mrcd_system | ||
|
||
# Rotate to the moving direction and placed it to player eyes | ||
execute at @s anchored eyes positioned ^ ^ ^ run tp @e[tag=init,limit=1] ~ ~ ~ ~ ~ | ||
|
||
# Clear tag | ||
tag @e[tag=init] remove init |
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,21 +1,21 @@ | ||
# Create marker | ||
# We use oriented relative coordinates and some math to eassily assing the speed (this case, 0.5 b/t). | ||
# Since it lasts for 10 ticks (Duration), it will travel at max 5 blocks | ||
execute at @s positioned ^ ^ ^.5 run summon area_effect_cloud ~ ~ ~ {Tags:["test_mark","init","mrcd_entity"],Duration:10} | ||
execute at @s anchored eyes run summon area_effect_cloud ^ ^ ^.5 {Tags:["test_mark","init","mrcd_entity"],Duration:10} | ||
|
||
# Save speed and direction | ||
execute as @e[tag=init] store result score @s mrcd_x0 run data get entity @s Pos[0] 1000 | ||
execute as @e[tag=init] store result score @s mrcd_y0 run data get entity @s Pos[1] 1000 | ||
execute as @e[tag=init] store result score @s mrcd_z0 run data get entity @s Pos[2] 1000 | ||
execute store result score #var0 mrcd_system run data get entity @s Pos[0] 1000 | ||
execute store result score #var1 mrcd_system run data get entity @s Pos[1] 1000 | ||
execute store result score #var2 mrcd_system run data get entity @s Pos[2] 1000 | ||
scoreboard players operation @e[tag=init,limit=1] mrcd_x0 -= #var0 mrcd_system | ||
scoreboard players operation @e[tag=init,limit=1] mrcd_y0 -= #var1 mrcd_system | ||
scoreboard players operation @e[tag=init,limit=1] mrcd_z0 -= #var2 mrcd_system | ||
execute as @e[tag=init,limit=1] store result score @s mrcd_x0 run data get entity @s Pos[0] 1000 | ||
execute as @e[tag=init,limit=1] store result score @s mrcd_y0 run data get entity @s Pos[1] 1000 | ||
execute as @e[tag=init,limit=1] store result score @s mrcd_z0 run data get entity @s Pos[2] 1000 | ||
|
||
# Rotate to the moving direction and placed it to player eyes | ||
execute at @s anchored eyes positioned ^ ^ ^ run tp @e[tag=init,limit=1] ~ ~ ~ ~ ~ | ||
execute at @s anchored eyes run tp @e[tag=init,limit=1] ^ ^ ^ ~ ~ | ||
|
||
execute store result score #var0 mrcd_system run data get entity @e[tag=init,limit=1] Pos[0] 1000 | ||
execute store result score #var1 mrcd_system run data get entity @e[tag=init,limit=1] Pos[1] 1000 | ||
execute store result score #var2 mrcd_system run data get entity @e[tag=init,limit=1] Pos[2] 1000 | ||
scoreboard players operation @e[tag=init,limit=1] mrcd_x0 -= #var0 mrcd_system | ||
scoreboard players operation @e[tag=init,limit=1] mrcd_y0 -= #var1 mrcd_system | ||
scoreboard players operation @e[tag=init,limit=1] mrcd_z0 -= #var2 mrcd_system | ||
# Clear tag | ||
tag @e[tag=init] remove init |
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,21 +1,22 @@ | ||
# Create marker | ||
# We use oriented relative coordinates and some math to eassily assing the speed (this case, 0.5 b/t). | ||
# Since it lasts for 10 ticks (Duration), it will travel at max 5 blocks | ||
execute at @s positioned ^ ^ ^.5 run summon area_effect_cloud ~ ~ ~ {Tags:["test_mark","init","mrcd_entity_targeted"],Duration:10} | ||
execute at @s anchored eyes run summon area_effect_cloud ^ ^ ^.5 {Tags:["test_mark","init","mrcd_entity_targeted"],Duration:10} | ||
|
||
# Save speed and direction | ||
execute as @e[tag=init] store result score @s mrcd_x0 run data get entity @s Pos[0] 1000 | ||
execute as @e[tag=init] store result score @s mrcd_y0 run data get entity @s Pos[1] 1000 | ||
execute as @e[tag=init] store result score @s mrcd_z0 run data get entity @s Pos[2] 1000 | ||
execute store result score #var0 mrcd_system run data get entity @s Pos[0] 1000 | ||
execute store result score #var1 mrcd_system run data get entity @s Pos[1] 1000 | ||
execute store result score #var2 mrcd_system run data get entity @s Pos[2] 1000 | ||
execute as @e[tag=init,limit=1] store result score @s mrcd_x0 run data get entity @s Pos[0] 1000 | ||
execute as @e[tag=init,limit=1] store result score @s mrcd_y0 run data get entity @s Pos[1] 1000 | ||
execute as @e[tag=init,limit=1] store result score @s mrcd_z0 run data get entity @s Pos[2] 1000 | ||
|
||
# Rotate to the moving direction and placed it to player eyes | ||
execute at @s anchored eyes run tp @e[tag=init,limit=1] ^ ^ ^ ~ ~ | ||
|
||
execute store result score #var0 mrcd_system run data get entity @e[tag=init,limit=1] Pos[0] 1000 | ||
execute store result score #var1 mrcd_system run data get entity @e[tag=init,limit=1] Pos[1] 1000 | ||
execute store result score #var2 mrcd_system run data get entity @e[tag=init,limit=1] Pos[2] 1000 | ||
scoreboard players operation @e[tag=init,limit=1] mrcd_x0 -= #var0 mrcd_system | ||
scoreboard players operation @e[tag=init,limit=1] mrcd_y0 -= #var1 mrcd_system | ||
scoreboard players operation @e[tag=init,limit=1] mrcd_z0 -= #var2 mrcd_system | ||
|
||
# Rotate to the moving direction and placed it to player eyes | ||
execute at @s anchored eyes positioned ^ ^ ^ run tp @e[tag=init,limit=1] ~ ~ ~ ~ ~ | ||
|
||
# Clear tag | ||
tag @e[tag=init] remove init |
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,21 +1,22 @@ | ||
# Create marker | ||
# We use oriented relative coordinates and some math to eassily assing the speed (this case, 0.5 b/t). | ||
# Since it lasts for 10 ticks (Duration), it will travel at max 5 blocks | ||
execute at @s positioned ^ ^ ^.5 run summon area_effect_cloud ~ ~ ~ {Tags:["test_mark","init"],Duration:10} | ||
execute at @s anchored eyes run summon area_effect_cloud ^ ^ ^.5 {Tags:["test_mark","init"],Duration:10} | ||
|
||
# Save speed and direction | ||
execute as @e[tag=init] store result score @s mrcd_x0 run data get entity @s Pos[0] 1000 | ||
execute as @e[tag=init] store result score @s mrcd_y0 run data get entity @s Pos[1] 1000 | ||
execute as @e[tag=init] store result score @s mrcd_z0 run data get entity @s Pos[2] 1000 | ||
execute store result score #var0 mrcd_system run data get entity @s Pos[0] 1000 | ||
execute store result score #var1 mrcd_system run data get entity @s Pos[1] 1000 | ||
execute store result score #var2 mrcd_system run data get entity @s Pos[2] 1000 | ||
execute as @e[tag=init,limit=1] store result score @s mrcd_x0 run data get entity @s Pos[0] 1000 | ||
execute as @e[tag=init,limit=1] store result score @s mrcd_y0 run data get entity @s Pos[1] 1000 | ||
execute as @e[tag=init,limit=1] store result score @s mrcd_z0 run data get entity @s Pos[2] 1000 | ||
|
||
# Rotate to the moving direction and placed it to player eyes | ||
execute at @s anchored eyes run tp @e[tag=init,limit=1] ^ ^ ^ ~ ~ | ||
|
||
execute store result score #var0 mrcd_system run data get entity @e[tag=init,limit=1] Pos[0] 1000 | ||
execute store result score #var1 mrcd_system run data get entity @e[tag=init,limit=1] Pos[1] 1000 | ||
execute store result score #var2 mrcd_system run data get entity @e[tag=init,limit=1] Pos[2] 1000 | ||
scoreboard players operation @e[tag=init,limit=1] mrcd_x0 -= #var0 mrcd_system | ||
scoreboard players operation @e[tag=init,limit=1] mrcd_y0 -= #var1 mrcd_system | ||
scoreboard players operation @e[tag=init,limit=1] mrcd_z0 -= #var2 mrcd_system | ||
|
||
# Rotate to the moving direction and placed it to player eyes | ||
execute at @s anchored eyes positioned ^ ^ ^ run tp @e[tag=init,limit=1] ~ ~ ~ ~ ~ | ||
|
||
# Clear tag | ||
tag @e[tag=init] remove init |
Oops, something went wrong.