Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos in registry rework post #18

Merged
merged 1 commit into from
Nov 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions content/news/20.2registry-rework.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Here is a registration example, using the helper methods provided by `DeferredRe
public static final ResourceKey<Registry<Custom>> CUSTOM_REGISTRY_KEY =
ResourceKey.createRegistryKey(new ResourceLocation("mymod:custom"));
// Create the DeferredRegister with our registry key.
private static final DeferredRegister<CUSTOM> CUSTOMS =
private static final DeferredRegister<Custom> CUSTOMS =
DeferredRegister.create(CUSTOM_REGISTRY_KEY, "mymod");

// We can register objects as usual...
Expand All @@ -136,7 +136,7 @@ Another way is to directly create the registry with a `RegistryBuilder`, and man
public static final ResourceKey<Registry<Custom>> CUSTOM_REGISTRY_KEY =
ResourceKey.createRegistryKey(new ResourceLocation("mymod:custom"));
// Create the registry directly...
public static final Register<Custom> CUSTOM_REGISTRY = new RegistryBuilder<>(CUSTOM_REGISTRY_KEY)
public static final Registry<Custom> CUSTOM_REGISTRY = new RegistryBuilder<>(CUSTOM_REGISTRY_KEY)
// configure the builder if you want, for example with .sync(true)
// then build the registry
.build();
Expand Down