Skip to content

Commit b3a5754

Browse files
committed
Add Pehkui integration
- Added Pehkui mod integration to fully hide entities by scaling them down. This is especially beneficial for mobs with emissive layers in 1.20.4 and below, as the previously used vanilla scale attribute doesn't yet exist there (#25) - Updated mod metadata to suggest Pehkui - Disabled Mecha command validation in the CI workflow upon push due to the now introduced non-vanilla commands
1 parent 65aeff0 commit b3a5754

File tree

16 files changed

+85
-11
lines changed

16 files changed

+85
-11
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ on:
1717
description: 'Set to true to skip command validation'
1818
required: false
1919
type: boolean
20-
default: false
20+
default: true
2121

2222
env:
2323
# Fallback Lower: when Spyglass API is unreachable
2424
FALLBACK_MC_LOWER: "1.17"
2525
# Fallback Upper: when Spyglass API and Mojang API are unreachable
26-
FALLBACK_MC_UPPER: "1.21.5"
26+
FALLBACK_MC_UPPER: "1.21.8"
2727

2828
jobs:
2929
deploy:
@@ -189,9 +189,9 @@ jobs:
189189
echo " NeoForge range: $MACHINE_RANGE_NEOFORGE"
190190
echo " Validator version: $CMD_VALIDATOR_MC"
191191
192-
# Optionally validate commands
192+
# Optionally validate commands (disabled by default upon push due to unrecognized Pehkui commands)
193193
- name: Validate commands
194-
if: ${{ github.event.inputs.skip_check != 'true' }}
194+
if: ${{ github.event.inputs.skip_check == 'false' }}
195195
uses: mcbeet/check-commands@v1
196196
with:
197197
source: .
@@ -310,6 +310,6 @@ jobs:
310310
<img alt="❌ Error" src="https://raw.githubusercontent.com/Mqxx/GitHub-Markdown/main/blockquotes/badge/dark-theme/error.svg">
311311
</picture><br>
312312
313-
The build v${{ env.TAG }} for mc${{ env.MC_HUMAN_VERSION_RANGE }} failed! Please check the action logs for details.
313+
The build **v${{ env.TAG }}** for **Minecraft ${{ env.MC_HUMAN_VERSION_RANGE }}** failed! Please check the action logs for details.
314314
EOF
315315
fi

