Luohuayu / CatServer

高性能和高兼容性的1.12.2/1.16.5/1.18.2版本Forge+Bukkit+Spigot服务端 (A high performance and high compatibility 1.12.2/1.16.5/1.18.2 version Forge+Bukkit+Spigot server)
https://catmc.org
GNU Lesser General Public License v3.0
1.98k stars 211 forks source link

Fix datapack load. #386

Closed ShiinaNene closed 2 years ago

ShiinaNene commented 2 years ago

修复数据包加载。 Fix datapack load.

在进入数据包加载阶段前清除哈希地图,这原本可能导致 重复配方 系列异常在 net/minecraftforge/common/crafting/CraftingHelper。 Clear hashmap before entering datapack load phase, which originally could cause duplicate recipe series exception at net/minecraftforge/common/crafting/CraftingHelper.

例如,模组 disenchanter 会在世界加载阶段引起 重复配方条件工厂 的异常,因为它的数据包中在配方和进度方面有相同的条件键值。 E.g., the mod disenchanter will cause duplicate recipe condition factory exception during world load phase because its datapack has the same condition keyvalue in recipes and advancements.