tutorial:registry
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
tutorial:registry [2020/08/26 09:20] – Fix links to tutorial:registry_types elisezerotwo | tutorial:registry [2022/03/27 07:32] – Updated to the use of yarncode in place of normal code. stormyfabric | ||
---|---|---|---|
Line 23: | Line 23: | ||
Use '' | Use '' | ||
- | <code java> | + | <yarncode |
- | public static <T> T register(Registry<? super T> registry, | + | public static <T> T register(class_2378<? super T> registry, |
- | return ((MutableRegistry)registry).add(id, entry); | + | return ((class_2385)registry)method_10272(id, entry); |
} | } | ||
- | </code> | + | </yarncode> |
**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 '' | ||
Line 38: | Line 38: | ||
'' | '' | ||
- | <code java> | + | <yarncode |
@Nullable | @Nullable | ||
- | public abstract T get(@Nullable | + | public abstract T get(@Nullable |
- | </code> | + | </yarncode> |
---- | ---- | ||
- | '' | + | '' |
- | <code java> | + | <yarncode |
@Nullable | @Nullable | ||
- | public abstract | + | public abstract |
- | </code> | + | </yarncode> |
---- | ---- | ||
Line 56: | Line 56: | ||
'' | '' | ||
- | <code java> | + | <yarncode |
- | public abstract int getRawId(@Nullable T entry); | + | public abstract int method_7880(@Nullable T entry); |
- | </code> | + | </yarncode> |
tutorial/registry.txt · Last modified: 2023/05/15 03:31 by phanabani