File tree Expand file tree Collapse file tree 7 files changed +63
-7
lines changed
src/main/java/org/spongepowered/api Expand file tree Collapse file tree 7 files changed +63
-7
lines changed Original file line number Diff line number Diff line change 2424 */
2525package org .spongepowered .api .data .type ;
2626
27+ import org .spongepowered .api .registry .DefaultedRegistryType ;
28+ import org .spongepowered .api .registry .RegistryTypes ;
29+ import org .spongepowered .api .tag .DefaultedTaggable ;
2730import org .spongepowered .api .util .annotation .CatalogedBy ;
2831
2932@ CatalogedBy (FrogTypes .class )
30- public interface FrogType {
33+ public interface FrogType extends DefaultedTaggable <FrogType > {
34+
35+ @ Override
36+ default DefaultedRegistryType <FrogType > registryType () {
37+ return RegistryTypes .FROG_TYPE ;
38+ }
3139}
Original file line number Diff line number Diff line change 2727import net .kyori .adventure .sound .Sound ;
2828import org .spongepowered .api .ResourceKeyed ;
2929import org .spongepowered .api .Sponge ;
30+ import org .spongepowered .api .registry .DefaultedRegistryType ;
31+ import org .spongepowered .api .registry .RegistryTypes ;
32+ import org .spongepowered .api .tag .DefaultedTaggable ;
3033import org .spongepowered .api .util .ResourceKeyedBuilder ;
3134import org .spongepowered .api .util .annotation .CatalogedBy ;
3235
3336/**
3437 * Represents a sound that can be heard on clients.
3538 */
3639@ CatalogedBy (SoundTypes .class )
37- public interface SoundType extends ResourceKeyed , Sound .Type {
40+ public interface SoundType extends DefaultedTaggable < SoundType >, ResourceKeyed , Sound .Type {
3841
3942 /**
4043 * Creates a new {@link Builder} for building SoundTypes.
@@ -45,6 +48,11 @@ static Builder builder() {
4548 return Sponge .game ().builderProvider ().provide (Builder .class );
4649 }
4750
51+ @ Override
52+ default DefaultedRegistryType <SoundType > registryType () {
53+ return RegistryTypes .SOUND_TYPE ;
54+ }
55+
4856 /**
4957 * Builds a SoundType, primarily for sending custom sounds to the client.
5058 */
Original file line number Diff line number Diff line change 2424 */
2525package org .spongepowered .api .statistic ;
2626
27+ import org .spongepowered .api .registry .DefaultedRegistryType ;
28+ import org .spongepowered .api .registry .RegistryTypes ;
2729import org .spongepowered .api .scoreboard .criteria .Criterion ;
30+ import org .spongepowered .api .tag .DefaultedTaggable ;
2831import org .spongepowered .api .util .annotation .CatalogedBy ;
2932
3033import java .text .NumberFormat ;
3437 * Represents some statistic in minecraft.
3538 */
3639@ CatalogedBy (Statistics .class )
37- public interface Statistic {
40+ public interface Statistic extends DefaultedTaggable < Statistic > {
3841
3942 /**
4043 * Returns the objective {@link Criterion} for this statistic.
@@ -51,6 +54,11 @@ public interface Statistic {
5154 */
5255 NumberFormat format ();
5356
57+ @ Override
58+ default DefaultedRegistryType <Statistic > registryType () {
59+ return RegistryTypes .STATISTIC ;
60+ }
61+
5462 /**
5563 * Represents a {@link Statistic} instance of a {@link StatisticCategory.Typed}.
5664 *
Original file line number Diff line number Diff line change 2525package org .spongepowered .api .statistic ;
2626
2727import io .leangen .geantyref .TypeToken ;
28+ import org .spongepowered .api .registry .DefaultedRegistryType ;
29+ import org .spongepowered .api .registry .RegistryTypes ;
30+ import org .spongepowered .api .tag .DefaultedTaggable ;
2831import org .spongepowered .api .util .annotation .CatalogedBy ;
2932
3033import java .util .Collection ;
3134
3235@ CatalogedBy (StatisticCategories .class )
33- public interface StatisticCategory {
36+ public interface StatisticCategory extends DefaultedTaggable < StatisticCategory > {
3437
3538 /**
3639 * Gets all the {@link Statistic}s that are listed
@@ -40,6 +43,11 @@ public interface StatisticCategory {
4043 */
4144 Collection <? extends Statistic > statistics ();
4245
46+ @ Override
47+ default DefaultedRegistryType <StatisticCategory > registryType () {
48+ return RegistryTypes .STATISTIC_CATEGORY ;
49+ }
50+
4351 /**
4452 * Represents a {@link StatisticCategory} that owns
4553 * {@link Statistic}s for all the {@link T values}
Original file line number Diff line number Diff line change 2525package org .spongepowered .api .world .generation .carver ;
2626
2727import org .spongepowered .api .data .persistence .DataView ;
28+ import org .spongepowered .api .registry .DefaultedRegistryType ;
29+ import org .spongepowered .api .registry .RegistryTypes ;
30+ import org .spongepowered .api .tag .DefaultedTaggable ;
2831import org .spongepowered .api .util .annotation .CatalogedBy ;
2932
3033/**
3134 * A type of {@link Carver}.
3235 */
3336@ CatalogedBy (CarverTypes .class )
34- public interface CarverType {
37+ public interface CarverType extends DefaultedTaggable < CarverType > {
3538
3639 /**
3740 * Returns the configured carver
@@ -40,4 +43,9 @@ public interface CarverType {
4043 * @return The configured carver
4144 */
4245 Carver configure (DataView config ) throws IllegalArgumentException ;
46+
47+ @ Override
48+ default DefaultedRegistryType <CarverType > registryType () {
49+ return RegistryTypes .CARVER_TYPE ;
50+ }
4351}
Original file line number Diff line number Diff line change 2525package org .spongepowered .api .world .generation .feature ;
2626
2727import org .spongepowered .api .data .persistence .DataView ;
28+ import org .spongepowered .api .registry .DefaultedRegistryType ;
29+ import org .spongepowered .api .registry .RegistryTypes ;
30+ import org .spongepowered .api .tag .DefaultedTaggable ;
2831import org .spongepowered .api .util .annotation .CatalogedBy ;
2932
3033/**
3134 * A type of {@link PlacementModifier}.
3235 */
3336@ CatalogedBy (PlacementModifierTypes .class )
34- public interface PlacementModifierType {
37+ public interface PlacementModifierType extends DefaultedTaggable < PlacementModifierType > {
3538
3639 /**
3740 * Returns the placement modifier.
@@ -42,4 +45,9 @@ public interface PlacementModifierType {
4245 * @throws IllegalArgumentException when the configuration is not valid for this type of placement modifier
4346 */
4447 PlacementModifier configure (DataView config ) throws IllegalArgumentException ;
48+
49+ @ Override
50+ default DefaultedRegistryType <PlacementModifierType > registryType () {
51+ return RegistryTypes .PLACEMENT_MODIFIER ;
52+ }
4553}
Original file line number Diff line number Diff line change 2525package org .spongepowered .api .world .generation .structure .jigsaw ;
2626
2727import org .spongepowered .api .data .persistence .DataView ;
28+ import org .spongepowered .api .registry .DefaultedRegistryType ;
29+ import org .spongepowered .api .registry .RegistryTypes ;
30+ import org .spongepowered .api .tag .DefaultedTaggable ;
2831import org .spongepowered .api .util .annotation .CatalogedBy ;
2932
3033import java .io .IOException ;
3336 * A type of {@link Processor}.
3437 */
3538@ CatalogedBy (ProcessorTypes .class )
36- public interface ProcessorType {
39+ public interface ProcessorType extends DefaultedTaggable < ProcessorType > {
3740
3841 /**
3942 * Returns the configured processor.
@@ -42,4 +45,9 @@ public interface ProcessorType {
4245 * @return The configured processor
4346 */
4447 Processor configure (DataView config ) throws IOException ;
48+
49+ @ Override
50+ default DefaultedRegistryType <ProcessorType > registryType () {
51+ return RegistryTypes .PROCESSOR_TYPE ;
52+ }
4553}
You can’t perform that action at this time.
0 commit comments