CHANGES.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
- **Entities with emissive layers are now properly hidden** (Endermen, Spiders, and Cave Spiders) (closes [#25](https://github.com/Tschipcraft/spawnanimations/issues/25))
2+
- 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
23
- Improved performance by refactoring entity activation distance calculations to bundle and cache position data retrieval calls, and updating batch activation logic (the whole data pack is now up to 1ms (~45%ish) faster per tick!)
34
- 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
45
- Added an activation distance recommendation message when using the vanilla activation mode
56
- Fixed possibility for hidden falling mobs to lose their fall distance NBT when appearing
6-
- Fixed v0 save format not correctly upgrading to v1 from 24w11a to 24w20a (affecting major releases 1.20.5 and 1.20.6)
7-
- Improved armor save/resolve functions to include the vanishing curse enchantment in the root proxy chest item
7+
- Fixed v0 save format not correctly upgrading to v1 from 24w11a to 24w20a, affecting major releases 1.20.5 and 1.20.6
8+
- Improved hide armor and tools option to include the vanishing curse enchantment in the root proxy chest item

META-INF/mods.toml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,16 @@ features={ java_version = "[17,)" }
4444
mandatory=false
4545
versionRange="[1.0,)"
4646
ordering="NONE"
47-
side="BOTH"
47+
side="SERVER"
4848
referralUrl="https://modrinth.com/mod/ofDka6PS/versions?l=forge"
4949

50+
[[dependencies.spawnanimations]]
51+
modId="pehkui"
52+
mandatory=false
53+
versionRange="[3.4.0,)"
54+
ordering="NONE"
55+
side="BOTH"
56+
referralUrl="https://modrinth.com/mod/t5W7Jfwy/versions?l=forge"
57+
5058
[modproperties.spawnanimations]
5159
catalogueItemIcon="minecraft:zombie_spawn_egg"

META-INF/neoforge.mods.toml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,18 @@ features={ java_version = "[21,)" }
4545
type="optional"
4646
versionRange="[1.0,)"
4747
ordering="NONE"
48-
side="BOTH"
48+
side="SERVER"
4949
referralUrl="https://modrinth.com/mod/ofDka6PS/versions?l=neoforge"
5050
reason="Compatibility with other mods"
5151

52+
[[dependencies.spawnanimations]]
53+
modId="pehkui"
54+
type="optional"
55+
versionRange="[3.4.0,)"
56+
ordering="NONE"
57+
side="BOTH"
58+
referralUrl="https://modrinth.com/mod/t5W7Jfwy/versions?l=neoforge"
59+
reason="Completely hiding entities with an emissive layer"
60+
5261
[modproperties.spawnanimations]
5362
catalogueItemIcon="minecraft:zombie_spawn_egg"

data/spawnanimations/function/internal/entity/ehs/hide.mcfunction

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ execute store result score @s ts.sa.e.nbt.Sil run data get entity @s Silent
77
execute if score @s ts.sa.e.nbt.Sil matches 0 run data merge entity @s {Silent:1b}
88
tag @s add ts.sa.to_hide
99
effect give @s invisibility 10 0 true
10+
11+
# Pehkui integration (overlay_pre_49)
12+
function spawnanimations:internal/entity/ehs/pehkui/hide

data/spawnanimations/function/internal/entity/ehs/hide_exec.mcfunction

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ execute if score $hide_armor ts.sa.settings matches 1..2 as @s[type=#spawnanimat
1010

1111
# Entity specific
1212
execute if entity @s[type=minecraft:creeper] run function spawnanimations:internal/entity/ehs/entity_specific/creeper/hide
13-
execute if entity @s[type=#spawnanimations:has_emissive_layer] run function spawnanimations:internal/entity/ehs/entity_specific/emissive_layer/hide
13+
execute if entity @s[type=#spawnanimations:has_emissive_layer,tag=!ts.sa.ehs.pehkui.shrunk] run function spawnanimations:internal/entity/ehs/entity_specific/emissive_layer/hide

data/spawnanimations/function/internal/entity/ehs/unhide.mcfunction

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ execute as @s[tag=ts.sa.ehs.saved] run function spawnanimations:internal/entity/
1010
# Entity specific
1111
execute if entity @s[type=minecraft:creeper] run function spawnanimations:internal/entity/ehs/entity_specific/creeper/unhide
1212
execute as @s[tag=ts.sa.ehs.shrunk] run function spawnanimations:internal/entity/ehs/entity_specific/emissive_layer/unhide
13+
execute as @s[tag=ts.sa.ehs.pehkui.shrunk] run function spawnanimations:internal/entity/ehs/pehkui/unhide
1314

1415
tag @s remove ts.sa.hidden

data/spawnanimations/functions/internal/entity/ehs/hide.mcfunction

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ execute store result score @s ts.sa.e.nbt.Sil run data get entity @s Silent
77
execute if score @s ts.sa.e.nbt.Sil matches 0 run data merge entity @s {Silent:1b}
88
tag @s add ts.sa.to_hide
99
effect give @s invisibility 10 0 true
10+
11+
# Pehkui integration
12+
function spawnanimations:internal/entity/ehs/pehkui/hide

data/spawnanimations/functions/internal/entity/ehs/hide_exec.mcfunction

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ execute if score $hide_armor ts.sa.settings matches 1..2 as @s[type=#spawnanimat
1010

1111
# Entity specific
1212
execute if entity @s[type=minecraft:creeper] run function spawnanimations:internal/entity/ehs/entity_specific/creeper/hide
13-
execute if entity @s[type=#spawnanimations:has_emissive_layer] run function spawnanimations:internal/entity/ehs/entity_specific/emissive_layer/hide
13+
execute if entity @s[type=#spawnanimations:has_emissive_layer,tag=!ts.sa.ehs.pehkui.shrunk] run function spawnanimations:internal/entity/ehs/entity_specific/emissive_layer/hide
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
##by Tschipcraft
2+
# Shrinks entities with an emissive layer to lower scale
3+
4+
scale delay set pehkui:model_width 0 @s
5+
scale delay set pehkui:model_height 0 @s
6+
7+
scale set pehkui:model_width 0.0001 @s
8+
scale set pehkui:model_height 0.0001 @s
9+
10+
tag @s add ts.sa.ehs.pehkui.shrunk

0 commit comments

Comments
 (0)