![Corpses persist [Pet revival :D]](https://cdn.modrinth.com/data/kskc5nnt/e9dcd06390ee588523f1a2b263e9baa8db36773f_96.webp)
Corpses persist [Pet revival :D]
Makes dead mobs persist. Corpses stick around a configurable amount of time and may be consumed(configurable) by certain mobs.
453
4
Список изменений
I was just testing the datapack for the final time, when I was shooting my bow for a simple lag test. Then, horror struck upon me as I saw that every two seconds, the arrow would teleport ever so slightly back! No.. not the ONE datapack I make meant to be optimized, no no no. Seeing this glaring issue, I went to my datapack and...
Short Version;
- Optimized the datapack BY A LOT
- Multiple commands are now run by ONE mutual command rather than separate identicals
- Fixed a BUG that made you target the marker instead of the corpse when dragging/cleaning, which sometimes resulted in being too SHORT to interact with certain corpses
Long Version;
- Optimized it A LOT by... well, how do I explain, okay you know how the brush cleans corpses up right? Before this, the command would still trigger even if no player actually had "brushed", and it would check every life marker if the vehicle(mob) is dead even though no one had brushed, meaning a command is run UNNECESSARILY, so I flipped the script a little by forcing those kinds of commands to specifically check with the player first
- ADDITIONALLY, the cleanup checked multiple times in the same tick because there were like 3 different commands, one for sprinkling some particles, one for changing the DeathTime to 1 and the last to kill the life marker, but they really could've all been run by ONE execute command, not three separate identical ones, so I did that for all such cases.
- I also discovered that I've been rather silly in my command logic. I was trying to drag an enderman when it just wouldn't let me, I realized I had to jump to make it work, but why..? Well, it turns out the dragging thing never actually checked the CORPSE's distance, but the LIFE MARKER's distance, and since the enderman is tall as heck, I had to jump to reach the marker. This is WRONG, so I fixed that to target the corpse instead of the marker. Incidentally, the brush cleanup stuff had the same error, but NOT anymore!
So now this terrible tragedy of lag is no longer present!
Файлы
MLG's Corpse Thingy.zip(113.39 KiB)
ОсновнойМетаданные
Канал релиза
Release
Номер версии
1.9
Загрузчики
Версии игры
1.21.7–1.21.8
Загрузок
12
Дата публикации
8 мес. назад
