Carpet

Carpet

2M Downloads

`tick freeze` command still runs `#minecraft:tick` functions

dhouck opened this issue · 5 comments

commented

During a tick freeze, the server still runs functions tagged #minecraft:tick very often (I donʼt know if itʼs still 20Hz like normal); this makes debugging of tick-perfect data packs much more difficult.

To reproduce:

  1. Create a datapack with a function tagged #minecraft:tick with some observable effect (see attached, which says “Tick!” each tick as long as thereʼs an entity named “Announce ticks”)
  2. Create a world with this data pack, and run /tick freeze
  3. Observe effect still happens.

Affected version: carpet 1.4.0 on Minecraft 1.16.1. I didnʼt see anything about this in the changelog for post-1.4.0, but I havenʼt tested on 1.4.5 because I donʼt have a prerelease instance with fabric.

announce ticks.zip

commented

BTW schedule()d functions in Scarpet apps also tick during a freeze, even in a deep one.

commented

Huh, interesting, /schedule doesnʼt Iʼm pretty sure.

commented

Does /tick freeze deep still run functions tagged #minecraft:tick?

commented

Huh, I didnʼt know about that. It seems to be completely undocumented; when I search for it in the repository I only get code (and this issue).

In any case, I just tested, and it does indeed do that even in a deep freeze. A workaround is to set the tick rate to 0.1, which does only run the function once every 10 seconds.

commented

Well, this is getting into Carpet really soon (PR waiting for merge). You probably don't care about it anymore (guessed since that repo is stale) but I added it anyway, for completeness sake with other freezing functionality.

If you are still interested or just want to test it you can get the PR build before release here.