Minecraft datapack that prevents thrown tridents from despawning
- mcfunction 100%
|
|
||
|---|---|---|
| data | ||
| .gitignore | ||
| LICENSE | ||
| pack.mcmeta | ||
| README.md | ||
Tridents Forever
A Minecraft Java Edition datapack that prevents all thrown tridents (including drowned) from despawning.
Requires Minecraft Java Edition and the mcfstd datapack framework.
Tested on
- Minecraft Java Edition 1.21.11
- mcfstd 2.1.0
Installation
- Place both
mcfstdandtridents-foreverin your world'sdatapacksdirectory. - Run
/reload. - Make sure
mcfstdis enabled before this datapack if Minecraft asks for datapack ordering.
The datapack starts automatically on reload.
Commands
Start or re-enable the datapack:
/function tridents_forever:start
Stop the datapack:
/function tridents_forever:stop
Reset the state managed by this datapack:
/function tridents_forever:uninstall
How it works
Java thrown tridents are minecraft:trident entities. Their life field counts upward while the trident is not moving, and tridents despawn once that value reaches the vanilla threshold. This datapack resets life to 0s every 600 ticks.