Skip to content

Commit f306bf4

Browse files
committed
Add missing DefaultedRegistryValue & StringRepresentable types
1 parent 42a97f9 commit f306bf4

39 files changed

+150
-41
lines changed

src/main/java/org/spongepowered/api/advancement/AdvancementType.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
package org.spongepowered.api.advancement;
2626

2727
import net.kyori.adventure.text.format.TextColor;
28+
import org.spongepowered.api.data.type.StringRepresentable;
2829
import org.spongepowered.api.registry.DefaultedRegistryType;
2930
import org.spongepowered.api.registry.DefaultedRegistryValue;
3031
import org.spongepowered.api.registry.RegistryTypes;
@@ -35,7 +36,7 @@
3536
* also the appearance in the notifications.
3637
*/
3738
@CatalogedBy(AdvancementTypes.class)
38-
public interface AdvancementType extends DefaultedRegistryValue<AdvancementType> {
39+
public interface AdvancementType extends DefaultedRegistryValue<AdvancementType>, StringRepresentable {
3940

4041
/**
4142
* Gets the {@link TextColor} of the advancement type.

src/main/java/org/spongepowered/api/adventure/ResolveOperation.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,19 @@
2424
*/
2525
package org.spongepowered.api.adventure;
2626

27+
import org.spongepowered.api.registry.DefaultedRegistryType;
28+
import org.spongepowered.api.registry.DefaultedRegistryValue;
29+
import org.spongepowered.api.registry.RegistryTypes;
2730
import org.spongepowered.api.util.annotation.CatalogedBy;
2831

2932
/**
3033
* A type of rendering operation that can be performed on a component.
3134
*/
3235
@CatalogedBy(ResolveOperations.class)
33-
public interface ResolveOperation {
36+
public interface ResolveOperation extends DefaultedRegistryValue<ResolveOperation> {
3437

38+
@Override
39+
default DefaultedRegistryType<ResolveOperation> registryType() {
40+
return RegistryTypes.RESOLVE_OPERATION;
41+
}
3542
}

src/main/java/org/spongepowered/api/command/parameter/managed/operator/Operator.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
package org.spongepowered.api.command.parameter.managed.operator;
2626

2727
import org.spongepowered.api.command.parameter.managed.standard.ResourceKeyedValueParameters;
28+
import org.spongepowered.api.registry.DefaultedRegistryType;
29+
import org.spongepowered.api.registry.DefaultedRegistryValue;
30+
import org.spongepowered.api.registry.RegistryTypes;
2831
import org.spongepowered.api.util.annotation.CatalogedBy;
2932

3033
/**
@@ -33,7 +36,7 @@
3336
* @see ResourceKeyedValueParameters#OPERATOR
3437
*/
3538
@CatalogedBy(Operators.class)
36-
public interface Operator {
39+
public interface Operator extends DefaultedRegistryValue<Operator> {
3740

3841
/**
3942
* The string representation of this operator
@@ -42,6 +45,11 @@ public interface Operator {
4245
*/
4346
String asString();
4447

48+
@Override
49+
default DefaultedRegistryType<Operator> registryType() {
50+
return RegistryTypes.OPERATOR;
51+
}
52+
4553
/**
4654
* An operator that can operate on two numbers and return a number.
4755
*/

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
* Represents a color of dye that can be used by various items and blocks.
3535
*/
3636
@CatalogedBy(DyeColors.class)
37-
public interface DyeColor extends DefaultedRegistryValue<DyeColor> {
37+
public interface DyeColor extends DefaultedRegistryValue<DyeColor>, StringRepresentable {
3838

3939
/**
4040
* Gets this dye color as a {@link Color} for easy translation.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* Represents a type of fox a fox is.
3434
*/
3535
@CatalogedBy(FoxTypes.class)
36-
public interface FoxType extends DefaultedRegistryValue<FoxType> {
36+
public interface FoxType extends DefaultedRegistryValue<FoxType>, StringRepresentable {
3737

3838
@Override
3939
default DefaultedRegistryType<FoxType> registryType() {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
* <p>The color of a horse is a genetic trait that can be inherited to a new born horse.</p>
3636
*/
3737
@CatalogedBy(HorseColors.class)
38-
public interface HorseColor extends DefaultedRegistryValue<HorseColor> {
38+
public interface HorseColor extends DefaultedRegistryValue<HorseColor>, StringRepresentable {
3939

4040
@Override
4141
default DefaultedRegistryType<HorseColor> registryType() {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import org.spongepowered.api.util.annotation.CatalogedBy;
3131

3232
@CatalogedBy(LlamaTypes.class)
33-
public interface LlamaType extends DefaultedRegistryValue<LlamaType> {
33+
public interface LlamaType extends DefaultedRegistryValue<LlamaType>, StringRepresentable {
3434

3535
@Override
3636
default DefaultedRegistryType<LlamaType> registryType() {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* Represents a type of mooshroom a mooshroom is.
3434
*/
3535
@CatalogedBy(MooshroomTypes.class)
36-
public interface MooshroomType extends DefaultedRegistryValue<MooshroomType> {
36+
public interface MooshroomType extends DefaultedRegistryValue<MooshroomType>, StringRepresentable {
3737

3838
@Override
3939
default DefaultedRegistryType<MooshroomType> registryType() {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* Represents the type of panda a panda is.
3434
*/
3535
@CatalogedBy(PandaGenes.class)
36-
public interface PandaGene extends DefaultedRegistryValue<PandaGene> {
36+
public interface PandaGene extends DefaultedRegistryValue<PandaGene>, StringRepresentable {
3737

3838
boolean isRecessive();
3939

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
* Represents the type of a {@link Parrot}.
3535
*/
3636
@CatalogedBy(ParrotTypes.class)
37-
public interface ParrotType extends DefaultedRegistryValue<ParrotType> {
37+
public interface ParrotType extends DefaultedRegistryValue<ParrotType>, StringRepresentable {
3838

3939
@Override
4040
default DefaultedRegistryType<ParrotType> registryType() {

0 commit comments

Comments
 (0)