(网易版)错误报告如下:---------------------------Assert Failure - ctrl+C to copy this message to the clipboard!
---------------------------
Assertion failed: Structure element name already registered
Condition is false: mElementLookupMap.find(name) == mElementLookupMap.end()
Function: JigsawStructureElementRegistry::registerStructureElement in C:\jenkins_slave\workspace\SdkClientGit\git_minecraft\handheld\src\common\world\level\levelgen\structure\registry\JigsawStructureElementRegistry.cpp @ 15
---------------------------
确定
---------------------------
我问了chatgpt,他说是结构注册错误,这是原话:这段代码中的条件 mElementLookupMap.find(name) == mElementLookupMap.end() 是一个断言断言,用于检查名为 name 的结构元素是否已经在 mElementLookupMap(一个数据结构)中注册。mElementLookupMap.find(name) 表示在 mElementLookupMap 中查找名为 name 的结构元素。如果该结构元素存在,find 函数将返回指向该元素的迭代器;如果不存在,则返回 mElementLookupMap.end()。 因此,mElementLookupMap.find(name) == mElementLookupMap.end() 的比较表达式判断着这个结构元素是否已经在 mElementLookupMap 中被注册。如果返回结果为真(即等式成立),意味着结构元素没有被注册;否则,意味着结构元素已经注册过了。 在你的错误信息中,断言失败了,即结构元素 name 已经被注册过了,但是代码中却又尝试注册一次导致失败。这可能是一个潜在的 bug,你可能需要检查代码逻辑并确保正确注册结构元素。
请问我该怎么解决这个错误,或者这对我的MOD有没有什么影响,我做的是结构生成的MOD,用的是刚更新的大型结构和结构池,不知道结构还会不会继续生成,求大佬解答QAQ
|