-
-
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.
- **Added more factors for applied motion** Body parts will now take the following factors for their motion/momentum into account: - Motion from the dead mob [!NEW in this commit] - Motion from the killer entity [!NEW in this commit] - Motion from the new swing momentum entity [Players only] [!NEW in this commit] - Custom motion parameters depending on the situation - Added different blood particles for parts inside water - Added turtle to supported mobs - Fixed broken inherited rotation - Beautified loot tables - Renamed y_lag function to troubleshoot
- Loading branch information
1 parent
3b1ba9e
commit 46bcae1
Showing
48 changed files
with
1,227 additions
and
1,056 deletions.
There are no files selected for viewing
File renamed without changes.
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
21 changes: 2 additions & 19 deletions
21
data/deathanimations/functions/general/particle.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
22 changes: 22 additions & 0 deletions
22
data/deathanimations/functions/general/particle/land.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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
##by Tschipcraft | ||
# Displays particles for the given visual entity (~ ~ ~/~ ~/@s = visual entity) on land | ||
|
||
execute as @s[tag=torso,tag=bloody] positioned ^ ^ ^ run particle minecraft:block redstone_block ~ ~1.5 ~ 0.1 0 0.1 1 1 normal @a[scores={blood_local=1}] | ||
execute as @s[tag=head,tag=bloody] positioned ^ ^0.35 ^ run particle minecraft:block redstone_block ~ ~1.1 ~ 0.01 0 0.01 1 1 normal @a[scores={blood_local=1}] | ||
execute as @s[tag=leg,tag=bloody] positioned ^0.25 ^ ^ run particle minecraft:block redstone_block ~ ~1.5 ~ 0.01 0 0.01 1 1 normal @a[scores={blood_local=1}] | ||
execute as @s[tag=arm,tag=bloody] positioned ^0.25 ^ ^ run particle minecraft:block redstone_block ~ ~1.5 ~ 0.01 0 0.01 1 1 normal @a[scores={blood_local=1}] | ||
|
||
execute as @s[tag=torso,tag=custom_bloody] positioned ^ ^ ^ run particle minecraft:item slime_ball ~ ~1.5 ~ 0.1 0 0.1 0.1 1 normal @a[scores={blood_local=1}] | ||
execute as @s[tag=head,tag=custom_bloody] positioned ^ ^0.35 ^ run particle minecraft:item slime_ball ~ ~1.1 ~ 0.01 0 0.01 0.1 1 normal @a[scores={blood_local=1}] | ||
execute as @s[tag=leg,tag=custom_bloody] positioned ^0.25 ^ ^ run particle minecraft:item slime_ball ~ ~1.5 ~ 0.01 0 0.01 0.1 1 normal @a[scores={blood_local=1}] | ||
execute as @s[tag=arm,tag=custom_bloody] positioned ^0.25 ^ ^ run particle minecraft:item slime_ball ~ ~1.5 ~ 0.01 0 0.01 0.1 1 normal @a[scores={blood_local=1}] | ||
|
||
execute as @s[tag=torso,tag=sandy] positioned ^ ^ ^ run particle minecraft:block sand ~ ~1.5 ~ 0.1 0 0.1 1 1 normal | ||
execute as @s[tag=head,tag=sandy] positioned ^ ^0.35 ^ run particle minecraft:block sand ~ ~1.1 ~ 0.01 0 0.01 1 1 normal | ||
execute as @s[tag=leg,tag=sandy] positioned ^0.25 ^ ^ run particle minecraft:block sand ~ ~1.5 ~ 0.01 0 0.01 1 1 normal | ||
execute as @s[tag=arm,tag=visual,tag=sandy] positioned ^0.25 ^ ^ run particle minecraft:block sand ~ ~1.5 ~ 0.01 0 0.01 1 1 normal | ||
|
||
execute as @s[tag=torso,tag=watery] positioned ^ ^ ^ run particle minecraft:splash ~ ~1.5 ~ 0.1 0 0.1 1 1 normal | ||
execute as @s[tag=head,tag=watery] positioned ^ ^0.35 ^ run particle minecraft:splash ~ ~1.1 ~ 0.01 0 0.01 1 1 normal | ||
execute as @s[tag=leg,tag=watery] positioned ^0.25 ^ ^ run particle minecraft:splash ~ ~1.5 ~ 0.01 0 0.01 1 1 normal | ||
execute as @s[tag=arm,tag=watery] positioned ^0.25 ^ ^ run particle minecraft:splash ~ ~1.5 ~ 0.01 0 0.01 1 1 normal |
22 changes: 22 additions & 0 deletions
22
data/deathanimations/functions/general/particle/water.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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
##by Tschipcraft | ||
# Displays particles for the given visual entity (~ ~ ~/~ ~/@s = visual entity) inside water | ||
|
||
execute as @s[tag=torso,tag=bloody] positioned ^ ^ ^ run particle minecraft:dust 1 0.1 0 3 ~ ~1.5 ~ 0.1 0 0.1 1 1 normal @a[scores={blood_local=1}] | ||
execute as @s[tag=head,tag=bloody] positioned ^ ^0.35 ^ run particle minecraft:dust 1 0.1 0 3 ~ ~1.1 ~ 0.01 0 0.01 1 1 normal @a[scores={blood_local=1}] | ||
execute as @s[tag=leg,tag=bloody] positioned ^0.25 ^ ^ run particle minecraft:dust 1 0.1 0 3 ~ ~1.5 ~ 0.01 0 0.01 1 1 normal @a[scores={blood_local=1}] | ||
execute as @s[tag=arm,tag=bloody] positioned ^0.25 ^ ^ run particle minecraft:dust 1 0.1 0 3 ~ ~1.5 ~ 0.01 0 0.01 1 1 normal @a[scores={blood_local=1}] | ||
|
||
execute as @s[tag=torso,tag=custom_bloody] positioned ^ ^ ^ run particle minecraft:dust 0.082 0.706 0 2 ~ ~1.5 ~ 0.1 0 0.1 0.1 1 normal @a[scores={blood_local=1}] | ||
execute as @s[tag=head,tag=custom_bloody] positioned ^ ^0.35 ^ run particle minecraft:dust 0.082 0.706 0 2 ~ ~1.1 ~ 0.01 0 0.01 0.1 1 normal @a[scores={blood_local=1}] | ||
execute as @s[tag=leg,tag=custom_bloody] positioned ^0.25 ^ ^ run particle minecraft:dust 0.082 0.706 0 2 ~ ~1.5 ~ 0.01 0 0.01 0.1 1 normal @a[scores={blood_local=1}] | ||
execute as @s[tag=arm,tag=custom_bloody] positioned ^0.25 ^ ^ run particle minecraft:dust 0.082 0.706 0 2 ~ ~1.5 ~ 0.01 0 0.01 0.1 1 normal @a[scores={blood_local=1}] | ||
|
||
execute as @s[tag=torso,tag=sandy] positioned ^ ^ ^ run particle minecraft:dust 0.8 0.75 0.58 2 ~ ~1.5 ~ 0.1 0 0.1 1 1 normal | ||
execute as @s[tag=head,tag=sandy] positioned ^ ^0.35 ^ run particle minecraft:dust 0.8 0.75 0.58 2 ~ ~1.1 ~ 0.01 0 0.01 1 1 normal | ||
execute as @s[tag=leg,tag=sandy] positioned ^0.25 ^ ^ run particle minecraft:dust 0.8 0.75 0.58 2 ~ ~1.5 ~ 0.01 0 0.01 1 1 normal | ||
execute as @s[tag=arm,tag=visual,tag=sandy] positioned ^0.25 ^ ^ run particle minecraft:dust 0.8 0.75 0.58 2 ~ ~1.5 ~ 0.01 0 0.01 1 1 normal | ||
|
||
execute as @s[tag=torso,tag=watery] positioned ^ ^ ^ run particle minecraft:bubble ~ ~1.5 ~ 0.1 0 0.1 1 0 normal | ||
execute as @s[tag=head,tag=watery] positioned ^ ^0.35 ^ run particle minecraft:bubble ~ ~1.1 ~ 0.01 0 0.01 1 0 normal | ||
execute as @s[tag=leg,tag=watery] positioned ^0.25 ^ ^ run particle minecraft:bubble ~ ~1.5 ~ 0.01 0 0.01 1 0 normal | ||
execute as @s[tag=arm,tag=watery] positioned ^0.25 ^ ^ run particle minecraft:bubble ~ ~1.5 ~ 0.01 0 0.01 1 0 normal |
28 changes: 28 additions & 0 deletions
28
data/deathanimations/functions/general/player_swing/adjust_pos.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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
##by Tschipcraft | ||
# Calculates player swing motion | ||
|
||
execute at @a[tag=this] rotated as @a[tag=this] positioned ~ ~1.6 ~ run tp @s ^ ^ ^1 | ||
|
||
# Calculates player swing motion | ||
scoreboard players set -1 x -1 | ||
|
||
scoreboard players operation @s dx = @s x | ||
execute store result score @s x run data get entity @s Pos[0] 71 | ||
scoreboard players operation @s dx -= @s x | ||
scoreboard players operation @s dx *= -1 x | ||
|
||
scoreboard players operation @s dy = @s y | ||
execute store result score @s y run data get entity @s Pos[1] 71 | ||
scoreboard players operation @s dy -= @s y | ||
scoreboard players operation @s dy *= -1 x | ||
|
||
scoreboard players operation @s dz = @s z | ||
execute store result score @s z run data get entity @s Pos[2] 71 | ||
scoreboard players operation @s dz -= @s z | ||
scoreboard players operation @s dz *= -1 x | ||
|
||
# Remove tag (operation successful) | ||
tag @a[tag=this] remove this | ||
|
||
# Debug | ||
#tellraw @a [{"text":"X: "},{"score":{"name":"@s","objective":"dx"}},{"text":", Y: "},{"score":{"name":"@s","objective":"dy"}},{"text":", Z: "},{"score":{"name":"@s","objective":"dz"}}] |
10 changes: 10 additions & 0 deletions
10
data/deathanimations/functions/general/player_swing/core.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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
##by Tschipcraft | ||
|
||
# New player | ||
scoreboard players add @a[gamemode=!spectator] da_sid 0 | ||
execute as @a[scores={da_sid=0},limit=1] at @s run function deathanimations:general/player_swing/new_player | ||
|
||
execute as @a[gamemode=!spectator,scores={da_sid=1..}] at @s run function deathanimations:general/player_swing/search | ||
|
||
# Reset (put in loop) | ||
execute as @e[type=minecraft:marker,tag=da_player_swing] at @s positioned ~ ~-1.6 ~ unless entity @a[distance=..10] run kill @s |
8 changes: 8 additions & 0 deletions
8
data/deathanimations/functions/general/player_swing/new_player.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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
##by Tschipcraft | ||
# Adds a new swing motion detector for a new player | ||
|
||
summon marker ~ ~ ~ {Silent:1b,Invulnerable:1b,Tags:[da_player_swing],CustomName:'{"text":"Player Swing Detector"}'} | ||
|
||
scoreboard players add .player da_sid 1 | ||
scoreboard players operation @e[type=minecraft:marker,tag=da_player_swing,limit=1,sort=arbitrary] da_sid = .player da_sid | ||
scoreboard players operation @s da_sid = .player da_sid |
9 changes: 9 additions & 0 deletions
9
data/deathanimations/functions/general/player_swing/search.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
##by Tschipcraft | ||
# Searches up player swing counterpart entity from player | ||
|
||
scoreboard players operation .search da_sid = @s da_sid | ||
tag @s add this | ||
execute as @e[type=minecraft:marker,tag=da_player_swing,predicate=deathanimations:search] at @s rotated as @s run function deathanimations:general/player_swing/adjust_pos | ||
|
||
# Counterpart not found | ||
execute if entity @s[tag=this] run scoreboard players reset @s da_sid |
25 changes: 25 additions & 0 deletions
25
data/deathanimations/functions/general/source/player_swing.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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
##by Tschipcraft | ||
# Add swing momentum | ||
|
||
# Get current motion | ||
execute as @s store result score @s xm run data get entity @s Motion[0] 100 | ||
execute as @s store result score @s ym run data get entity @s Motion[1] 100 | ||
execute as @s store result score @s zm run data get entity @s Motion[2] 100 | ||
|
||
# Apply new motion | ||
execute store result entity @s Motion[0] double 0.02 run scoreboard players get @e[type=minecraft:marker,tag=da_player_swing,limit=1,sort=nearest] dx | ||
execute store result entity @s Motion[1] double 0.02 run scoreboard players get @e[type=minecraft:marker,tag=da_player_swing,limit=1,sort=nearest] dy | ||
execute store result entity @s Motion[2] double 0.02 run scoreboard players get @e[type=minecraft:marker,tag=da_player_swing,limit=1,sort=nearest] dz | ||
|
||
# Add together | ||
execute as @s store result score @s x run data get entity @s Motion[0] 100 | ||
execute as @s store result score @s y run data get entity @s Motion[1] 100 | ||
execute as @s store result score @s z run data get entity @s Motion[2] 100 | ||
|
||
scoreboard players operation @s xm += @s x | ||
scoreboard players operation @s ym += @s y | ||
scoreboard players operation @s zm += @s z | ||
|
||
execute store result entity @s Motion[0] double 0.01 run scoreboard players get @s xm | ||
execute store result entity @s Motion[1] double 0.01 run scoreboard players get @s ym | ||
execute store result entity @s Motion[2] double 0.01 run scoreboard players get @s zm |
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
Oops, something went wrong.