Version Detector 是一个概念验证,旨在展示数据包能实现的功能远超你的想象,同时也为数据包提供了一种检测其运行版本的方法。
它本身功能有限,但可被其他数据包利用。
注意:将数据包添加到世界时,如果你使用的游戏版本早于 1.20.2,Minecraft 会警告你该数据包是为旧版 Minecraft 制作的。请忽略此警告。在 1.20.2 之前的版本中我无法解决这个问题,因为允许添加支持版本范围(而非仅单个版本)的 pack.mcmeta 功能是在 1.20.2 中添加的。
有问题/疑问?请在我的 Discord 中发布,在那里更有可能得到关注。可在侧边栏找到链接。
此数据包利用了 Minecraft 在加载数据包时会完全移除语法无效函数的特性。例如,“execute if entity @e[type=pillager]”在 1.13 中是无效语法,因为当时还没有 Pillagers(掠夺者),这会导致整个函数在 1.13 中被移除;但在 1.14 及更高版本中,由于 Pillagers 已加入且命令书写正确,该函数会成功加载并存在。每个函数都会将记分板目标中的一个数值设置为特定数字,并运行下一个函数。下一个函数的语法与上一个不同,例如从 1.14 函数切换到 1.15 函数时,会从“execute if entity @e[type=pillager]”变为“execute if entity @e[type=bee]”,从而检查不同的特性。如果链式调用在任何一点中断,数值就不再变化,此时对应的值即匹配你当前的 Minecraft 版本。
ID 存储在 "VersionInfo" 目标下名为 "MinecraftVersion" 的记分中。其取值范围从 0(对应 1.13)开始,一直递增到最新可检测的版本。
此数据包还支持 NeoForge 和 Forge 的检测。Fabric 和 Quilt 目前无法检测,因为在没有安装模组的情况下,我找不到 Fabric 或 Quilt 向游戏中添加的任何可检测内容。
致整合包制作者:
我允许在你的整合包中使用此数据包/模组。你可以将其包含在整合包中,无需事先征求我的同意。不过,如果你在其整合包中包含了它,通知我一声会更好。
已检测版本
按从旧到新顺序列出的已检测版本列表,从 ID 0(1.13)开始递增(如果某个版本未在此列表中,则它与该版本之前最新的版本归为一组,例如 1.21.3 与 1.21.2 归为一组):
正式版/快照
- 1.13
- 1.13.1
- 1.14
- 1.14.3
- 1.14.4
- 1.15
- 1.15.2
- 1.16
- 1.16.2
- 1.17
- 1.18
- 1.18.2
- 1.19
- 1.19.3
- 1.19.4
- 1.20
- 1.20.2
- 1.20.3
- 1.20.5
- 1.21
- 1.21.2
- 1.21.4
- 25w02a
- 25w03a
- 25w04a
- 25w05a
- 25w06a
- 25w07a
- 25w08a
- 25w09a
- 25w10a
- 1.21.5
- 25w15a
- 25w20a
- 1.21.6
- 1.21.7-1.21.8
- 25w31a
- 25w32a
- 25w34a
- 25w35a
- 25w36a
- 1.21.9-1.21.10
- 25w41a
- 25w42a
- 25w43a
- 25w44a
- 1.21.11
- 26.1 Snapshot 1 (Yay new versioning system)
- 26.1 Snapshot 2
- 26.1 Snapshot 3
- 26.1 Snapshot 4
- 26.1 Snapshot 5
- 26.1 Snapshot 6 - Snapshot 7 (Don't you DARE say it)
- 26.1 Snapshot 8 - Snapshot 9
- 26.1 Snapshot 10
- 26.1 Snapshot 11
- 26.1
愚人节快照:
- 20w14infinite
- 22w13oneBlockAtATime
- 23w13a_or_b
- 24w14potato 目前还没有 25w14craftmine,太懒了没加进去
Version Detector is a proof of concept that more is possible with datapacks than you'd think, and also an API for datapacks to detect what version they're running.
It doesn't do much on its own, but can be useful for other datapacks.
Note: when adding the datapack to a world, if you're using a game version older than 1.20.2, Minecraft will warn you that the pack was made for an older version of Minecraft. Ignore this warning, I can't do anything about it on versions older than 1.20.2 as the feature of pack.mcmeta that allows me to add a range of supported versions instead of having just 1 was added in 1.20.2.
Questions/Issues? Post them in my discord as they are more likely to get seen there. Find it on the sidebar.
This pack uses the fact that Minecraft completely removes functions with invalid syntax when loading a datapack, for example "execute if entity @e[type=pillager]" is invalid syntax in 1.13, because Pillagers don't exist yet, causing the whole function to get removed in 1.13, but the function will load successfully and will exist in 1.14 and later because there is no more invalid syntax because Pillagers were added, and the command was written correctly. Each function sets a number in a scoreboard objective to a number and runs the next function, which has a different syntax to the previous one, for example "execute if entity @e[type=bee]" instead of "execute if entity @e[type=pillager]" when moving from the 1.14 function to the 1.15 function, checking for a different feature. If at any point the chain stops, the number stops changing, which matches your version of Minecraft.
The ID is stored in a score for "MinecraftVersion" in the "VersionInfo" objective. It goes from 0 (1.13) up to whatever the latest detectable version is.
This pack also has NeoForge and Forge detection. Fabric and Quilt are currently undetectable, as there is nothing I can detect that fabric or quilt (without mods installed) adds to the game.
To Modpack Creators:
I permit the use of this datapack/mod in your modpacks. You can include it in modpacks without the need to ask me about it. However, notifying me if it is being included in your modpack would be nice.
Versions Detected
List of versions detected, in order from oldest to newest, starting at ID 0 (1.13) and going up (if a version isn't in this list it is grouped with the newest version from before the version, example 1.21.3 is grouped with 1.21.2):
Releases/Snapshots
- 1.13
- 1.13.1
- 1.14
- 1.14.3
- 1.14.4
- 1.15
- 1.15.2
- 1.16
- 1.16.2
- 1.17
- 1.18
- 1.18.2
- 1.19
- 1.19.3
- 1.19.4
- 1.20
- 1.20.2
- 1.20.3
- 1.20.5
- 1.21
- 1.21.2
- 1.21.4
- 25w02a
- 25w03a
- 25w04a
- 25w05a
- 25w06a
- 25w07a
- 25w08a
- 25w09a
- 25w10a
- 1.21.5
- 25w15a
- 25w20a
- 1.21.6
- 1.21.7-1.21.8
- 25w31a
- 25w32a
- 25w34a
- 25w35a
- 25w36a
- 1.21.9-1.21.10
- 25w41a
- 25w42a
- 25w43a
- 25w44a
- 1.21.11
- 26.1 Snapshot 1 (Yay new versioning system)
- 26.1 Snapshot 2
- 26.1 Snapshot 3
- 26.1 Snapshot 4
- 26.1 Snapshot 5
- 26.1 Snapshot 6 - Snapshot 7 (Don't you DARE say it)
- 26.1 Snapshot 8 - Snapshot 9
- 26.1 Snapshot 10
- 26.1 Snapshot 11
- 26.1
April Fools Snapshots:
- 20w14infinite
- 22w13oneBlockAtATime
- 23w13a_or_b
- 24w14potato Currently no 25w14craftmine yet, been too lazy to add that
下载 Version Detector
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Version Detector
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Version Detector
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Version Detector
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Version Detector
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Version Detector
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Version Detector
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Version Detector
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Version Detector
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Version Detector
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
赶上更新进度
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
数据包
此数据包添加了属于阿瓦里海盗的独特结构,将他们的独特风格带入你的 Minecraft 世界!兼容性:1.20 至 26.3
数据包
一个 Minecraft 光线投射库,能够精确检测玩家正在查看的方块,包括像台阶和楼梯这样的特殊方块形状。
数据包
此数据包添加了新的“祝福模式”难度。
数据包
允许服务器管理员方便地禁用 Xaero's Map 系列模组中的实体雷达、小地图等功能,使竞技游戏更加公平。
数据包
使用原版/生存友好的方法更改青蛙的变种类型。支持原版(寒冷、温带、温暖)以及可选的“More Frogs 2”变种:深红、末影、地狱、毒镖、紫珀、幽匿、灵魂、诡异和木头。
数据包
手持潜影盒时可直接打开,无需将其放置在地面上。只需按住 Shift 并右键点击即可访问你的潜影盒。
评论 0
登录后参与评分
还没有评论,来抢沙发吧