Previously, whether or not compasses and clocks should work was determined by the dimension's natural property. This meant that both items would work in any dimension using the default dimension types overworld or overworld_caves, as they have their natural property set to true. This is as of 1.21.4 pre-release 1 no longer possible, with or without resource pack.
Being able to control compasses and clocks directly through a dimension property was also a useful feature for custom third-party servers that dynamically load their worlds without prior knowledge on the names and properties of all dimensions.
Steps to Reproduce
Create a new world with cheats enabled and the attached data pack
Enter creative mode and give yourself a compass and a clock
Run
/execute in test:test run teleport @s 0 5 0
Watch as both items spin randomly
Attachments
Comments 4
I can reproduce the issue on the latest snapshot. Be sure to include the attached data pack. Since it adds a new dimension, a simple /reload won't do; you need to fully close the world and rejoin it if you're adding the pack to an already existing world.
Confirmed. Since 1.21.4 pre-release 1 you can only select based on dimension ID, not dimension type (property).
I can confirm this too.
Running a PaperMC server, previously we could set the compass target of a player, which sent a packet telling the player the spawn of said world changed.
As of 1.21.4, this is no longer possible.
The compass in all custom worlds just spins.
Looking at the client code, it appears the code checks in this order:
Lodestone -> use lodestone location
Overworld (not any world, strictly THE overworld) -> use spawn location of said world/level.
Else -> use "none" (ie: spin in circles)
EDIT:
Ok, after much digging, the code I mentioned above refers to code to build the resource pack.
This now appears to be handled in the resource pack....
I have tested by creating a modified pack, and it works.
I have included the pack if anyone wants to test.
Long story short:
For the compass, I set it so it will spin in the end/nether, but all other dimensions will use said dimensions spawn point
For the clock, I set it so it will spin in the end/enther, but all other dimensions will show correct time.
Please check the command usage for the latest snapshot. I have tried to reproduce as the command says below, but get the error 'invalid dimension test:test'