How can I construct a registry? #1589
Answered
by
haykam821
haykam821
asked this question in
Mod Dev Support
Replies: 1 comment 1 reply
-
private static final Identifier REGISTRY_ID = new Identifier("modid", "example");
private static final RegistryKey<Registry<T>> REGISTRY_KEY = RegistryKey.ofRegistry(REGISTRY_ID);
public static final Registry<T> REGISTRY = new SimpleRegistry<>(REGISTRY_KEY, Lifecycle.stable()); |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
haykam821
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How can a registry that can be registered to using code (rather than JSON) be constructed?
They should act like existing vanilla registries, like the block and item registries.
Beta Was this translation helpful? Give feedback.
All reactions