tutorial:registry
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
tutorial:registry [2020/01/10 21:43] – created draylar | tutorial:registry [2020/08/26 09:30] – Fix getId description elisezerotwo | ||
---|---|---|---|
Line 17: | Line 17: | ||
When registering content, you need to specify which registry you are adding content to. The base game provides registries for all vanilla content, which can be found in '' | When registering content, you need to specify which registry you are adding content to. The base game provides registries for all vanilla content, which can be found in '' | ||
- | For a deeper overview and description of all available registries, read the [[# | + | For a deeper overview and description of all available registries, read the [[tutorial: |
===== Registering Content ===== | ===== Registering Content ===== | ||
Line 28: | Line 28: | ||
} | } | ||
</ | </ | ||
- | **registry** - an instance of the registry you want to add content to. A list of all vanilla registries, located in '' | + | **registry** - an instance of the registry you want to add content to. A list of all vanilla registries, located in '' |
**id** - an identifying label for your content inside the registry. Standard convention is '' | **id** - an identifying label for your content inside the registry. Standard convention is '' | ||
Line 36: | Line 36: | ||
===== Registry Methods ===== | ===== Registry Methods ===== | ||
- | '' | + | '' |
+ | |||
+ | <code java> | ||
+ | @Nullable | ||
+ | public abstract T get(@Nullable Identifier id); | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | '' | ||
<code java> | <code java> |
tutorial/registry.txt · Last modified: 2023/05/15 03:31 by phanabani