Skip to content

Commit

Permalink
Fix typos in registry rework post (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMCLoveMan authored Nov 20, 2023
1 parent 8fbf11d commit e9f355d
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit e9f355d

Please sign in to comment.