Data Packs Other

Version Detector

  • 2.3k views 0 today
  • save_alt 93 downloads
Compatibility
Minecraft 1.13
to version
Minecraft 1.19
Changes include
  • Advancements
  • Functions
  • 10
  • 8
  • 5
Endernice61
Lvl 74Legendary System
189
This datapack is an example that shows how to detect versions.

You can enter the command "/function version:say_version" to get the current version, but it already states the version every time you enter the world. You can disable it stating the version by renaming the "player" file (located at data/version/functions) to something else

The version is stored in the objective "version" of "mc" and it does not have the 1. in front.
The pack format is stored in the objective "pack_format" if you want it for some reason.

It does not detect snapshots currently.

Note for using advancements to detect version: It cannot detect 1.18 with the first function because it cannot give the player the advancement so it does it in the "tick" function. Because of this, any version above 1.18 is detected only after a player is joined.

1 Update Logs

Update #1 : by Endernice61 09/01/2022 6:38:40 pmSeptember 1, 2022 @ 10:38 pm UTC

Now able to detect 1.19

More like this

  Have something to say?

infamousmusicify
06/24/2024 4:19 am
Level 60 : High Grandmaster Programmer
I was about to embark upon the task of making one of these myself, this saves a lot of time lol <3 Thank you!
2
Kate1902019
09/02/2022 12:20 am
Level 39 : Artisan Princess
Thanks. That's useful.
2
Timongcraft
09/01/2022 4:00 pm
Level 21 : Expert System
Very cool idea to make a datapack compatible with more versions etc. but could you add a detection for 1.19?
1
Endernice61
09/01/2022 6:38 pm
Level 74 : Legendary System
Done.
1
Timongcraft
09/02/2022 6:58 am
Level 21 : Expert System
thanks
1

Welcome