From 8fbbfb4492fcc40c9cd2f66ac0314076cb65c71d Mon Sep 17 00:00:00 2001 From: Tschipcraft <78470530+Tschipcraft@users.noreply.github.com> Date: Tue, 26 Aug 2025 00:46:48 +0200 Subject: [PATCH 1/3] Increase entity batch limits Raised entity processing limits in main and activation batch functions to resolve mob farm complications --- CHANGES.md | 13 +------------ .../internal/run_activation_batch.mcfunction | 4 ++-- data/spawnanimations/function/main.mcfunction | 2 +- .../internal/run_activation_batch.mcfunction | 4 ++-- data/spawnanimations/functions/main.mcfunction | 2 +- 5 files changed, 7 insertions(+), 18 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index a99c8fb..238b0cf 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,12 +1 @@ -- **Entities with emissive layers are now properly hidden** 👻 (Endermen, Spiders, and Cave Spiders) (closes [#25](https://github.com/Tschipcraft/spawnanimations/issues/25)) - - For this feature to work in Minecraft 1.20.4 and below, [Pehkui](https://modrinth.com/project/t5W7Jfwy) must be installed. Pehkui can still be installed in newer versions for smoother poof animations -- Added config options to enable/disable the poof animation ([#40](https://github.com/Tschipcraft/spawnanimations/issues/40)), animation sounds (closes [#39](https://github.com/Tschipcraft/spawnanimations/issues/39)), reducing the number of particles emitted by hidden Endermen, and hiding emissive mob layers ([#25](https://github.com/Tschipcraft/spawnanimations/issues/25)) -- Improved performance by refactoring entity activation distance calculations to bundle and cache position data retrieval calls and by updating batch activation logic. The whole project is now up to 45% faster per tick! -- Modified the attack predicate of the secondary dig-up requirements so that it disregards the Y-distance. This allows mobs to, for example, appear at the bottom of pillars if a player decides to build up during the night -- Added an activation distance recommendation message when using the Vanilla activation mode -- Removed the Hoglin from the dig up animation -- Fixed most compatibility issues with [Hostile Mobs Improve Over Time](https://modrinth.com/project/ku4JD9TH) by adding missing tag recovery logic when preparing an entity for hiding. This should generally improve compatibility with other packs that override entity tags (closes [#26](https://github.com/Tschipcraft/spawnanimations/issues/26)) -- Fixed poof animation playing multiple times when "Play Animation on Unsupported Blocks" is off -- Fixed possibility of hidden falling mobs losing their fall distance NBT when appearing -- Fixed v0 save format not correctly upgrading to v1 in 1.20.5 and 1.20.6 (precisely from 24w11a to 24w20a) -- Changed exclude tag from `exclude` to `ts.sa.exclude` +- Raised entity processing limits to resolve mob farm complications diff --git a/data/spawnanimations/function/internal/run_activation_batch.mcfunction b/data/spawnanimations/function/internal/run_activation_batch.mcfunction index b89ab19..1210c01 100644 --- a/data/spawnanimations/function/internal/run_activation_batch.mcfunction +++ b/data/spawnanimations/function/internal/run_activation_batch.mcfunction @@ -7,5 +7,5 @@ execute store result score $global ts.sa.y run data get storage spawnanimations: execute store result score $global ts.sa.z run data get storage spawnanimations:temp Pos[2] # Activate entities -execute if score $activation_dist ts.sa.settings matches 25..100 as @e[type=!#spawnanimations:exclude,tag=ts.sa.to_verify,distance=..100,limit=5,sort=random] at @s run function spawnanimations:internal/calc_activation -execute if score $activation_dist ts.sa.settings matches 1..24 as @e[type=!#spawnanimations:exclude,tag=ts.sa.to_verify,distance=..25,limit=1,sort=random] at @s run function spawnanimations:internal/calc_activation +execute if score $activation_dist ts.sa.settings matches 25..100 as @e[type=!#spawnanimations:exclude,tag=ts.sa.to_verify,distance=..100,limit=10,sort=random] at @s run function spawnanimations:internal/calc_activation +execute if score $activation_dist ts.sa.settings matches 1..24 as @e[type=!#spawnanimations:exclude,tag=ts.sa.to_verify,distance=..25,limit=5,sort=random] at @s run function spawnanimations:internal/calc_activation diff --git a/data/spawnanimations/function/main.mcfunction b/data/spawnanimations/function/main.mcfunction index 48033f7..5ade143 100644 --- a/data/spawnanimations/function/main.mcfunction +++ b/data/spawnanimations/function/main.mcfunction @@ -1,7 +1,7 @@ ## by Tschipcraft ## Finish hiding entities -execute as @e[type=!#spawnanimations:exclude,tag=ts.sa.to_hide,limit=5] run function spawnanimations:internal/entity/ehs/hide_exec +execute as @e[type=!#spawnanimations:exclude,tag=ts.sa.to_hide,limit=10] run function spawnanimations:internal/entity/ehs/hide_exec ## Detect new mobs # To edit mobs that are affected, see ../tags/entity_types/dig_up_animation.json diff --git a/data/spawnanimations/functions/internal/run_activation_batch.mcfunction b/data/spawnanimations/functions/internal/run_activation_batch.mcfunction index b89ab19..1210c01 100644 --- a/data/spawnanimations/functions/internal/run_activation_batch.mcfunction +++ b/data/spawnanimations/functions/internal/run_activation_batch.mcfunction @@ -7,5 +7,5 @@ execute store result score $global ts.sa.y run data get storage spawnanimations: execute store result score $global ts.sa.z run data get storage spawnanimations:temp Pos[2] # Activate entities -execute if score $activation_dist ts.sa.settings matches 25..100 as @e[type=!#spawnanimations:exclude,tag=ts.sa.to_verify,distance=..100,limit=5,sort=random] at @s run function spawnanimations:internal/calc_activation -execute if score $activation_dist ts.sa.settings matches 1..24 as @e[type=!#spawnanimations:exclude,tag=ts.sa.to_verify,distance=..25,limit=1,sort=random] at @s run function spawnanimations:internal/calc_activation +execute if score $activation_dist ts.sa.settings matches 25..100 as @e[type=!#spawnanimations:exclude,tag=ts.sa.to_verify,distance=..100,limit=10,sort=random] at @s run function spawnanimations:internal/calc_activation +execute if score $activation_dist ts.sa.settings matches 1..24 as @e[type=!#spawnanimations:exclude,tag=ts.sa.to_verify,distance=..25,limit=5,sort=random] at @s run function spawnanimations:internal/calc_activation diff --git a/data/spawnanimations/functions/main.mcfunction b/data/spawnanimations/functions/main.mcfunction index 7663aa3..0cb37df 100644 --- a/data/spawnanimations/functions/main.mcfunction +++ b/data/spawnanimations/functions/main.mcfunction @@ -1,7 +1,7 @@ ## by Tschipcraft ## Finish hiding entities -execute as @e[type=!#spawnanimations:exclude,tag=ts.sa.to_hide,limit=5] run function spawnanimations:internal/entity/ehs/hide_exec +execute as @e[type=!#spawnanimations:exclude,tag=ts.sa.to_hide,limit=10] run function spawnanimations:internal/entity/ehs/hide_exec ## Detect new mobs # To edit mobs that are affected, see ../tags/entity_types/dig_up_animation.json From 6682c726d3e04fa1f2455de8b8525127f2451cfd Mon Sep 17 00:00:00 2001 From: Tschipcraft <78470530+Tschipcraft@users.noreply.github.com> Date: Mon, 29 Sep 2025 19:46:01 +0200 Subject: [PATCH 2/3] Add support for 1.21.9 - Added support for Minecraft 1.21.9 - Updated to work with the new pack.mcmeta syntax - Bumped pack format and protocol version - Fixed Vanilla activation mode behaving the same way as Classic for activation distances below 25 (closes #46) - Removed mentions of the Hoglin being supported from mod descriptions --- .spyglassrc.json | 2 +- CHANGES.md | 4 +++- META-INF/mods.toml | 2 +- META-INF/neoforge.mods.toml | 2 +- README.md | 2 +- assets/spawnanimations/lang/en_us.json | 6 +++--- .../internal/animation/dig_up/prepare.mcfunction | 10 +++++++--- .../internal/run_activation_batch.mcfunction | 1 + .../internal/version_checker/start.mcfunction | 2 +- .../internal/animation/dig_up/prepare.mcfunction | 10 +++++++--- .../internal/run_activation_batch.mcfunction | 1 + fabric.mod.json | 2 +- pack.mcmeta | 14 +++++++++++++- 13 files changed, 41 insertions(+), 17 deletions(-) diff --git a/.spyglassrc.json b/.spyglassrc.json index bd1b916..2a01d84 100644 --- a/.spyglassrc.json +++ b/.spyglassrc.json @@ -1,6 +1,6 @@ { "env": { - "gameVersion": "1.21.5", + "gameVersion": "1.21.9", "exclude": [] } } diff --git a/CHANGES.md b/CHANGES.md index 238b0cf..77c54c5 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1 +1,3 @@ -- Raised entity processing limits to resolve mob farm complications +- **Added support for Minecraft 1.21.9** 🥉 +- Raised entity processing limits to resolve mob farm complications (Thanks @Fyoncle) +- Fixed Vanilla activation mode behaving the same way as Classic for activation distances below 25 (closes [#46](https://github.com/Tschipcraft/spawnanimations/issues/46)) diff --git a/META-INF/mods.toml b/META-INF/mods.toml index ad236c8..223e304 100644 --- a/META-INF/mods.toml +++ b/META-INF/mods.toml @@ -11,7 +11,7 @@ version="${version}+mod" displayName="Spawn Animations" description='''Hostile mobs dig out of the ground or poof into existence when they spawn! -§lWorks with:§r Zombies, Husks, Drowned, Skeletons, Strays, Bogged, Spiders, Cave Spiders, Creepers, Slimes, Magma Cubes, Wither Skeletons, Hoglins, Zombified Piglins, Striders, Enderman and Giants. +§lWorks with:§r Zombies, Husks, Drowned, Skeletons, Strays, Bogged, Wither Skeletons, Spiders, Cave Spiders, Creepers, Endermen, Slimes, Magma Cubes, Zombified Piglins, Striders and Giants. This data pack is designed to be as unintrusive as possible. Hidden entities including their worn armor and tools will only be invisible and silent. diff --git a/META-INF/neoforge.mods.toml b/META-INF/neoforge.mods.toml index 8473b70..78e3df8 100644 --- a/META-INF/neoforge.mods.toml +++ b/META-INF/neoforge.mods.toml @@ -11,7 +11,7 @@ version="${version}+mod" displayName="Spawn Animations" description='''Hostile mobs dig out of the ground or poof into existence when they spawn! -§lWorks with:§r Zombies, Husks, Drowned, Skeletons, Strays, Bogged, Spiders, Cave Spiders, Creepers, Slimes, Magma Cubes, Wither Skeletons, Hoglins, Zombified Piglins, Striders, Enderman and Giants. +§lWorks with:§r Zombies, Husks, Drowned, Skeletons, Strays, Bogged, Wither Skeletons, Spiders, Cave Spiders, Creepers, Endermen, Slimes, Magma Cubes, Zombified Piglins, Striders and Giants. This data pack is designed to be as unintrusive as possible. Hidden entities including their worn armor and tools will only be invisible and silent. diff --git a/README.md b/README.md index dd51fd6..04d526b 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Hostile mobs dig out of the ground or poof into existence when they spawn. **Works with:** -Zombies, Husks, Drowned, Skeletons, Strays, Bogged, Spiders, Cave Spiders, Creepers, Slimes, Magma Cubes, Wither Skeletons, Hoglins, Zombified Piglins, Striders, Enderman and Giants. +Zombies, Husks, Drowned, Skeletons, Strays, Bogged, Wither Skeletons, Spiders, Cave Spiders, Creepers, Endermen, Slimes, Magma Cubes, Zombified Piglins, Striders and Giants. This data pack/mod is designed to be as unintrusive as possible. Hidden entities including their worn armor and tools will only be invisible and silent. diff --git a/assets/spawnanimations/lang/en_us.json b/assets/spawnanimations/lang/en_us.json index 2224bb9..ac98cf9 100644 --- a/assets/spawnanimations/lang/en_us.json +++ b/assets/spawnanimations/lang/en_us.json @@ -1,7 +1,7 @@ { "modmenu.summaryTranslation.spawnanimations": "Hostile mobs dig out of the ground or poof into existence when they spawn!", - "modmenu.descriptionTranslation.spawnanimations": "Hostile mobs dig out of the ground or poof into existence when they spawn!\n§lWorks with:§r Zombies, Husks, Drowned, Skeletons, Strays, Bogged, Spiders, Cave Spiders, Creepers, Slimes, Magma Cubes, Wither Skeletons, Hoglins, Zombified Piglins, Striders, Enderman and Giants.\nThis data pack is designed to be as unintrusive as possible. Hidden entities including their worn armor and tools will only be invisible and silent.\nExecute the command §o/function §ospawnanimations:settings§r for a world-specific settings menu and/or install MidnightLib for global settings across all worlds.", - "fml.menu.mods.info.description.spawnanimations": "Hostile mobs dig out of the ground or poof into existence when they spawn!\n\n§lWorks with:§r Zombies, Husks, Drowned, Skeletons, Strays, Bogged, Spiders, Cave Spiders, Creepers, Slimes, Magma Cubes, Wither Skeletons, Hoglins, Zombified Piglins, Striders, Enderman and Giants.\n\nThis data pack is designed to be as unintrusive as possible. Hidden entities including their worn armor and tools will only be invisible and silent.\n\nExecute the command §o/function §ospawnanimations:settings§r for a world-specific settings menu and/or install MidnightLib for global settings across all worlds.", + "modmenu.descriptionTranslation.spawnanimations": "Hostile mobs dig out of the ground or poof into existence when they spawn!\n§lWorks with:§r Zombies, Husks, Drowned, Skeletons, Strays, Bogged, Wither Skeletons, Spiders, Cave Spiders, Creepers, Endermen, Slimes, Magma Cubes, Zombified Piglins, Striders and Giants.\nThis data pack is designed to be as unintrusive as possible. Hidden entities including their worn armor and tools will only be invisible and silent.\nExecute the command §o/function §ospawnanimations:settings§r for a world-specific settings menu and/or install MidnightLib for global settings across all worlds.", + "fml.menu.mods.info.description.spawnanimations": "Hostile mobs dig out of the ground or poof into existence when they spawn!\n\n§lWorks with:§r Zombies, Husks, Drowned, Skeletons, Strays, Bogged, Wither Skeletons, Spiders, Cave Spiders, Creepers, Endermen, Slimes, Magma Cubes, Zombified Piglins, Striders and Giants.\n\nThis data pack is designed to be as unintrusive as possible. Hidden entities including their worn armor and tools will only be invisible and silent.\n\nExecute the command §o/function §ospawnanimations:settings§r for a world-specific settings menu and/or install MidnightLib for global settings across all worlds.", "spawnanimations.midnightconfig.title": "Spawn Animations Configuration", "spawnanimations.midnightconfig.empty": "", @@ -17,7 +17,7 @@ "spawnanimations.midnightconfig.activation_distance": "Activation Distance", "spawnanimations.midnightconfig.activation_distance.tooltip": "Default: §a20 blocks§f\nMobs closer to a player than this value will play the animation.\nSetting this to 0 will use the world-specific value.", "spawnanimations.midnightconfig.activation_mode": "Activation Mode", - "spawnanimations.midnightconfig.activation_mode.tooltip": "Default: §aClassic§f\n§nClassic§r: Mobs outside the activation range remain hidden until a player is in range.\n§nVanilla§r: Mobs outside the activation range spawn normally.\n§9ℹ Info:§f When set to Vanilla, it is recommended to set the activation distance to at least 25 blocks to see the animation.", + "spawnanimations.midnightconfig.activation_mode.tooltip": "Default: §aClassic§f\n§nClassic§r: Mobs outside the activation range remain hidden until a player is in range.\n§nVanilla§r: Mobs outside the activation range spawn normally.\n§9ℹ Info:§f When set to Vanilla, it is recommended to set the activation distance to at least 25 blocks to see the animation for naturally spawned mobs.", "spawnanimations.midnightconfig.enable_poof_animation": "Enable Poof Animation", "spawnanimations.midnightconfig.enable_poof_animation.tooltip": "Default: §aYes§f\nIf enabled, some mobs, or mobs without a block to dig up from, will play the poof animation instead.", "spawnanimations.midnightconfig.play_animation_sounds": "Play Animation Sounds", diff --git a/data/spawnanimations/function/internal/animation/dig_up/prepare.mcfunction b/data/spawnanimations/function/internal/animation/dig_up/prepare.mcfunction index fd87a78..39f7916 100644 --- a/data/spawnanimations/function/internal/animation/dig_up/prepare.mcfunction +++ b/data/spawnanimations/function/internal/animation/dig_up/prepare.mcfunction @@ -6,12 +6,16 @@ execute as @s[scores={ts.sa.timer=-300..99}] run function spawnanimations:intern execute as @s[scores={ts.sa.e.nbt.Sil=0},tag=!ts.sa.verify] run function spawnanimations:internal/animation/dig_up/recover_tags/hidden tag @s[scores={ts.sa.timer=100}] add ts.sa.verified +# Exclude out of range entities in Vanilla activation mode +execute if score $activation_mode ts.sa.settings matches -1..0 if score $activation_dist ts.sa.settings matches 1..24 as @s[tag=!ts.sa.verified,tag=!ts.sa.verify,tag=!ts.sa.to_verify] unless entity @a[gamemode=!spectator,distance=..25] run tag @s add ts.sa.verified +execute if score $activation_mode ts.sa.settings matches -1..0 if score $activation_dist ts.sa.settings matches 25.. as @s[tag=!ts.sa.verified,tag=!ts.sa.verify,tag=!ts.sa.to_verify] unless entity @a[gamemode=!spectator,distance=..100] run tag @s add ts.sa.verified + # Exclude entities that have the glowing, levitation or invisibility potion effect, are riding another entity, or are burning -execute as @s[tag=!ts.sa.verify,tag=!ts.sa.to_verify,predicate=!spawnanimations:exclude] run tag @s add ts.sa.verified +tag @s[tag=!ts.sa.verified,tag=!ts.sa.verify,tag=!ts.sa.to_verify,predicate=!spawnanimations:exclude] add ts.sa.verified # Exclude silent or no AI mobs -execute as @s[tag=!ts.sa.verified,tag=!ts.sa.verify,tag=!ts.sa.to_verify,nbt={Silent:1b}] run tag @s add ts.sa.verified -execute as @s[tag=!ts.sa.verified,tag=!ts.sa.verify,tag=!ts.sa.to_verify,nbt={NoAI:1b}] run tag @s add ts.sa.verified +tag @s[tag=!ts.sa.verified,tag=!ts.sa.verify,tag=!ts.sa.to_verify,nbt={Silent:1b}] add ts.sa.verified +tag @s[tag=!ts.sa.verified,tag=!ts.sa.verify,tag=!ts.sa.to_verify,nbt={NoAI:1b}] add ts.sa.verified # Hide the entity execute as @s[tag=!ts.sa.verified,tag=!ts.sa.verify,tag=!ts.sa.to_verify] run function spawnanimations:internal/entity/hide diff --git a/data/spawnanimations/function/internal/run_activation_batch.mcfunction b/data/spawnanimations/function/internal/run_activation_batch.mcfunction index 1210c01..1555048 100644 --- a/data/spawnanimations/function/internal/run_activation_batch.mcfunction +++ b/data/spawnanimations/function/internal/run_activation_batch.mcfunction @@ -9,3 +9,4 @@ execute store result score $global ts.sa.z run data get storage spawnanimations: # Activate entities execute if score $activation_dist ts.sa.settings matches 25..100 as @e[type=!#spawnanimations:exclude,tag=ts.sa.to_verify,distance=..100,limit=10,sort=random] at @s run function spawnanimations:internal/calc_activation execute if score $activation_dist ts.sa.settings matches 1..24 as @e[type=!#spawnanimations:exclude,tag=ts.sa.to_verify,distance=..25,limit=5,sort=random] at @s run function spawnanimations:internal/calc_activation +execute if score $activation_mode ts.sa.settings matches -1..0 if score $activation_dist ts.sa.settings matches 1..24 as @e[type=!#spawnanimations:exclude,tag=ts.sa.to_verify,distance=25..,limit=1,sort=random] at @s unless entity @a[gamemode=!spectator,distance=..25] run function spawnanimations:internal/animation/dig_up/check_failed diff --git a/data/spawnanimations/function/internal/version_checker/start.mcfunction b/data/spawnanimations/function/internal/version_checker/start.mcfunction index e566eff..02faf11 100644 --- a/data/spawnanimations/function/internal/version_checker/start.mcfunction +++ b/data/spawnanimations/function/internal/version_checker/start.mcfunction @@ -1,7 +1,7 @@ ##by Tschipcraft execute store result score $version ts.sa.settings run data get entity @r DataVersion -execute unless score $global tvc_ignore matches 1 if score $version ts.sa.settings matches 4500.. run tellraw @a [{"text":"[Spawn Animations] ","color":"gray"},{"text":"?","bold":true,"color":"gold"},{"text":" Future unknown Minecraft version above 1.21.7 detected! This data pack/mod may not work correctly anymore! Please make sure to check for updates in the menu! (","color":"gold"},{"text":"/trigger tschipcraft.menu","underlined":true,"color":"gold","click_event":{"action":"run_command","command":"trigger tschipcraft.menu"},"hover_event":{"action":"show_text","value":"Click here","text":"Click here"}},{"text":")","color":"gold"}] +execute unless score $global tvc_ignore matches 1 if score $version ts.sa.settings matches 4600.. run tellraw @a [{"text":"[Spawn Animations] ","color":"gray"},{"text":"?","bold":true,"color":"gold"},{"text":" Future unknown Minecraft version above 1.21.9 detected! This data pack/mod may not work correctly anymore! Please make sure to check for updates in the menu! (","color":"gold"},{"text":"/trigger tschipcraft.menu","underlined":true,"color":"gold","click_event":{"action":"run_command","command":"trigger tschipcraft.menu"},"hover_event":{"action":"show_text","value":"Click here","text":"Click here"}},{"text":")","color":"gold"}] # Note: 1.17x-1.20x uses the old folder names (function -> functions) # Announce escape sequence handling changes diff --git a/data/spawnanimations/functions/internal/animation/dig_up/prepare.mcfunction b/data/spawnanimations/functions/internal/animation/dig_up/prepare.mcfunction index fd87a78..39f7916 100644 --- a/data/spawnanimations/functions/internal/animation/dig_up/prepare.mcfunction +++ b/data/spawnanimations/functions/internal/animation/dig_up/prepare.mcfunction @@ -6,12 +6,16 @@ execute as @s[scores={ts.sa.timer=-300..99}] run function spawnanimations:intern execute as @s[scores={ts.sa.e.nbt.Sil=0},tag=!ts.sa.verify] run function spawnanimations:internal/animation/dig_up/recover_tags/hidden tag @s[scores={ts.sa.timer=100}] add ts.sa.verified +# Exclude out of range entities in Vanilla activation mode +execute if score $activation_mode ts.sa.settings matches -1..0 if score $activation_dist ts.sa.settings matches 1..24 as @s[tag=!ts.sa.verified,tag=!ts.sa.verify,tag=!ts.sa.to_verify] unless entity @a[gamemode=!spectator,distance=..25] run tag @s add ts.sa.verified +execute if score $activation_mode ts.sa.settings matches -1..0 if score $activation_dist ts.sa.settings matches 25.. as @s[tag=!ts.sa.verified,tag=!ts.sa.verify,tag=!ts.sa.to_verify] unless entity @a[gamemode=!spectator,distance=..100] run tag @s add ts.sa.verified + # Exclude entities that have the glowing, levitation or invisibility potion effect, are riding another entity, or are burning -execute as @s[tag=!ts.sa.verify,tag=!ts.sa.to_verify,predicate=!spawnanimations:exclude] run tag @s add ts.sa.verified +tag @s[tag=!ts.sa.verified,tag=!ts.sa.verify,tag=!ts.sa.to_verify,predicate=!spawnanimations:exclude] add ts.sa.verified # Exclude silent or no AI mobs -execute as @s[tag=!ts.sa.verified,tag=!ts.sa.verify,tag=!ts.sa.to_verify,nbt={Silent:1b}] run tag @s add ts.sa.verified -execute as @s[tag=!ts.sa.verified,tag=!ts.sa.verify,tag=!ts.sa.to_verify,nbt={NoAI:1b}] run tag @s add ts.sa.verified +tag @s[tag=!ts.sa.verified,tag=!ts.sa.verify,tag=!ts.sa.to_verify,nbt={Silent:1b}] add ts.sa.verified +tag @s[tag=!ts.sa.verified,tag=!ts.sa.verify,tag=!ts.sa.to_verify,nbt={NoAI:1b}] add ts.sa.verified # Hide the entity execute as @s[tag=!ts.sa.verified,tag=!ts.sa.verify,tag=!ts.sa.to_verify] run function spawnanimations:internal/entity/hide diff --git a/data/spawnanimations/functions/internal/run_activation_batch.mcfunction b/data/spawnanimations/functions/internal/run_activation_batch.mcfunction index 1210c01..1555048 100644 --- a/data/spawnanimations/functions/internal/run_activation_batch.mcfunction +++ b/data/spawnanimations/functions/internal/run_activation_batch.mcfunction @@ -9,3 +9,4 @@ execute store result score $global ts.sa.z run data get storage spawnanimations: # Activate entities execute if score $activation_dist ts.sa.settings matches 25..100 as @e[type=!#spawnanimations:exclude,tag=ts.sa.to_verify,distance=..100,limit=10,sort=random] at @s run function spawnanimations:internal/calc_activation execute if score $activation_dist ts.sa.settings matches 1..24 as @e[type=!#spawnanimations:exclude,tag=ts.sa.to_verify,distance=..25,limit=5,sort=random] at @s run function spawnanimations:internal/calc_activation +execute if score $activation_mode ts.sa.settings matches -1..0 if score $activation_dist ts.sa.settings matches 1..24 as @e[type=!#spawnanimations:exclude,tag=ts.sa.to_verify,distance=25..,limit=1,sort=random] at @s unless entity @a[gamemode=!spectator,distance=..25] run function spawnanimations:internal/animation/dig_up/check_failed diff --git a/fabric.mod.json b/fabric.mod.json index 00b9d5c..cca9111 100644 --- a/fabric.mod.json +++ b/fabric.mod.json @@ -9,7 +9,7 @@ "id": "spawnanimations", "version": "${version}+mod", "name": "Spawn Animations", - "description": "Hostile mobs dig out of the ground or poof into existence when they spawn!\n§lWorks with:§r Zombies, Husks, Drowned, Skeletons, Strays, Bogged, Spiders, Cave Spiders, Creepers, Slimes, Magma Cubes, Wither Skeletons, Hoglins, Zombified Piglins, Striders, Enderman and Giants.\nThis data pack is designed to be as unintrusive as possible. Hidden entities including their worn armor and tools will only be invisible and silent.\nExecute the command §o/function §ospawnanimations:settings§r for a world-specific settings menu and/or install MidnightLib for global settings across all worlds.", + "description": "Hostile mobs dig out of the ground or poof into existence when they spawn!\n§lWorks with:§r Zombies, Husks, Drowned, Skeletons, Strays, Bogged, Wither Skeletons, Spiders, Cave Spiders, Creepers, Endermen, Slimes, Magma Cubes, Zombified Piglins, Striders and Giants.\nThis data pack is designed to be as unintrusive as possible. Hidden entities including their worn armor and tools will only be invisible and silent.\nExecute the command §o/function §ospawnanimations:settings§r for a world-specific settings menu and/or install MidnightLib for global settings across all worlds.", "license": "Custom", "icon": "pack.png", "authors": [ diff --git a/pack.mcmeta b/pack.mcmeta index 8427626..98a4285 100644 --- a/pack.mcmeta +++ b/pack.mcmeta @@ -2,29 +2,41 @@ "id": "spawnanimations", "pack": { "pack_format": 15, - "supported_formats": [7, 81], + "supported_formats": [7, 88], + "min_format": 7, + "max_format": 88, "description": "Tschipcraft's Spawn Animations\n└ v${version} ● mc${mc_human_version_range}" }, "overlays": { "entries": [ { "formats": [33, 44], + "min_format": 33, + "max_format": 44, "directory": "overlay_33" }, { "formats": [35,44], + "min_format": 35, + "max_format": 44, "directory": "overlay_35" }, { "formats": [39,44], + "min_format": 39, + "max_format": 44, "directory": "overlay_39" }, { "formats": [45,48], + "min_format": 45, + "max_format": 48, "directory": "overlay_pre_49" }, { "formats": [45,62], + "min_format": 45, + "max_format": 62, "directory": "overlay_pre_63" } ] From 4a86604ce02f209829e48a0d9ca5d680f0d383ef Mon Sep 17 00:00:00 2001 From: Tschipcraft <78470530+Tschipcraft@users.noreply.github.com> Date: Tue, 30 Sep 2025 21:41:31 +0200 Subject: [PATCH 3/3] Add snow block support and update block tags - Added native support for snow blocks when playing the dig up animation - Removed native support for container blocks and moved them to the exclude tag - Expanded and reorganized block tag lists to include c convention tags for improved mod compatibility - Updated CD workflow to remove the CurseForge Forge version upload step for now --- .github/workflows/cd.yml | 30 +------------------ CHANGES.md | 4 +++ .../dig_up/particles/particles.mcfunction | 9 +----- .../dig_up/sound/play_sound.mcfunction | 11 ++----- .../dig_up/sound/play_sound2.mcfunction | 11 ++----- .../animation/dig_up/start.mcfunction | 1 + .../dig_up/particles/particles.mcfunction | 9 +----- .../dig_up/sound/play_sound.mcfunction | 11 ++----- .../dig_up/sound/play_sound2.mcfunction | 11 ++----- .../animation/dig_up/start.mcfunction | 1 + data/spawnanimations/tags/block/exclude.json | 19 +++++++++++- data/spawnanimations/tags/block/nonsolid.json | 20 +++++++++---- .../spawnanimations/tags/block/supported.json | 8 ++--- data/spawnanimations/tags/blocks/exclude.json | 18 ++++++++++- .../spawnanimations/tags/blocks/nonsolid.json | 14 +++++---- .../tags/blocks/supported.json | 8 ++--- .../dig_up/particles/particles.mcfunction | 9 +----- 17 files changed, 80 insertions(+), 114 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index e23659b..c07506d 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -331,35 +331,7 @@ jobs: files: | ./${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ env.MC_HUMAN_VERSION_RANGE }}-datapack.zip - - name: Upload Forge mod version to CurseForge # Same reason as above - id: upload_forge_curseforge_mod - uses: Kir-Antipov/mc-publish@v3.3 - if: steps.check_mod_folder.outputs.files_exists == 'true' && github.event.inputs.dry_run == 'false' - with: - curseforge-id: 1223719 - curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }} - game-versions: | - >=1.17 <=1.21.5 - game-version-filter: any - fail-mode: skip - - name: "Release v${{ github.event.inputs.tag }}" - version: ${{ github.event.inputs.tag }}+mod - changelog-file: CHANGES.md - - dependencies: | - catalogue(optional){curseforge:459701} - midnightlib(optional){curseforge:488090} - pehkui(optional){curseforge:319596} - java: | - Java 21 - Java 17 - loaders: | - forge - files: | - ./${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ env.MC_HUMAN_VERSION_RANGE }}-mod.jar - - - name: Upload mod version to CurseForge + - name: Upload mod version to CurseForge # Duplicate uploads sadly don't work on CurseForge id: upload_curseforge_mod uses: Kir-Antipov/mc-publish@v3.3 if: steps.check_mod_folder.outputs.files_exists == 'true' && github.event.inputs.dry_run == 'false' diff --git a/CHANGES.md b/CHANGES.md index 77c54c5..ca1ee82 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,7 @@ - **Added support for Minecraft 1.21.9** 🥉 + - Updated to work with the new pack.mcmeta syntax - Raised entity processing limits to resolve mob farm complications (Thanks @Fyoncle) - Fixed Vanilla activation mode behaving the same way as Classic for activation distances below 25 (closes [#46](https://github.com/Tschipcraft/spawnanimations/issues/46)) +- Added native support for snow blocks when playing the dig up animation +- Removed native support for some container blocks +- Expanded and reorganized tag lists to include convention tags for improved mod compatibility diff --git a/data/spawnanimations/function/internal/animation/dig_up/particles/particles.mcfunction b/data/spawnanimations/function/internal/animation/dig_up/particles/particles.mcfunction index 1fa427a..cd4e0ba 100644 --- a/data/spawnanimations/function/internal/animation/dig_up/particles/particles.mcfunction +++ b/data/spawnanimations/function/internal/animation/dig_up/particles/particles.mcfunction @@ -20,13 +20,13 @@ execute if block ~ ~ ~ minecraft:cobblestone run particle block{block_state:"min execute if block ~ ~ ~ minecraft:hay_block run particle block{block_state:"minecraft:hay_block"} ~ ~0.2 ~ 0.1 0 0.1 1 9 normal execute if block ~ ~ ~ minecraft:gravel run particle block{block_state:"minecraft:gravel"} ~ ~0.2 ~ 0.1 0 0.1 1 9 normal execute if block ~ ~0.3 ~ minecraft:snow run particle block{block_state:"minecraft:snow"} ~ ~0.4 ~ 0.1 0 0.1 1 9 normal +execute if block ~ ~ ~ minecraft:snow_block unless block ~ ~0.3 ~ minecraft:snow run particle block{block_state:"minecraft:snow_block"} ~ ~0.2 ~ 0.1 0 0.1 1 9 normal execute if block ~ ~ ~ #minecraft:ice run particle block{block_state:"minecraft:ice"} ~ ~0.2 ~ 0.1 0 0.1 1 9 normal execute if block ~ ~ ~ minecraft:obsidian run particle block{block_state:"minecraft:obsidian"} ~ ~0.2 ~ 0.1 0 0.1 1 9 normal execute if block ~ ~ ~ minecraft:slime_block run particle block{block_state:"minecraft:slime_block"} ~ ~0.2 ~ 0.1 0 0.1 1 9 normal # End execute if block ~ ~ ~ minecraft:end_stone run particle block{block_state:"minecraft:end_stone"} ~ ~0.2 ~ 0.1 0 0.1 1 9 normal -# Chorus # Nether execute if block ~ ~ ~ #minecraft:base_stone_nether run particle block{block_state:"minecraft:netherrack"} ~ ~0.2 ~ 0.1 0 0.1 1 9 normal @@ -35,13 +35,6 @@ execute if block ~ ~ ~ minecraft:nether_bricks run particle block{block_state:"m execute if block ~ ~ ~ #minecraft:soul_fire_base_blocks run particle block{block_state:"minecraft:soul_sand"} ~ ~0.2 ~ 0.1 0 0.1 1 9 normal execute if block ~ ~ ~ #minecraft:soul_fire_base_blocks run particle minecraft:soul ~ ~0.2 ~ 0.1 0.1 0.1 0.01 1 normal -# Containers -execute if block ~ ~ ~ minecraft:chest run particle block{block_state:"minecraft:chest"} ~ ~0.2 ~ 0.1 0 0.1 1 3 normal -execute if block ~ ~ ~ minecraft:trapped_chest run particle block{block_state:"minecraft:trapped_chest"} ~ ~0.2 ~ 0.1 0 0.1 1 3 normal -execute if block ~ ~ ~ minecraft:ender_chest run particle block{block_state:"minecraft:ender_chest"} ~ ~0.2 ~ 0.1 0 0.1 1 1 normal -execute if block ~ ~ ~ minecraft:hopper run particle block{block_state:"minecraft:hopper"} ~ ~0.2 ~ 0.1 0 0.1 1 3 normal -execute if block ~ ~ ~ minecraft:beacon run particle block{block_state:"minecraft:glass"} ~ ~0.2 ~ 0.1 0 0.1 1 3 normal - # Extra mob-specific particles execute positioned ~ ~ ~ if entity @s[type=#spawnanimations:particles/nether_mob] run particle lava ~ ~0.4 ~ 0.1 0 0.1 0.01 1 normal execute positioned ~ ~ ~ if entity @s[type=#spawnanimations:particles/end_mob] run particle dragon_breath ~ ~0.2 ~ 0.1 0 0.1 0.01 5 normal diff --git a/data/spawnanimations/function/internal/animation/dig_up/sound/play_sound.mcfunction b/data/spawnanimations/function/internal/animation/dig_up/sound/play_sound.mcfunction index 3d2ac49..e796a1f 100644 --- a/data/spawnanimations/function/internal/animation/dig_up/sound/play_sound.mcfunction +++ b/data/spawnanimations/function/internal/animation/dig_up/sound/play_sound.mcfunction @@ -17,7 +17,8 @@ execute if block ~ ~ ~ minecraft:cobblestone run playsound minecraft:block.stone # Other execute if block ~ ~ ~ minecraft:hay_block run playsound minecraft:block.grass.break hostile @a ~ ~ ~ 0.85 0.6 execute if block ~ ~ ~ #minecraft:wool run playsound minecraft:block.wool.break hostile @a ~ ~ ~ 0.85 0.6 -execute if block ~ ~0.2 ~ minecraft:snow run playsound minecraft:block.snow.break hostile @a ~ ~ ~ 0.85 0.6 +execute if block ~ ~0.3 ~ minecraft:snow run playsound minecraft:block.snow.break hostile @a ~ ~ ~ 0.85 0.6 +execute if block ~ ~ ~ minecraft:snow_block unless block ~ ~0.3 ~ minecraft:snow run playsound minecraft:block.snow.break hostile @a ~ ~ ~ 0.85 0.5 execute if block ~ ~ ~ #minecraft:ice run playsound minecraft:block.glass.break hostile @a ~ ~ ~ 0.85 0.7 execute if block ~ ~ ~ minecraft:obsidian run playsound minecraft:block.stone.break hostile @a ~ ~ ~ 0.85 0.4 execute if block ~ ~ ~ minecraft:slime_block run playsound minecraft:block.slime_block.break hostile @a ~ ~ ~ 0.85 0.4 @@ -31,12 +32,4 @@ execute if block ~ ~ ~ #minecraft:nylium run playsound minecraft:block.wart_bloc execute if block ~ ~ ~ minecraft:nether_bricks run playsound minecraft:block.nether_bricks.break hostile @a ~ ~ ~ 0.85 0.6 execute if block ~ ~ ~ #minecraft:soul_fire_base_blocks run playsound minecraft:block.soul_sand.break hostile @a ~ ~ ~ 0.85 0.6 -# Containers -execute if block ~ ~ ~ minecraft:chest run playsound minecraft:block.wood.break hostile @a ~ ~ ~ 0.85 0.6 -execute if block ~ ~ ~ minecraft:trapped_chest run playsound minecraft:block.wood.break hostile @a ~ ~ ~ 0.85 0.6 -execute if block ~ ~ ~ minecraft:ender_chest run playsound minecraft:block.ender_chest.open hostile @a ~ ~ ~ 0.85 0.4 -execute if block ~ ~ ~ minecraft:hopper run playsound minecraft:block.metal.break hostile @a ~ ~ ~ 0.85 0.6 -execute if block ~ ~ ~ minecraft:beacon run playsound minecraft:block.glass.break hostile @a ~ ~ ~ 0.85 0.4 - - execute if block ~ ~ ~ minecraft:lava run playsound minecraft:block.lava.pop hostile @a ~ ~ ~ 0.85 0.6 diff --git a/data/spawnanimations/function/internal/animation/dig_up/sound/play_sound2.mcfunction b/data/spawnanimations/function/internal/animation/dig_up/sound/play_sound2.mcfunction index 849739a..da1e264 100644 --- a/data/spawnanimations/function/internal/animation/dig_up/sound/play_sound2.mcfunction +++ b/data/spawnanimations/function/internal/animation/dig_up/sound/play_sound2.mcfunction @@ -17,7 +17,8 @@ execute if block ~ ~ ~ minecraft:cobblestone run playsound minecraft:block.stone # Other execute if block ~ ~ ~ minecraft:hay_block run playsound minecraft:block.grass.break hostile @a ~ ~ ~ 0.85 0.9 execute if block ~ ~ ~ #minecraft:wool run playsound minecraft:block.wool.break hostile @a ~ ~ ~ 0.85 0.9 -execute if block ~ ~ ~ minecraft:snow run playsound minecraft:block.snow.break hostile @a ~ ~ ~ 0.85 0.9 +execute if block ~ ~0.3 ~ minecraft:snow run playsound minecraft:block.snow.break hostile @a ~ ~ ~ 0.85 0.9 +execute if block ~ ~ ~ minecraft:snow_block unless block ~ ~0.3 ~ minecraft:snow run playsound minecraft:block.snow.break hostile @a ~ ~ ~ 0.85 0.8 execute if block ~ ~ ~ #minecraft:ice run playsound minecraft:block.glass.break hostile @a ~ ~ ~ 0.85 0.9 execute if block ~ ~ ~ minecraft:obsidian run playsound minecraft:block.stone.break hostile @a ~ ~ ~ 0.85 0.6 execute if block ~ ~ ~ minecraft:slime_block run playsound minecraft:block.slime_block.break hostile @a ~ ~ ~ 0.85 0.6 @@ -31,12 +32,4 @@ execute if block ~ ~ ~ minecraft:nether_bricks run playsound minecraft:block.net execute if block ~ ~ ~ #minecraft:nylium run playsound minecraft:block.wart_block.break hostile @a ~ ~ ~ 0.85 0.9 execute if block ~ ~ ~ #minecraft:soul_fire_base_blocks run playsound minecraft:block.soul_sand.break hostile @a ~ ~ ~ 0.85 0.9 -# Containers -execute if block ~ ~ ~ minecraft:chest run playsound minecraft:block.wood.break hostile @a ~ ~ ~ 0.85 0.9 -execute if block ~ ~ ~ minecraft:trapped_chest run playsound minecraft:block.wood.break hostile @a ~ ~ ~ 0.85 0.9 -execute if block ~ ~ ~ minecraft:ender_chest run playsound minecraft:block.ender_chest.open hostile @a ~ ~ ~ 0.85 0.6 -execute if block ~ ~ ~ minecraft:hopper run playsound minecraft:block.metal.break hostile @a ~ ~ ~ 0.85 0.9 -execute if block ~ ~ ~ minecraft:beacon run playsound minecraft:block.glass.break hostile @a ~ ~ ~ 0.85 0.6 - - execute if block ~ ~ ~ minecraft:lava run playsound minecraft:block.lava.pop hostile @a ~ ~ ~ 0.85 0.9 diff --git a/data/spawnanimations/function/internal/animation/dig_up/start.mcfunction b/data/spawnanimations/function/internal/animation/dig_up/start.mcfunction index e96b139..7168009 100644 --- a/data/spawnanimations/function/internal/animation/dig_up/start.mcfunction +++ b/data/spawnanimations/function/internal/animation/dig_up/start.mcfunction @@ -28,3 +28,4 @@ execute as @s[tag=ts.sa.verify] if entity @e[type=!#spawnanimations:exclude,dist # Prevent animation on unsupported blocks if disabled execute as @s[tag=ts.sa.verify] if score $play_unsupport ts.sa.settings matches -1..0 unless block ~ ~-0.5 ~ #spawnanimations:supported run function spawnanimations:internal/animation/dig_up/verify_in_air +execute as @s[tag=ts.sa.verify] if score $play_unsupport ts.sa.settings matches 1..2 if block ~ ~-0.5 ~ #spawnanimations:exclude run function spawnanimations:internal/animation/dig_up/verify_in_air diff --git a/data/spawnanimations/functions/internal/animation/dig_up/particles/particles.mcfunction b/data/spawnanimations/functions/internal/animation/dig_up/particles/particles.mcfunction index 406cd6b..370875a 100644 --- a/data/spawnanimations/functions/internal/animation/dig_up/particles/particles.mcfunction +++ b/data/spawnanimations/functions/internal/animation/dig_up/particles/particles.mcfunction @@ -20,13 +20,13 @@ execute if block ~ ~ ~ minecraft:cobblestone run particle minecraft:block minecr execute if block ~ ~ ~ minecraft:hay_block run particle minecraft:block minecraft:hay_block ~ ~0.2 ~ 0.1 0 0.1 1 9 normal execute if block ~ ~ ~ minecraft:gravel run particle minecraft:block minecraft:gravel ~ ~0.2 ~ 0.1 0 0.1 1 9 normal execute if block ~ ~0.3 ~ minecraft:snow run particle minecraft:block minecraft:snow ~ ~0.4 ~ 0.1 0 0.1 1 9 normal +execute if block ~ ~ ~ minecraft:snow_block unless block ~ ~0.3 ~ minecraft:snow run particle minecraft:block minecraft:snow_block ~0.2 ~ 0.1 0 0.1 1 9 normal execute if block ~ ~ ~ #minecraft:ice run particle minecraft:block minecraft:ice ~ ~0.2 ~ 0.1 0 0.1 1 9 normal execute if block ~ ~ ~ minecraft:obsidian run particle minecraft:block minecraft:obsidian ~ ~0.2 ~ 0.1 0 0.1 1 9 normal execute if block ~ ~ ~ minecraft:slime_block run particle minecraft:block minecraft:slime_block ~ ~0.2 ~ 0.1 0 0.1 1 9 normal # End execute if block ~ ~ ~ minecraft:end_stone run particle minecraft:block minecraft:end_stone ~ ~0.2 ~ 0.1 0 0.1 1 9 normal -# Chorus # Nether execute if block ~ ~ ~ #minecraft:base_stone_nether run particle minecraft:block minecraft:netherrack ~ ~0.2 ~ 0.1 0 0.1 1 9 normal @@ -35,13 +35,6 @@ execute if block ~ ~ ~ minecraft:nether_bricks run particle minecraft:block mine execute if block ~ ~ ~ #minecraft:soul_fire_base_blocks run particle minecraft:block minecraft:soul_sand ~ ~0.2 ~ 0.1 0 0.1 1 9 normal execute if block ~ ~ ~ #minecraft:soul_fire_base_blocks run particle minecraft:soul ~ ~0.2 ~ 0.1 0.1 0.1 0.01 1 normal -# Containers -execute if block ~ ~ ~ minecraft:chest run particle minecraft:block minecraft:chest ~ ~0.2 ~ 0.1 0 0.1 1 3 normal -execute if block ~ ~ ~ minecraft:trapped_chest run particle minecraft:block minecraft:trapped_chest ~ ~0.2 ~ 0.1 0 0.1 1 3 normal -execute if block ~ ~ ~ minecraft:ender_chest run particle minecraft:block minecraft:ender_chest ~ ~0.2 ~ 0.1 0 0.1 1 1 normal -execute if block ~ ~ ~ minecraft:hopper run particle minecraft:block minecraft:hopper ~ ~0.2 ~ 0.1 0 0.1 1 3 normal -execute if block ~ ~ ~ minecraft:beacon run particle minecraft:block minecraft:glass ~ ~0.2 ~ 0.1 0 0.1 1 3 normal - # Extra mob-specific particles execute positioned ~ ~ ~ if entity @s[type=#spawnanimations:particles/nether_mob] run particle lava ~ ~0.4 ~ 0.1 0 0.1 0.01 1 normal execute positioned ~ ~ ~ if entity @s[type=#spawnanimations:particles/end_mob] run particle dragon_breath ~ ~0.2 ~ 0.1 0 0.1 0.01 5 normal diff --git a/data/spawnanimations/functions/internal/animation/dig_up/sound/play_sound.mcfunction b/data/spawnanimations/functions/internal/animation/dig_up/sound/play_sound.mcfunction index 3d2ac49..e796a1f 100644 --- a/data/spawnanimations/functions/internal/animation/dig_up/sound/play_sound.mcfunction +++ b/data/spawnanimations/functions/internal/animation/dig_up/sound/play_sound.mcfunction @@ -17,7 +17,8 @@ execute if block ~ ~ ~ minecraft:cobblestone run playsound minecraft:block.stone # Other execute if block ~ ~ ~ minecraft:hay_block run playsound minecraft:block.grass.break hostile @a ~ ~ ~ 0.85 0.6 execute if block ~ ~ ~ #minecraft:wool run playsound minecraft:block.wool.break hostile @a ~ ~ ~ 0.85 0.6 -execute if block ~ ~0.2 ~ minecraft:snow run playsound minecraft:block.snow.break hostile @a ~ ~ ~ 0.85 0.6 +execute if block ~ ~0.3 ~ minecraft:snow run playsound minecraft:block.snow.break hostile @a ~ ~ ~ 0.85 0.6 +execute if block ~ ~ ~ minecraft:snow_block unless block ~ ~0.3 ~ minecraft:snow run playsound minecraft:block.snow.break hostile @a ~ ~ ~ 0.85 0.5 execute if block ~ ~ ~ #minecraft:ice run playsound minecraft:block.glass.break hostile @a ~ ~ ~ 0.85 0.7 execute if block ~ ~ ~ minecraft:obsidian run playsound minecraft:block.stone.break hostile @a ~ ~ ~ 0.85 0.4 execute if block ~ ~ ~ minecraft:slime_block run playsound minecraft:block.slime_block.break hostile @a ~ ~ ~ 0.85 0.4 @@ -31,12 +32,4 @@ execute if block ~ ~ ~ #minecraft:nylium run playsound minecraft:block.wart_bloc execute if block ~ ~ ~ minecraft:nether_bricks run playsound minecraft:block.nether_bricks.break hostile @a ~ ~ ~ 0.85 0.6 execute if block ~ ~ ~ #minecraft:soul_fire_base_blocks run playsound minecraft:block.soul_sand.break hostile @a ~ ~ ~ 0.85 0.6 -# Containers -execute if block ~ ~ ~ minecraft:chest run playsound minecraft:block.wood.break hostile @a ~ ~ ~ 0.85 0.6 -execute if block ~ ~ ~ minecraft:trapped_chest run playsound minecraft:block.wood.break hostile @a ~ ~ ~ 0.85 0.6 -execute if block ~ ~ ~ minecraft:ender_chest run playsound minecraft:block.ender_chest.open hostile @a ~ ~ ~ 0.85 0.4 -execute if block ~ ~ ~ minecraft:hopper run playsound minecraft:block.metal.break hostile @a ~ ~ ~ 0.85 0.6 -execute if block ~ ~ ~ minecraft:beacon run playsound minecraft:block.glass.break hostile @a ~ ~ ~ 0.85 0.4 - - execute if block ~ ~ ~ minecraft:lava run playsound minecraft:block.lava.pop hostile @a ~ ~ ~ 0.85 0.6 diff --git a/data/spawnanimations/functions/internal/animation/dig_up/sound/play_sound2.mcfunction b/data/spawnanimations/functions/internal/animation/dig_up/sound/play_sound2.mcfunction index 849739a..da1e264 100644 --- a/data/spawnanimations/functions/internal/animation/dig_up/sound/play_sound2.mcfunction +++ b/data/spawnanimations/functions/internal/animation/dig_up/sound/play_sound2.mcfunction @@ -17,7 +17,8 @@ execute if block ~ ~ ~ minecraft:cobblestone run playsound minecraft:block.stone # Other execute if block ~ ~ ~ minecraft:hay_block run playsound minecraft:block.grass.break hostile @a ~ ~ ~ 0.85 0.9 execute if block ~ ~ ~ #minecraft:wool run playsound minecraft:block.wool.break hostile @a ~ ~ ~ 0.85 0.9 -execute if block ~ ~ ~ minecraft:snow run playsound minecraft:block.snow.break hostile @a ~ ~ ~ 0.85 0.9 +execute if block ~ ~0.3 ~ minecraft:snow run playsound minecraft:block.snow.break hostile @a ~ ~ ~ 0.85 0.9 +execute if block ~ ~ ~ minecraft:snow_block unless block ~ ~0.3 ~ minecraft:snow run playsound minecraft:block.snow.break hostile @a ~ ~ ~ 0.85 0.8 execute if block ~ ~ ~ #minecraft:ice run playsound minecraft:block.glass.break hostile @a ~ ~ ~ 0.85 0.9 execute if block ~ ~ ~ minecraft:obsidian run playsound minecraft:block.stone.break hostile @a ~ ~ ~ 0.85 0.6 execute if block ~ ~ ~ minecraft:slime_block run playsound minecraft:block.slime_block.break hostile @a ~ ~ ~ 0.85 0.6 @@ -31,12 +32,4 @@ execute if block ~ ~ ~ minecraft:nether_bricks run playsound minecraft:block.net execute if block ~ ~ ~ #minecraft:nylium run playsound minecraft:block.wart_block.break hostile @a ~ ~ ~ 0.85 0.9 execute if block ~ ~ ~ #minecraft:soul_fire_base_blocks run playsound minecraft:block.soul_sand.break hostile @a ~ ~ ~ 0.85 0.9 -# Containers -execute if block ~ ~ ~ minecraft:chest run playsound minecraft:block.wood.break hostile @a ~ ~ ~ 0.85 0.9 -execute if block ~ ~ ~ minecraft:trapped_chest run playsound minecraft:block.wood.break hostile @a ~ ~ ~ 0.85 0.9 -execute if block ~ ~ ~ minecraft:ender_chest run playsound minecraft:block.ender_chest.open hostile @a ~ ~ ~ 0.85 0.6 -execute if block ~ ~ ~ minecraft:hopper run playsound minecraft:block.metal.break hostile @a ~ ~ ~ 0.85 0.9 -execute if block ~ ~ ~ minecraft:beacon run playsound minecraft:block.glass.break hostile @a ~ ~ ~ 0.85 0.6 - - execute if block ~ ~ ~ minecraft:lava run playsound minecraft:block.lava.pop hostile @a ~ ~ ~ 0.85 0.9 diff --git a/data/spawnanimations/functions/internal/animation/dig_up/start.mcfunction b/data/spawnanimations/functions/internal/animation/dig_up/start.mcfunction index e96b139..7168009 100644 --- a/data/spawnanimations/functions/internal/animation/dig_up/start.mcfunction +++ b/data/spawnanimations/functions/internal/animation/dig_up/start.mcfunction @@ -28,3 +28,4 @@ execute as @s[tag=ts.sa.verify] if entity @e[type=!#spawnanimations:exclude,dist # Prevent animation on unsupported blocks if disabled execute as @s[tag=ts.sa.verify] if score $play_unsupport ts.sa.settings matches -1..0 unless block ~ ~-0.5 ~ #spawnanimations:supported run function spawnanimations:internal/animation/dig_up/verify_in_air +execute as @s[tag=ts.sa.verify] if score $play_unsupport ts.sa.settings matches 1..2 if block ~ ~-0.5 ~ #spawnanimations:exclude run function spawnanimations:internal/animation/dig_up/verify_in_air diff --git a/data/spawnanimations/tags/block/exclude.json b/data/spawnanimations/tags/block/exclude.json index eb21d7d..c259989 100644 --- a/data/spawnanimations/tags/block/exclude.json +++ b/data/spawnanimations/tags/block/exclude.json @@ -8,6 +8,23 @@ "minecraft:structure_void", {"id": "minecraft:light", "required": false}, "minecraft:water", - "minecraft:snow" + "minecraft:snow", + "minecraft:chest", + "minecraft:trapped_chest", + "minecraft:ender_chest", + {"id": "#minecraft:copper_chests", "required": false}, + {"id": "#c:chests", "required": false}, + "minecraft:barrel", + {"id": "#c:barrels", "required": false}, + "minecraft:hopper", + "minecraft:beacon", + "minecraft:furnace", + "minecraft:blast_furnace", + "minecraft:smoker", + {"id": "#c:player_workstations/furnaces", "required": false}, + {"id": "#c:villager_job_sites", "required": false}, + {"id": "#minecraft:fence_gates", "required": false}, + {"id": "#c:fence_gates", "required": false}, + {"id": "#c:skulls", "required": false} ] } diff --git a/data/spawnanimations/tags/block/nonsolid.json b/data/spawnanimations/tags/block/nonsolid.json index f9b2bc2..4760309 100644 --- a/data/spawnanimations/tags/block/nonsolid.json +++ b/data/spawnanimations/tags/block/nonsolid.json @@ -4,20 +4,22 @@ "minecraft:air", "minecraft:cave_air", {"id": "minecraft:light", "required": false}, - "minecraft:water", - "minecraft:bubble_column", "minecraft:moving_piston", "minecraft:structure_void", - "#minecraft:saplings", - "minecraft:bamboo_sapling", + "minecraft:water", + "minecraft:bubble_column", "#minecraft:corals", "#minecraft:wall_corals", "#spawnanimations:dead_corals", "minecraft:sea_pickle", "minecraft:kelp_plant", + "#minecraft:saplings", + "minecraft:bamboo_sapling", "#minecraft:flowers", + {"id": "#c:flowers", "required": false}, "#minecraft:flower_pots", "#minecraft:crops", + {"id": "#c:crops", "required": false}, {"id": "minecraft:pitcher_crop", "required": false}, "minecraft:cocoa", "minecraft:sweet_berry_bush", @@ -29,8 +31,10 @@ "minecraft:nether_sprouts", "minecraft:brown_mushroom", "minecraft:red_mushroom", + "minecraft:snow", {"id": "minecraft:grass", "required": false}, {"id": "minecraft:short_grass", "required": false}, + {"id": "#c:grass", "required": false}, "minecraft:tall_grass", "minecraft:sunflower", "minecraft:lilac", @@ -51,16 +55,20 @@ "minecraft:soul_wall_torch", "minecraft:redstone_torch", "minecraft:redstone_wall_torch", - "minecraft:snow", + {"id": "minecraft:copper_torch", "required": false}, + {"id": "minecraft:copper_wall_torch", "required": false}, "minecraft:pointed_dripstone", "minecraft:small_amethyst_bud", "#minecraft:candles", - "minecraft:chain", + {"id": "minecraft:chain", "required": false}, + {"id": "#minecraft:chains", "required": false}, + {"id": "#c:chains", "required": false}, "minecraft:ladder", "minecraft:fire", "#minecraft:banners", "minecraft:campfire", "minecraft:lantern", + {"id": "#minecraft:lanterns", "required": false}, "minecraft:redstone_wire", "minecraft:lever", "minecraft:tripwire", diff --git a/data/spawnanimations/tags/block/supported.json b/data/spawnanimations/tags/block/supported.json index 74c3c98..a458d49 100644 --- a/data/spawnanimations/tags/block/supported.json +++ b/data/spawnanimations/tags/block/supported.json @@ -13,6 +13,7 @@ "minecraft:hay_block", "minecraft:gravel", "minecraft:snow", + "minecraft:snow_block", "#minecraft:ice", "minecraft:obsidian", "minecraft:slime_block", @@ -21,11 +22,6 @@ "#minecraft:nylium", "#minecraft:base_stone_nether", "#minecraft:soul_fire_base_blocks", - "minecraft:lava", - "minecraft:chest", - "minecraft:trapped_chest", - "minecraft:ender_chest", - "minecraft:hopper", - "minecraft:beacon" + "minecraft:lava" ] } diff --git a/data/spawnanimations/tags/blocks/exclude.json b/data/spawnanimations/tags/blocks/exclude.json index eb21d7d..af042d3 100644 --- a/data/spawnanimations/tags/blocks/exclude.json +++ b/data/spawnanimations/tags/blocks/exclude.json @@ -8,6 +8,22 @@ "minecraft:structure_void", {"id": "minecraft:light", "required": false}, "minecraft:water", - "minecraft:snow" + "minecraft:snow", + "minecraft:chest", + "minecraft:trapped_chest", + "minecraft:ender_chest", + {"id": "#c:chests", "required": false}, + "minecraft:barrel", + {"id": "#c:barrels", "required": false}, + "minecraft:hopper", + "minecraft:beacon", + "minecraft:furnace", + "minecraft:blast_furnace", + "minecraft:smoker", + {"id": "#c:player_workstations/furnaces", "required": false}, + {"id": "#c:villager_job_sites", "required": false}, + {"id": "#minecraft:fence_gates", "required": false}, + {"id": "#c:fence_gates", "required": false}, + {"id": "#c:skulls", "required": false} ] } diff --git a/data/spawnanimations/tags/blocks/nonsolid.json b/data/spawnanimations/tags/blocks/nonsolid.json index f9b2bc2..248a7b1 100644 --- a/data/spawnanimations/tags/blocks/nonsolid.json +++ b/data/spawnanimations/tags/blocks/nonsolid.json @@ -4,20 +4,22 @@ "minecraft:air", "minecraft:cave_air", {"id": "minecraft:light", "required": false}, - "minecraft:water", - "minecraft:bubble_column", "minecraft:moving_piston", "minecraft:structure_void", - "#minecraft:saplings", - "minecraft:bamboo_sapling", + "minecraft:water", + "minecraft:bubble_column", "#minecraft:corals", "#minecraft:wall_corals", "#spawnanimations:dead_corals", "minecraft:sea_pickle", "minecraft:kelp_plant", + "#minecraft:saplings", + "minecraft:bamboo_sapling", "#minecraft:flowers", + {"id": "#c:flowers", "required": false}, "#minecraft:flower_pots", "#minecraft:crops", + {"id": "#c:crops", "required": false}, {"id": "minecraft:pitcher_crop", "required": false}, "minecraft:cocoa", "minecraft:sweet_berry_bush", @@ -29,8 +31,10 @@ "minecraft:nether_sprouts", "minecraft:brown_mushroom", "minecraft:red_mushroom", + "minecraft:snow", {"id": "minecraft:grass", "required": false}, {"id": "minecraft:short_grass", "required": false}, + {"id": "#c:grass", "required": false}, "minecraft:tall_grass", "minecraft:sunflower", "minecraft:lilac", @@ -51,11 +55,11 @@ "minecraft:soul_wall_torch", "minecraft:redstone_torch", "minecraft:redstone_wall_torch", - "minecraft:snow", "minecraft:pointed_dripstone", "minecraft:small_amethyst_bud", "#minecraft:candles", "minecraft:chain", + {"id": "#c:chains", "required": false}, "minecraft:ladder", "minecraft:fire", "#minecraft:banners", diff --git a/data/spawnanimations/tags/blocks/supported.json b/data/spawnanimations/tags/blocks/supported.json index 74c3c98..a458d49 100644 --- a/data/spawnanimations/tags/blocks/supported.json +++ b/data/spawnanimations/tags/blocks/supported.json @@ -13,6 +13,7 @@ "minecraft:hay_block", "minecraft:gravel", "minecraft:snow", + "minecraft:snow_block", "#minecraft:ice", "minecraft:obsidian", "minecraft:slime_block", @@ -21,11 +22,6 @@ "#minecraft:nylium", "#minecraft:base_stone_nether", "#minecraft:soul_fire_base_blocks", - "minecraft:lava", - "minecraft:chest", - "minecraft:trapped_chest", - "minecraft:ender_chest", - "minecraft:hopper", - "minecraft:beacon" + "minecraft:lava" ] } diff --git a/overlay_39/data/spawnanimations/functions/internal/animation/dig_up/particles/particles.mcfunction b/overlay_39/data/spawnanimations/functions/internal/animation/dig_up/particles/particles.mcfunction index 1fa427a..cd4e0ba 100644 --- a/overlay_39/data/spawnanimations/functions/internal/animation/dig_up/particles/particles.mcfunction +++ b/overlay_39/data/spawnanimations/functions/internal/animation/dig_up/particles/particles.mcfunction @@ -20,13 +20,13 @@ execute if block ~ ~ ~ minecraft:cobblestone run particle block{block_state:"min execute if block ~ ~ ~ minecraft:hay_block run particle block{block_state:"minecraft:hay_block"} ~ ~0.2 ~ 0.1 0 0.1 1 9 normal execute if block ~ ~ ~ minecraft:gravel run particle block{block_state:"minecraft:gravel"} ~ ~0.2 ~ 0.1 0 0.1 1 9 normal execute if block ~ ~0.3 ~ minecraft:snow run particle block{block_state:"minecraft:snow"} ~ ~0.4 ~ 0.1 0 0.1 1 9 normal +execute if block ~ ~ ~ minecraft:snow_block unless block ~ ~0.3 ~ minecraft:snow run particle block{block_state:"minecraft:snow_block"} ~ ~0.2 ~ 0.1 0 0.1 1 9 normal execute if block ~ ~ ~ #minecraft:ice run particle block{block_state:"minecraft:ice"} ~ ~0.2 ~ 0.1 0 0.1 1 9 normal execute if block ~ ~ ~ minecraft:obsidian run particle block{block_state:"minecraft:obsidian"} ~ ~0.2 ~ 0.1 0 0.1 1 9 normal execute if block ~ ~ ~ minecraft:slime_block run particle block{block_state:"minecraft:slime_block"} ~ ~0.2 ~ 0.1 0 0.1 1 9 normal # End execute if block ~ ~ ~ minecraft:end_stone run particle block{block_state:"minecraft:end_stone"} ~ ~0.2 ~ 0.1 0 0.1 1 9 normal -# Chorus # Nether execute if block ~ ~ ~ #minecraft:base_stone_nether run particle block{block_state:"minecraft:netherrack"} ~ ~0.2 ~ 0.1 0 0.1 1 9 normal @@ -35,13 +35,6 @@ execute if block ~ ~ ~ minecraft:nether_bricks run particle block{block_state:"m execute if block ~ ~ ~ #minecraft:soul_fire_base_blocks run particle block{block_state:"minecraft:soul_sand"} ~ ~0.2 ~ 0.1 0 0.1 1 9 normal execute if block ~ ~ ~ #minecraft:soul_fire_base_blocks run particle minecraft:soul ~ ~0.2 ~ 0.1 0.1 0.1 0.01 1 normal -# Containers -execute if block ~ ~ ~ minecraft:chest run particle block{block_state:"minecraft:chest"} ~ ~0.2 ~ 0.1 0 0.1 1 3 normal -execute if block ~ ~ ~ minecraft:trapped_chest run particle block{block_state:"minecraft:trapped_chest"} ~ ~0.2 ~ 0.1 0 0.1 1 3 normal -execute if block ~ ~ ~ minecraft:ender_chest run particle block{block_state:"minecraft:ender_chest"} ~ ~0.2 ~ 0.1 0 0.1 1 1 normal -execute if block ~ ~ ~ minecraft:hopper run particle block{block_state:"minecraft:hopper"} ~ ~0.2 ~ 0.1 0 0.1 1 3 normal -execute if block ~ ~ ~ minecraft:beacon run particle block{block_state:"minecraft:glass"} ~ ~0.2 ~ 0.1 0 0.1 1 3 normal - # Extra mob-specific particles execute positioned ~ ~ ~ if entity @s[type=#spawnanimations:particles/nether_mob] run particle lava ~ ~0.4 ~ 0.1 0 0.1 0.01 1 normal execute positioned ~ ~ ~ if entity @s[type=#spawnanimations:particles/end_mob] run particle dragon_breath ~ ~0.2 ~ 0.1 0 0.1 0.01 5 normal