Git Product home page Git Product logo

Comments (2)

NattoCB avatar NattoCB commented on September 26, 2024

尝试写插件将bug前的未丢失的 translationKey 备份出来单独存一个 NBT 字段然后等出 BUG 后通过 listener 和 NBT API 回写到 NBT 里去修正,结果发现无论是同步添加回NBT还是异步添加回NBT都会被重置为 null,而且仅限于这一个字段会有这个问题,其他NBT字段均正常读写

image

如上图,备份出数据存成 backupData1 字段,然后尝试回写到 ShareTag 的 TranslationKey 中,失败,但 TranslationKey1 成功。

尝试了同步调用:
itemStack.setItemMeta(nbtItem.getItem().getItemMeta());
尝试了异步调用:
Bukkit.getScheduler().runTaskLater(this.plugin, () -> updateItemStackMeta(itemStack, nbtItem), 60);

ShareTag 的 TranslationKey 均会被重置成null

from catserver.

NattoCB avatar NattoCB commented on September 26, 2024

测试发现一个规律,玩家在第一次获取某个物品时(造成的点击事件)不会丢失shareTag,但第二次之后就会在点击物品时立即丢失

from catserver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.