Skip to content

Commit f158136

Browse files
committed
Add more documentation to RegisterRegistryValueEvent
1 parent 8ee6d4d commit f158136

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/main/java/org/spongepowered/api/event/lifecycle/RegisterRegistryValueEvent.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,21 @@
4343
* as the registry is being appended and as dependencies become
4444
* available. Plugins should only execute code inside the consumers.</p>
4545
*
46-
* <p><strong>Note:</strong> Layers might be reloadable!</p>
46+
* <p><strong>Note:</strong> Layers might be reloadable! When a registry
47+
* is being reloaded, this even is fired again for the relevant registries.
48+
* The implementation does not keep a reference to the Consumer observed
49+
* in the last stage and expects plugins to fill a new set of entries.</p>
50+
*
51+
* <p>Additionally, plugins may request to take a dependency on another
52+
* registry in order to access registered entries early to enrich its
53+
* own content. This can prove to be useful when both registries are in
54+
* the same layer and would have no access to each other otherwise.</p>
55+
*
56+
* <p>The available registries and their content are not guaranteed to
57+
* be accessible unless they have been added as a dependency. Plugins
58+
* might observe registries they have not marked as a dependency due
59+
* to the platform having natural dependency on them or due to the
60+
* registries dependency graph.</p>
4761
*/
4862
@NoFactoryMethod
4963
public interface RegisterRegistryValueEvent extends LifecycleEvent {

0 commit comments

Comments
 (0)