Skip to content

Commit aa81eae

Browse files
authored
Add missing registry methods in catalog classes (#2525)
1 parent f3debd2 commit aa81eae

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/main/java/org/spongepowered/api/data/type/SculkSensorStates.java

+5
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import org.spongepowered.api.ResourceKey;
2828
import org.spongepowered.api.Sponge;
2929
import org.spongepowered.api.registry.DefaultedRegistryReference;
30+
import org.spongepowered.api.registry.Registry;
3031
import org.spongepowered.api.registry.RegistryKey;
3132
import org.spongepowered.api.registry.RegistryScope;
3233
import org.spongepowered.api.registry.RegistryScopes;
@@ -51,6 +52,10 @@ public final class SculkSensorStates {
5152
private SculkSensorStates() {
5253
}
5354

55+
public static Registry<SculkSensorState> registry() {
56+
return Sponge.game().registry(RegistryTypes.SCULK_SENSOR_STATE);
57+
}
58+
5459
private static DefaultedRegistryReference<SculkSensorState> key(final ResourceKey location) {
5560
return RegistryKey.of(RegistryTypes.SCULK_SENSOR_STATE, location).asDefaultedReference(Sponge::game);
5661
}

src/main/java/org/spongepowered/api/entity/EntityCategories.java

+5
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import org.spongepowered.api.ResourceKey;
2828
import org.spongepowered.api.Sponge;
2929
import org.spongepowered.api.registry.DefaultedRegistryReference;
30+
import org.spongepowered.api.registry.Registry;
3031
import org.spongepowered.api.registry.RegistryKey;
3132
import org.spongepowered.api.registry.RegistryTypes;
3233

@@ -55,6 +56,10 @@ private EntityCategories() {
5556
throw new AssertionError("You should not be attempting to instantiate this class.");
5657
}
5758

59+
public static Registry<EntityCategory> registry() {
60+
return Sponge.game().registry(RegistryTypes.ENTITY_CATEGORY);
61+
}
62+
5863
private static DefaultedRegistryReference<EntityCategory> key(final ResourceKey location) {
5964
return RegistryKey.of(RegistryTypes.ENTITY_CATEGORY, location).asDefaultedReference(Sponge::game);
6065
}

0 commit comments

Comments
 (0)