- check_circle Functions
- 14,230 views, 3 today
- 1,552 downloads, 0 today
781
Increases Tick Speed to ~200%
This datapack freezes all entities (that support it), until a player gets within 32 blocks, it's that simple.
What is Tick Speed?
There are two measurements of speed in Minecraft: FPS and TPS.
- FPS stands for "Frames Per Second". It's purely graphical and although it will decrease if there is a lot to render, it's not directly related to how much Minecraft is struggling to keep up. A low FPS typically results in movement lag.
- TPS stands for "Ticks Per Second". Minecraft runs at 20 ticks per second, but Minecraft can't keep up when a lot of computations need to happen. This results in lower ticks per second and is often experienced as block lag, lag spikes, chat lag, damage lag, food consumption lag and other kinds of technical lag.
This datapack boosts tick speed, by decreasing the amount of calculations required for the Mob AI. It's inspired by Minecraft Bedrock Edition, where the Render Distance is also separated from the Simulation Distance.
How do you know it works?
Press ALT+F3 while in the game. Two graphs should pop up, FPS is on the left, TPS is on the right. I put my render distance at 32 chunks and got like 65ms per tick average. The average is at the top of the right graph ("avg: ##"). After installing the datapack, this drops to around 30ms per tick. Remember that Minecraft runs at 20 FPS (= 50ms/tick), so with me being at only 30ms/tick, I was able to play minecraft without tick lag.
Side Effects
Mobs won't respond if they are out of range and this might break the immersion a bit. You can't shoot mobs from >32 blocks away. This might sound annoying, but remember that ranged mobs like skeletons and ghasts can't attack you from >32 blocks away either.
There is an exclusion list in data/bertiecrafter/tags/entity_types/entity_freeze/excluded.json. You can add any mob type there. Let me know if I missed an obvious one that everyone would want to have excluded by default.
Default Excluded Mobs
- Ender Dragons
- Withers
- Elder Guardians
- Ghasts
- Phantoms
- Wandering Traders
- Trader Llamas
- Any other entity that is not a mob (e.g. Items or Ender Crystals). This cannot be changed.
Also note that mobs will remain frozen if only players in spectator mode are nearby.
Admin Functions
The following admin functions starting with "/function bertiecrafter:entity_freeze/admin/" are available:
- kill_all_items: Kills all items (obviously)
- kill_all_non_player: Kills all non-player entities
- revive: If for some reason some entities end up permanently frozen, use this to revive them. It revives all mobs within 16 blocks.
- stats: Print some awesome statistics to chat. It tells you exactly how many mobs are frozen and how many aren't. It also gives you the percentage of frozen mobs.
Uninstalling
Because this datapack alters entities, it's difficult to fully uninstall the datapack without side effects. I did supply a function that attempts to revive all mobs.
Uninstall Instructions (also in uninstall.txt)
If you were to delete this datapack right away, all frozen mobs would remain frozen.
In order to unfreeze mobs, do the following:
- Go into data/bertiecrafter/functions/entity_freeze
- Rename tick.mcfunction to something else (E.g: "tick-active.mcfunction")
- Rename uninstall.mcfunction to tick.mcfunction
- Run this command for yourself to enable logging:
/tag @s add bcef_log
- As entities get loaded, they will unfreeze and a message will be printed in chat.
- Leave this for a couple of days while playing. After a while, if you get almost no messages anymore, you can remove the tag and delete this datapack.
/tag @s remove bcef_log
- Frozen entities can still be killed in creative mode after this datapack is uninstalled. It's easiest to just leave the uninstall function active a little longer though.
In order to unfreeze mobs, do the following:
- Go into data/bertiecrafter/functions/entity_freeze
- Rename tick.mcfunction to something else (E.g: "tick-active.mcfunction")
- Rename uninstall.mcfunction to tick.mcfunction
- Run this command for yourself to enable logging:
/tag @s add bcef_log
- As entities get loaded, they will unfreeze and a message will be printed in chat.
- Leave this for a couple of days while playing. After a while, if you get almost no messages anymore, you can remove the tag and delete this datapack.
/tag @s remove bcef_log
- Frozen entities can still be killed in creative mode after this datapack is uninstalled. It's easiest to just leave the uninstall function active a little longer though.
Install Instructions
This is a datapack, it can easily be used in any world or server without any difficulties.
Simply drop the downloaded zip file in the "datapacks" folder of your world save (<world>/datapacks).
Then open your world and do
/reload
In case the datapack doesn't automatically get enabled, run:
/datapack enable "file/[datapack folder name].zip"
Simply drop the downloaded zip file in the "datapacks" folder of your world save (<world>/datapacks).
Then open your world and do
/reload
In case the datapack doesn't automatically get enabled, run:
/datapack enable "file/[datapack folder name].zip"
I encountered a bug! What do I do now?
I test all my creations, but bugs happen no matter how long you test something. Whenever someone experiences a bug, I do my best to fix the issue. You can help me by providing any useful information. You can never give me enough information, but please send it in a DM instead of placing it in the comments. You can still place a one-liner in the comments stating the issue to make the community aware, but that alone isn't enough to help me fix the issue.
- Checklist: Are you using the right version? Did you do /reload after dropping the datapack in? After /reload, does the datapack show up green in /datapack list?
- What is the issue? Does the datapack not seem to be working at all or is there a specific feature you are having issues with?
- What happened? Please give me all the steps needed to reproduce the issue. The faster I can experience it, the faster I can solve it.
- What did you expect to happen instead? This helps me understand your point of view and determine if the issue described is actually the issue I need to fix. The bug you are experiencing could just be a side effect of something else that doesn't behave as expected.
Compatibility | Minecraft 1.15 |
Tags |
1 Update Logs
More excluded mobs + Admin functions! : by Bertiecrafter 03/08/2020 5:19:53 pmMar 8th, 2020
- Added a couple more mobs to the excluded list
- Only mobs are targeted now
- Added a couple cool admin functions
- Fixed a bug involving spectators
See description for more info! =)
- Only mobs are targeted now
- Added a couple cool admin functions
- Fixed a bug involving spectators
See description for more info! =)
4499266
119
Create an account or sign in to comment.
Enabling the feature only sometimes could be useful when trying to fix lag issues or when running the game faster than 20tps (with carpet mod). I believe this could also help with unistallation, as players could disable the radius feature, visit everywhere they think mobs might be frozen (as mobs would still un-freeze when the radius feature is disabled), and then uninstall the datapack.
Because we are using this datapack with others on a 20w09 snapshot server and we noticed that everything seems to work fine (the entities get frozen correctly) but mobs seems to not spawn (in already loaded chunk)
(we don't know for sure if it's this datapack or others or the snapshot himself but i just wanted to ask and since we host the server with aternos we can't change view distance of the server and i checked that the gamerule was true)
And i suggest adding in the excluded list (by default):
The phantom as sometimes they just stay frozen in the sky,
The wandering trader + the trader llamas as it usually spawn away from the player and i belive can only spawn once a time
Anyway really good data pack keep the good work and ty
This datapack does not directly affect mob spawning in any way either, so I think it's caused by something else.
Thank you for suggesting those mobs!
I'll add them, the ones in my comment to XanmanAR and others soon to the list.
Also thank you for the kind words =)