Skip to content

Commit 323011f

Browse files
committed
Merge branch 'api-14' into api-14-consume-effects
2 parents a0ef5e6 + bc8706f commit 323011f

30 files changed

+53
-30
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,6 @@ public static Registry<ChatType> registry() {
9898
}
9999

100100
public static DefaultedRegistryReference<ChatType> key(final ResourceKey location) {
101-
return RegistryKey.of(RegistryTypes.CHAT_TYPE, location).asDefaultedReference(Sponge::server);
101+
return RegistryKey.of(RegistryTypes.CHAT_TYPE, location).asScopedReference();
102102
}
103103
}

src/main/java/org/spongepowered/api/command/registrar/tree/CommandTreeNodeTypes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,6 @@ public static Registry<CommandTreeNodeType<?>> registry() {
138138
}
139139

140140
private static <T extends CommandTreeNode<T>> DefaultedRegistryReference<CommandTreeNodeType<T>> key(final ResourceKey location) {
141-
return RegistryKey.of(RegistryTypes.COMMAND_TREE_NODE_TYPE, location).asDefaultedReference(Sponge::server);
141+
return RegistryKey.of(RegistryTypes.COMMAND_TREE_NODE_TYPE, location).asScopedReference();
142142
}
143143
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,6 @@ public static Registry<ArtType> registry() {
148148
}
149149

150150
private static DefaultedRegistryReference<ArtType> key(final ResourceKey location) {
151-
return RegistryKey.of(RegistryTypes.ART_TYPE, location).asDefaultedReference(Sponge::server);
151+
return RegistryKey.of(RegistryTypes.ART_TYPE, location).asScopedReference();
152152
}
153153
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,6 @@ public static Registry<BannerPatternShape> registry() {
134134
}
135135

136136
private static DefaultedRegistryReference<BannerPatternShape> key(final ResourceKey location) {
137-
return RegistryKey.of(RegistryTypes.BANNER_PATTERN_SHAPE, location).asDefaultedReference(Sponge::server);
137+
return RegistryKey.of(RegistryTypes.BANNER_PATTERN_SHAPE, location).asScopedReference();
138138
}
139139
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ private WolfVariants() {
6262
}
6363

6464
public static Registry<WolfVariant> registry(final ServerWorld world) {
65-
return world.registry(RegistryTypes.WOLF_VAIRANT);
65+
return world.registry(RegistryTypes.WOLF_VARIANT);
6666
}
6767

6868
private static RegistryReference<WolfVariant> key(final ResourceKey location) {
69-
return RegistryKey.of(RegistryTypes.WOLF_VAIRANT, location).asReference();
69+
return RegistryKey.of(RegistryTypes.WOLF_VARIANT, location).asReference();
7070
}
7171
}

src/main/java/org/spongepowered/api/effect/particle/ParticleOptions.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public final class ParticleOptions {
5959
* <li>{@link ParticleTypes#BLOCK_MARKER}</li>
6060
* <li>{@link ParticleTypes#DUST_PILLAR}</li>
6161
* <li>{@link ParticleTypes#FALLING_DUST}</li>
62+
* <li>{@link ParticleTypes#BLOCK_CRUMBLE}</li>
6263
* </ul>
6364
*/
6465
public static final DefaultedRegistryReference<ParticleOption<BlockState>> BLOCK_STATE = ParticleOptions.key(ResourceKey.sponge("block_state"));
@@ -71,6 +72,7 @@ public final class ParticleOptions {
7172
* <li>{@link ParticleTypes#ENTITY_EFFECT}</li>
7273
* <li>{@link ParticleTypes#DUST}</li>
7374
* <li>{@link ParticleTypes#DUST_COLOR_TRANSITION}</li>
75+
* <li>{@link ParticleTypes#TRAIL}</li>
7476
* </ul>
7577
*/
7678
public static final DefaultedRegistryReference<ParticleOption<Color>> COLOR = ParticleOptions.key(ResourceKey.sponge("color"));
@@ -158,6 +160,16 @@ public final class ParticleOptions {
158160
*/
159161
public static final DefaultedRegistryReference<ParticleOption<Double>> SCALE = ParticleOptions.key(ResourceKey.sponge("scale"));
160162

163+
/**
164+
* This option will affect the target of a particle
165+
* The only vanilla {@link ParticleType} this option is applicable to is:
166+
*
167+
* <ul>
168+
* <li>{@link ParticleTypes#TRAIL}</li>
169+
* </ul>
170+
*/
171+
public static final DefaultedRegistryReference<ParticleOption<Vector3d>> TARGET = ParticleOptions.key(ResourceKey.sponge("target"));
172+
161173
/**
162174
* This option will change the color the transition particle will change to.
163175
* The only vanilla {@link ParticleType} this option is applicable to is:
@@ -174,6 +186,7 @@ public final class ParticleOptions {
174186
*
175187
* <ul>
176188
* <li>{@link ParticleTypes#VIBRATION}</li>
189+
* <li>{@link ParticleTypes#TRAIL}</li>
177190
* </ul>
178191
*/
179192
public static final DefaultedRegistryReference<ParticleOption<Ticks>> TRAVEL_TIME = ParticleOptions.key(ResourceKey.sponge("travel_time"));

src/main/java/org/spongepowered/api/effect/sound/music/MusicDiscs.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,6 @@ public static Registry<MusicDisc> registry() {
8686
}
8787

8888
private static DefaultedRegistryReference<MusicDisc> key(final ResourceKey location) {
89-
return RegistryKey.of(RegistryTypes.MUSIC_DISC, location).asDefaultedReference(Sponge::server);
89+
return RegistryKey.of(RegistryTypes.MUSIC_DISC, location).asScopedReference();
9090
}
9191
}

src/main/java/org/spongepowered/api/event/cause/entity/damage/DamageTypes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,6 @@ public static Registry<DamageType> registry() {
146146
}
147147

148148
private static DefaultedRegistryReference<DamageType> key(final ResourceKey location) {
149-
return RegistryKey.of(RegistryTypes.DAMAGE_TYPE, location).asDefaultedReference(Sponge::server);
149+
return RegistryKey.of(RegistryTypes.DAMAGE_TYPE, location).asScopedReference();
150150
}
151151
}

src/main/java/org/spongepowered/api/item/enchantment/EnchantmentTypes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,6 @@ public static Registry<EnchantmentType> registry() {
284284
}
285285

286286
private static DefaultedRegistryReference<EnchantmentType> key(final ResourceKey location) {
287-
return RegistryKey.of(RegistryTypes.ENCHANTMENT_TYPE, location).asDefaultedReference(Sponge::server);
287+
return RegistryKey.of(RegistryTypes.ENCHANTMENT_TYPE, location).asScopedReference();
288288
}
289289
}

src/main/java/org/spongepowered/api/item/recipe/smithing/TrimMaterials.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,6 @@ public static Registry<TrimMaterial> registry() {
6767
}
6868

6969
private static DefaultedRegistryReference<TrimMaterial> key(final ResourceKey location) {
70-
return RegistryKey.of(RegistryTypes.TRIM_MATERIAL, location).asDefaultedReference(Sponge::server);
70+
return RegistryKey.of(RegistryTypes.TRIM_MATERIAL, location).asScopedReference();
7171
}
7272
}

0 commit comments

Comments
 (0)