Skip to content

Commit a490075

Browse files
authored
Make DefaultedRegistryValue generic (#2591)
* make DefaultedRegistryValue generic * update DefaultedRegistryValues types to use parameter * add missing DefaultedRegistryValue * fix some registry types being not defaulted * Update DamageStepType.java
1 parent 1ac3784 commit a490075

File tree

165 files changed

+190
-169
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

165 files changed

+190
-169
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
/**
4141
* An advancement.
4242
*/
43-
public interface Advancement extends DefaultedRegistryValue, ComponentLike, DataPackSerializable {
43+
public interface Advancement extends DefaultedRegistryValue<Advancement>, ComponentLike, DataPackSerializable {
4444

4545
/**
4646
* Creates a new {@link Builder} to create an {@link Advancement}.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* also the appearance in the notifications.
3434
*/
3535
@CatalogedBy(AdvancementTypes.class)
36-
public interface AdvancementType extends DefaultedRegistryValue {
36+
public interface AdvancementType extends DefaultedRegistryValue<AdvancementType> {
3737

3838
/**
3939
* Gets the {@link TextColor} of the advancement type.

src/main/java/org/spongepowered/api/advancement/criteria/trigger/Trigger.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
*/
5454
@SuppressWarnings("unchecked")
5555
@CatalogedBy(Triggers.class)
56-
public interface Trigger<C extends FilteredTriggerConfiguration> extends DefaultedRegistryValue {
56+
public interface Trigger<C extends FilteredTriggerConfiguration> extends DefaultedRegistryValue<Trigger<?>> {
5757

5858
/**
5959
* Creates a new {@link Builder} which can be used to create

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
* A type of chat
3636
*/
3737
@CatalogedBy(ChatTypes.class)
38-
public interface ChatType extends DefaultedRegistryValue, net.kyori.adventure.chat.ChatType, DataPackSerializable {
38+
public interface ChatType extends DefaultedRegistryValue<ChatType>, net.kyori.adventure.chat.ChatType, DataPackSerializable {
3939

4040
/**
4141
* Creates a new {@link Builder} to create a {@link ChatType}.

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

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

27+
import org.spongepowered.api.registry.DefaultedRegistryValue;
2728
import org.spongepowered.api.util.annotation.CatalogedBy;
2829

2930
/**
3031
* A type of rendering operation that can be performed on a component.
3132
*/
3233
@CatalogedBy(ResolveOperations.class)
33-
public interface ResolveOperation {
34+
public interface ResolveOperation extends DefaultedRegistryValue<ResolveOperation> {
3435

3536
}

src/main/java/org/spongepowered/api/block/BlockType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
* via {@link BlockEntity}.</p>
4545
*/
4646
@CatalogedBy(BlockTypes.class)
47-
public interface BlockType extends DefaultedRegistryValue, ComponentLike, StateContainer<BlockState>, DataHolder.Immutable<BlockType>, Taggable<BlockType> {
47+
public interface BlockType extends DefaultedRegistryValue<BlockType>, ComponentLike, StateContainer<BlockState>, DataHolder.Immutable<BlockType>, Taggable<BlockType> {
4848

4949
/**
5050
* Return the {@link ItemType} that represents this block.

src/main/java/org/spongepowered/api/block/entity/BlockEntityType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* Describes a type of block entity.
3333
*/
3434
@CatalogedBy(BlockEntityTypes.class)
35-
public interface BlockEntityType extends DefaultedRegistryValue {
35+
public interface BlockEntityType extends DefaultedRegistryValue<BlockEntityType> {
3636

3737
/**
3838
* Determines if the provided block is considered valid by the {@link BlockEntity}.

src/main/java/org/spongepowered/api/block/transaction/Operation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@
3434
* but holds no bearing on the order of a transaction taking place.
3535
*/
3636
@CatalogedBy(Operations.class)
37-
public interface Operation extends DefaultedRegistryValue {
37+
public interface Operation extends DefaultedRegistryValue<Operation> {
3838
}

src/main/java/org/spongepowered/api/command/parameter/managed/ValueParameter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
* @see org.spongepowered.api.command.parameter.managed.ValueParser
4949
* @see org.spongepowered.api.command.parameter.managed.ValueUsage
5050
*/
51-
public interface ValueParameter<T> extends DefaultedRegistryValue, ValueCompleter, ValueParser<T>, ValueUsage {
51+
public interface ValueParameter<T> extends DefaultedRegistryValue<ValueParameter<?>>, ValueCompleter, ValueParser<T>, ValueUsage {
5252

5353
@Override
5454
default String usage(@NonNull final String key) {

src/main/java/org/spongepowered/api/command/parameter/managed/clientcompletion/ClientCompletionType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@
3737
* types</p>
3838
*/
3939
@CatalogedBy(ClientCompletionTypes.class)
40-
public interface ClientCompletionType extends DefaultedRegistryValue {
40+
public interface ClientCompletionType extends DefaultedRegistryValue<ClientCompletionType> {
4141
}

0 commit comments

Comments
 (0)