-
Minecraft Version1.21.x Version1.115.1 DetailsMy code usually heavy really on using upgrade id and their registries, but it seems now that they are not working anymore? I get |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
I haven't seen the rest of your code, but I suspect you're looking up upgrades in the root registry? Upgrades are loaded into dynamic registries, so you need to go through the server's
Don't do that! Instead, you want to be reading upgrades through a codec instead (either |
Beta Was this translation helpful? Give feedback.
I haven't seen the rest of your code, but I suspect you're looking up upgrades in the root registry? Upgrades are loaded into dynamic registries, so you need to go through the server's
HolderLookup.Provider
instead (e.g.level.registryAccess().lookupOrThrow(IPocketUpgrade.REGISTRY)
).Don't do that! Instead, you want to be reading upgrades through a codec instead (either
PocketUpgrades.instance().upgradeCode()
orupgradeDataCodec()
). Yes, it's lot of code to rewrite, but trust me it looks nicer in the end!