diff --git a/docs/concepts/registries.md b/docs/concepts/registries.md index 4c9939ac3..83381c3ad 100644 --- a/docs/concepts/registries.md +++ b/docs/concepts/registries.md @@ -46,10 +46,6 @@ public static final DeferredHolder EXAMPLE_BLOCK = BLOCKS.register The class `DeferredHolder` holds our object. The type parameter `R` is the type of the registry we are registering to (in our case `Block`). The type parameter `T` is the type of our supplier. Since we directly register a `Block` in this example, we provide `Block` as the second parameter. If we were to register an object of a subclass of `Block`, for example `SlabBlock`, we would provide `SlabBlock` here instead. -:::note -Some modders prefer to keep their `DeferredRegister`s in the same class as their registered objects. Others prefer keeping all `DeferredRegister`s in a separate class for readability. This is mostly a design decision, however if you decide to do the latter, make sure to classload the classes the objects are in, for example through an empty static method. -::: - `DeferredHolder` is a subclass of `Supplier`. To get our registered object when we need it, we can call `DeferredHolder#get()`. The fact that `DeferredHolder` extends `Supplier` also allows us to use `Supplier` as the type of our field. That way, the above code block becomes the following: ```java diff --git a/docs/items/index.md b/docs/items/index.md index dab3959d0..73ff7a79a 100644 --- a/docs/items/index.md +++ b/docs/items/index.md @@ -102,7 +102,7 @@ public static final Supplier EXAMPLE_BLOCK_ITEM = ITEMS.registerSimpl ``` :::note -If you keep your blocks in a separate class, you should classload your blocks class before your items class. +If you keep your registered blocks in a separate class, you should classload your blocks class before your items class. ::: ### Resources