定制 pocketmine/bedrock-item-upgrade-schema 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pocketmine/bedrock-item-upgrade-schema

Composer 安装命令:

composer require pocketmine/bedrock-item-upgrade-schema

包简介

JSON schemas for upgrading items found in older Minecraft: Bedrock world saves

README 文档

README

JSON schemas for upgrading items found in older Minecraft: Bedrock world saves

Background

As with blocks, Bedrock doesn't auto upgrade items (e.g. in inventories, item frames, dropped items, etc) unless the chunk they were in has been loaded and saved.

This means that any program that wants to support all Minecraft: Bedrock worlds needs to know how to upgrade this old data.

Repository contents

  • id_meta_upgrade_schema subdirectory contains a list of JSON schemas for upgrading from version to version incrementally.
  • item_legacy_id_map.json contains a mapping of legacy numeric IDs to their string ID counterparts (up to 1.16, although numeric IDs haven't been used in vanilla world saves since 1.5)
  • 1.12.0_item_id_to_block_id_map.json contains a mapping of item IDs to corresponding block IDs for all blockitems.

Recommended methods for deserializing old data

Items are rather more of a pain to handle than blocks due to the lack of any versioning. This means we can only guess at the actual version and/or apply all upgraders all the time.

Classic items (MCPE <= 1.5, PM <= 1.12)

  1. start with int ID + meta
  2. 1.16 string ID via item_id_map.json -> string ID + meta
  3. deserialize as medieval item

Medieval items (MCPE 1.6 - 1.8)

  1. start with string ID + meta
  2. if ID found in 1.12.0_item_id_to_block_id_map.json, deserialize as blockitem; otherwise as normal item

Non-blockitems

  1. deserialize as modern item

Blockitems

  1. string block ID via 1.12.0_item_id_to_block_id_map.json -> string block ID + meta
  2. convert to blockstate using BedrockBlockUpgradeSchema data -> blockstate NBT
  3. deserialize blockstate NBT as block

Modern items (MCPE 1.9 - present)

  1. start with string ID + meta / blockstate NBT
  2. if blockstate NBT found, deserialize as blockitem; otherwise as normal item

Non-blockitems

  1. current string ID via schemas provided in id_meta_upgrade_schema/ subdirectory -> current string ID + meta

Blockitems

  1. deserialize blockstate NBT as block (may require BedrockBlockUpgradeSchema for upgrading)

pocketmine/bedrock-item-upgrade-schema 适用场景与选型建议

pocketmine/bedrock-item-upgrade-schema 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 383.8k 次下载、GitHub Stars 达 9, 最近一次更新时间为 2022 年 06 月 08 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 pocketmine/bedrock-item-upgrade-schema 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 pocketmine/bedrock-item-upgrade-schema 我们能提供哪些服务?
定制开发 / 二次开发

基于 pocketmine/bedrock-item-upgrade-schema 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 383.8k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 9
  • 点击次数: 30
  • 依赖项目数: 5
  • 推荐数: 0

GitHub 信息

  • Stars: 9
  • Watchers: 4
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: CC0-1.0
  • 更新时间: 2022-06-08