|
25 | 25 | package org.spongepowered.api.data.type; |
26 | 26 |
|
27 | 27 | import org.spongepowered.api.ResourceKey; |
| 28 | +import org.spongepowered.api.Sponge; |
| 29 | +import org.spongepowered.api.registry.DefaultedRegistryReference; |
28 | 30 | import org.spongepowered.api.registry.Registry; |
29 | 31 | import org.spongepowered.api.registry.RegistryKey; |
30 | | -import org.spongepowered.api.registry.RegistryReference; |
31 | 32 | import org.spongepowered.api.registry.RegistryScope; |
32 | 33 | import org.spongepowered.api.registry.RegistryScopes; |
33 | 34 | import org.spongepowered.api.registry.RegistryTypes; |
34 | | -import org.spongepowered.api.world.server.ServerWorld; |
35 | 35 |
|
36 | 36 | /** |
37 | 37 | * <!-- This file is automatically generated. Any manual changes will be overwritten. --> |
38 | 38 | */ |
39 | 39 | @SuppressWarnings("unused") |
40 | | -@RegistryScopes(scopes = RegistryScope.WORLD) |
| 40 | +@RegistryScopes(scopes = RegistryScope.ENGINE) |
41 | 41 | public final class CatTypes { |
42 | 42 |
|
43 | | - public static final RegistryReference<CatType> ALL_BLACK = CatTypes.key(ResourceKey.minecraft("all_black")); |
| 43 | + public static final DefaultedRegistryReference<CatType> ALL_BLACK = CatTypes.key(ResourceKey.minecraft("all_black")); |
44 | 44 |
|
45 | | - public static final RegistryReference<CatType> BLACK = CatTypes.key(ResourceKey.minecraft("black")); |
| 45 | + public static final DefaultedRegistryReference<CatType> BLACK = CatTypes.key(ResourceKey.minecraft("black")); |
46 | 46 |
|
47 | | - public static final RegistryReference<CatType> BRITISH_SHORTHAIR = CatTypes.key(ResourceKey.minecraft("british_shorthair")); |
| 47 | + public static final DefaultedRegistryReference<CatType> BRITISH_SHORTHAIR = CatTypes.key(ResourceKey.minecraft("british_shorthair")); |
48 | 48 |
|
49 | | - public static final RegistryReference<CatType> CALICO = CatTypes.key(ResourceKey.minecraft("calico")); |
| 49 | + public static final DefaultedRegistryReference<CatType> CALICO = CatTypes.key(ResourceKey.minecraft("calico")); |
50 | 50 |
|
51 | | - public static final RegistryReference<CatType> JELLIE = CatTypes.key(ResourceKey.minecraft("jellie")); |
| 51 | + public static final DefaultedRegistryReference<CatType> JELLIE = CatTypes.key(ResourceKey.minecraft("jellie")); |
52 | 52 |
|
53 | | - public static final RegistryReference<CatType> PERSIAN = CatTypes.key(ResourceKey.minecraft("persian")); |
| 53 | + public static final DefaultedRegistryReference<CatType> PERSIAN = CatTypes.key(ResourceKey.minecraft("persian")); |
54 | 54 |
|
55 | | - public static final RegistryReference<CatType> RAGDOLL = CatTypes.key(ResourceKey.minecraft("ragdoll")); |
| 55 | + public static final DefaultedRegistryReference<CatType> RAGDOLL = CatTypes.key(ResourceKey.minecraft("ragdoll")); |
56 | 56 |
|
57 | | - public static final RegistryReference<CatType> RED = CatTypes.key(ResourceKey.minecraft("red")); |
| 57 | + public static final DefaultedRegistryReference<CatType> RED = CatTypes.key(ResourceKey.minecraft("red")); |
58 | 58 |
|
59 | | - public static final RegistryReference<CatType> SIAMESE = CatTypes.key(ResourceKey.minecraft("siamese")); |
| 59 | + public static final DefaultedRegistryReference<CatType> SIAMESE = CatTypes.key(ResourceKey.minecraft("siamese")); |
60 | 60 |
|
61 | | - public static final RegistryReference<CatType> TABBY = CatTypes.key(ResourceKey.minecraft("tabby")); |
| 61 | + public static final DefaultedRegistryReference<CatType> TABBY = CatTypes.key(ResourceKey.minecraft("tabby")); |
62 | 62 |
|
63 | | - public static final RegistryReference<CatType> WHITE = CatTypes.key(ResourceKey.minecraft("white")); |
| 63 | + public static final DefaultedRegistryReference<CatType> WHITE = CatTypes.key(ResourceKey.minecraft("white")); |
64 | 64 |
|
65 | 65 | private CatTypes() { |
66 | 66 | } |
67 | 67 |
|
68 | | - public static Registry<CatType> registry(final ServerWorld world) { |
69 | | - return world.registry(RegistryTypes.CAT_TYPE); |
| 68 | + public static Registry<CatType> registry() { |
| 69 | + return Sponge.server().registry(RegistryTypes.CAT_TYPE); |
70 | 70 | } |
71 | 71 |
|
72 | | - private static RegistryReference<CatType> key(final ResourceKey location) { |
73 | | - return RegistryKey.of(RegistryTypes.CAT_TYPE, location).asReference(); |
| 72 | + private static DefaultedRegistryReference<CatType> key(final ResourceKey location) { |
| 73 | + return RegistryKey.of(RegistryTypes.CAT_TYPE, location).asDefaultedReference(Sponge::server); |
74 | 74 | } |
75 | 75 | } |
0 commit comments