Skip to content

Commit f98dbbb

Browse files
committed
chore: merge api-13 into api-14
Signed-off-by: Gabriel Harris-Rouquette <[email protected]>
2 parents fc341a9 + 45e646d commit f98dbbb

File tree

11 files changed

+218
-7
lines changed

11 files changed

+218
-7
lines changed

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,11 @@
2424
*/
2525
package org.spongepowered.api.block.entity;
2626

27-
import org.jetbrains.annotations.ApiStatus;
28-
import org.spongepowered.api.util.annotation.Experimental;
29-
3027
/**
3128
* Represents a CreakingHeart block entity.
3229
*
3330
* @see <a href="https://minecraft.wiki/Creaking_Heart">Creaking Heart</a>
3431
*/
35-
@Experimental("winter_drop")
36-
@ApiStatus.Experimental
3732
public interface CreakingHeart extends BlockEntity {
3833

3934
}

src/main/java/org/spongepowered/api/data/Keys.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
import org.spongepowered.api.data.type.ArmorMaterial;
5555
import org.spongepowered.api.data.type.ArtType;
5656
import org.spongepowered.api.data.type.AttachmentSurface;
57+
import org.spongepowered.api.data.type.AxolotlVariant;
5758
import org.spongepowered.api.data.type.BoatType;
5859
import org.spongepowered.api.data.type.BodyPart;
5960
import org.spongepowered.api.data.type.BodyParts;
@@ -85,6 +86,7 @@
8586
import org.spongepowered.api.data.type.PushReaction;
8687
import org.spongepowered.api.data.type.RabbitType;
8788
import org.spongepowered.api.data.type.RailDirection;
89+
import org.spongepowered.api.data.type.SalmonSize;
8890
import org.spongepowered.api.data.type.SculkSensorState;
8991
import org.spongepowered.api.data.type.SkinPart;
9092
import org.spongepowered.api.data.type.SlabPortion;
@@ -145,6 +147,7 @@
145147
import org.spongepowered.api.entity.living.Humanoid;
146148
import org.spongepowered.api.entity.living.Living;
147149
import org.spongepowered.api.entity.living.animal.Animal;
150+
import org.spongepowered.api.entity.living.animal.Axolotl;
148151
import org.spongepowered.api.entity.living.animal.Cat;
149152
import org.spongepowered.api.entity.living.animal.Chicken;
150153
import org.spongepowered.api.entity.living.animal.Fox;
@@ -165,6 +168,8 @@
165168
import org.spongepowered.api.entity.living.animal.horse.llama.Llama;
166169
import org.spongepowered.api.entity.living.animal.horse.llama.TraderLlama;
167170
import org.spongepowered.api.entity.living.aquatic.Dolphin;
171+
import org.spongepowered.api.entity.living.aquatic.fish.Pufferfish;
172+
import org.spongepowered.api.entity.living.aquatic.fish.school.Salmon;
168173
import org.spongepowered.api.entity.living.aquatic.fish.school.TropicalFish;
169174
import org.spongepowered.api.entity.living.golem.IronGolem;
170175
import org.spongepowered.api.entity.living.golem.Shulker;
@@ -468,6 +473,11 @@ public final class Keys {
468473
*/
469474
public static final Key<Value<Axis>> AXIS = Keys.key(ResourceKey.sponge("axis"), Axis.class);
470475

476+
/**
477+
* The {@link AxolotlVariant} of an {@link Axolotl}.
478+
*/
479+
public static final Key<Value<AxolotlVariant>> AXOLOTL_VARIANT = Keys.key(ResourceKey.sponge("axolotl_variant"), AxolotlVariant.class);
480+
471481
/**
472482
* The ticks until a {@link Ageable} turns into an adult.
473483
*/
@@ -2786,6 +2796,12 @@ public final class Keys {
27862796
*/
27872797
public static final Key<Value<Integer>> PROFESSION_LEVEL = Keys.key(ResourceKey.sponge("profession_level"), Integer.class);
27882798

2799+
/**
2800+
* The "puffiness" state of a {@link Pufferfish}, ranges from 0 to 2 per
2801+
* the <a href="https://minecraft.wiki/w/Pufferfish#Entity_data">Minecraft Wiki</a>.
2802+
*/
2803+
public static final Key<Value<Integer>> PUFFER_FISH_PUFFINESS_STATE = Keys.key(ResourceKey.sponge("puffer_fish_size"), Integer.class);
2804+
27892805
/**
27902806
* The {@link Entity} or {@link BlockState} push reaction when a {@link Piston} pushes it.
27912807
* Readonly
@@ -2921,6 +2937,11 @@ public final class Keys {
29212937
*/
29222938
public static final Key<Value<Ticks>> ROARING_TIME = Keys.key(ResourceKey.sponge("roaring_time"), Ticks.class);
29232939

2940+
/**
2941+
* The {@link SalmonSize} of a {@link Salmon} entity.
2942+
*/
2943+
public static final Key<Value<SalmonSize>> SALMON_SIZE = Keys.key(ResourceKey.sponge("salmon_size"), SalmonSize.class);
2944+
29242945
/**
29252946
* The current saturation of a {@link Player}.
29262947
*
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* This file is part of SpongeAPI, licensed under the MIT License (MIT).
3+
*
4+
* Copyright (c) SpongePowered <https://www.spongepowered.org>
5+
* Copyright (c) contributors
6+
*
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy
8+
* of this software and associated documentation files (the "Software"), to deal
9+
* in the Software without restriction, including without limitation the rights
10+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
* copies of the Software, and to permit persons to whom the Software is
12+
* furnished to do so, subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in
15+
* all copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23+
* THE SOFTWARE.
24+
*/
25+
package org.spongepowered.api.data.type;
26+
27+
import org.spongepowered.api.registry.DefaultedRegistryValue;
28+
import org.spongepowered.api.util.annotation.CatalogedBy;
29+
30+
@CatalogedBy(AxolotlVariants.class)
31+
public interface AxolotlVariant extends DefaultedRegistryValue, StringRepresentable {
32+
}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*
2+
* This file is part of SpongeAPI, licensed under the MIT License (MIT).
3+
*
4+
* Copyright (c) SpongePowered <https://www.spongepowered.org>
5+
* Copyright (c) contributors
6+
*
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy
8+
* of this software and associated documentation files (the "Software"), to deal
9+
* in the Software without restriction, including without limitation the rights
10+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
* copies of the Software, and to permit persons to whom the Software is
12+
* furnished to do so, subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in
15+
* all copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23+
* THE SOFTWARE.
24+
*/
25+
package org.spongepowered.api.data.type;
26+
27+
import org.spongepowered.api.ResourceKey;
28+
import org.spongepowered.api.Sponge;
29+
import org.spongepowered.api.registry.DefaultedRegistryReference;
30+
import org.spongepowered.api.registry.RegistryKey;
31+
import org.spongepowered.api.registry.RegistryTypes;
32+
33+
/**
34+
* <!-- This file is automatically generated. Any manual changes will be overwritten. -->
35+
*/
36+
public class AxolotlVariants {
37+
38+
public static final DefaultedRegistryReference<AxolotlVariant> BLUE = AxolotlVariants.key(ResourceKey.sponge("blue"));
39+
40+
public static final DefaultedRegistryReference<AxolotlVariant> CYAN = AxolotlVariants.key(ResourceKey.sponge("cyan"));
41+
42+
public static final DefaultedRegistryReference<AxolotlVariant> GOLD = AxolotlVariants.key(ResourceKey.sponge("gold"));
43+
44+
public static final DefaultedRegistryReference<AxolotlVariant> LUCY = AxolotlVariants.key(ResourceKey.sponge("lucy"));
45+
46+
public static final DefaultedRegistryReference<AxolotlVariant> WILD = AxolotlVariants.key(ResourceKey.sponge("wild"));
47+
48+
49+
private static DefaultedRegistryReference<AxolotlVariant> key(final ResourceKey location) {
50+
return RegistryKey.of(RegistryTypes.AXOLOTL_VARIANT, location).asDefaultedReference(Sponge::game);
51+
}
52+
53+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* This file is part of SpongeAPI, licensed under the MIT License (MIT).
3+
*
4+
* Copyright (c) SpongePowered <https://www.spongepowered.org>
5+
* Copyright (c) contributors
6+
*
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy
8+
* of this software and associated documentation files (the "Software"), to deal
9+
* in the Software without restriction, including without limitation the rights
10+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
* copies of the Software, and to permit persons to whom the Software is
12+
* furnished to do so, subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in
15+
* all copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23+
* THE SOFTWARE.
24+
*/
25+
package org.spongepowered.api.data.type;
26+
27+
import org.spongepowered.api.registry.DefaultedRegistryValue;
28+
import org.spongepowered.api.util.annotation.CatalogedBy;
29+
30+
@CatalogedBy(SalmonSizes.class)
31+
public interface SalmonSize extends DefaultedRegistryValue, StringRepresentable {
32+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/*
2+
* This file is part of SpongeAPI, licensed under the MIT License (MIT).
3+
*
4+
* Copyright (c) SpongePowered <https://www.spongepowered.org>
5+
* Copyright (c) contributors
6+
*
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy
8+
* of this software and associated documentation files (the "Software"), to deal
9+
* in the Software without restriction, including without limitation the rights
10+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
* copies of the Software, and to permit persons to whom the Software is
12+
* furnished to do so, subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in
15+
* all copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23+
* THE SOFTWARE.
24+
*/
25+
package org.spongepowered.api.data.type;
26+
27+
import org.spongepowered.api.ResourceKey;
28+
import org.spongepowered.api.Sponge;
29+
import org.spongepowered.api.registry.DefaultedRegistryReference;
30+
import org.spongepowered.api.registry.RegistryKey;
31+
import org.spongepowered.api.registry.RegistryTypes;
32+
33+
/**
34+
* <!-- This file is automatically generated. Any manual changes will be overwritten. -->
35+
*/
36+
public final class SalmonSizes {
37+
38+
public static final DefaultedRegistryReference<SalmonSize> LARGE = SalmonSizes.key(ResourceKey.sponge("large"));
39+
40+
public static final DefaultedRegistryReference<SalmonSize> MEDIUM = SalmonSizes.key(ResourceKey.sponge("medium"));
41+
42+
public static final DefaultedRegistryReference<SalmonSize> SMALL = SalmonSizes.key(ResourceKey.sponge("small"));
43+
44+
private static DefaultedRegistryReference<SalmonSize> key(ResourceKey key) {
45+
return RegistryKey.of(RegistryTypes.SALMON_SIZE, key).asDefaultedReference(Sponge::game);
46+
}
47+
}

src/main/java/org/spongepowered/api/entity/living/animal/Axolotl.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,23 @@
2424
*/
2525
package org.spongepowered.api.entity.living.animal;
2626

27+
import org.spongepowered.api.data.Keys;
28+
import org.spongepowered.api.data.type.AxolotlVariant;
29+
import org.spongepowered.api.data.value.Value;
30+
2731
/**
2832
* Represents an Axolotl.
2933
*/
3034
public interface Axolotl extends Animal {
35+
36+
/**
37+
* Gets the {@link AxolotlVariant} of this Axolotl. Can be
38+
* set back.
39+
*
40+
* @see org.spongepowered.api.data.type.AxolotlVariants
41+
* @return The AxolotlVariant of this Axolotl.
42+
*/
43+
default Value<AxolotlVariant> variant() {
44+
return this.requireValue(Keys.AXOLOTL_VARIANT);
45+
}
3146
}

src/main/java/org/spongepowered/api/entity/living/aquatic/fish/school/Salmon.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,14 @@
2424
*/
2525
package org.spongepowered.api.entity.living.aquatic.fish.school;
2626

27+
import org.spongepowered.api.data.Keys;
28+
import org.spongepowered.api.data.type.SalmonSize;
29+
import org.spongepowered.api.data.value.Value;
30+
2731
public interface Salmon extends SchoolingFish {
32+
33+
default Value.Mutable<SalmonSize> size() {
34+
return this.requireValue(Keys.SALMON_SIZE).asMutable();
35+
}
36+
2837
}

src/main/java/org/spongepowered/api/entity/living/monster/Creaking.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,13 @@
2727
import org.spongepowered.api.data.Keys;
2828
import org.spongepowered.api.data.value.Value;
2929
import org.spongepowered.api.entity.living.Monster;
30-
import org.spongepowered.api.util.annotation.Experimental;
3130
import org.spongepowered.math.vector.Vector3i;
3231

3332
import java.util.Optional;
3433

3534
/**
3635
* A Creaking is a type of monster that originates from the {@link org.spongepowered.api.world.biome.Biomes#PALE_GARDEN}
3736
*/
38-
@Experimental("winter_drop")
3937
public interface Creaking extends Monster {
4038

4139
default Optional<Value.Mutable<Vector3i>> homePosition() {

src/main/java/org/spongepowered/api/registry/RegistryTypes.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
import org.spongepowered.api.data.type.ArmorMaterial;
4747
import org.spongepowered.api.data.type.ArtType;
4848
import org.spongepowered.api.data.type.AttachmentSurface;
49+
import org.spongepowered.api.data.type.AxolotlVariant;
4950
import org.spongepowered.api.data.type.BambooLeavesType;
5051
import org.spongepowered.api.data.type.BannerPatternShape;
5152
import org.spongepowered.api.data.type.BellAttachmentType;
@@ -81,6 +82,7 @@
8182
import org.spongepowered.api.data.type.RabbitType;
8283
import org.spongepowered.api.data.type.RaidStatus;
8384
import org.spongepowered.api.data.type.RailDirection;
85+
import org.spongepowered.api.data.type.SalmonSize;
8486
import org.spongepowered.api.data.type.SculkSensorState;
8587
import org.spongepowered.api.data.type.SkinPart;
8688
import org.spongepowered.api.data.type.SlabPortion;
@@ -204,6 +206,8 @@ public final class RegistryTypes {
204206

205207
public static final DefaultedRegistryType<AttributeType> ATTRIBUTE_TYPE = RegistryTypes.minecraftKeyInGame("attribute");
206208

209+
public static final DefaultedRegistryType<AxolotlVariant> AXOLOTL_VARIANT = RegistryTypes.spongeKeyInGame("axolotl_variant");
210+
207211
public static final DefaultedRegistryType<Biome> BIOME = RegistryTypes.minecraftKeyInServer("worldgen/biome");
208212

209213
public static final DefaultedRegistryType<BlockType> BLOCK_TYPE = RegistryTypes.minecraftKeyInGame("block");
@@ -473,6 +477,8 @@ public final class RegistryTypes {
473477

474478
public static final DefaultedRegistryType<Rotation> ROTATION = RegistryTypes.spongeKeyInGame("rotation");
475479

480+
public static final DefaultedRegistryType<SalmonSize> SALMON_SIZE = RegistryTypes.spongeKeyInGame("salmon_size");
481+
476482
public static final DefaultedRegistryType<SculkSensorState> SCULK_SENSOR_STATE = RegistryTypes.spongeKeyInGame("sculk_sensor_state");
477483

478484
public static final DefaultedRegistryType<SelectorSortAlgorithm> SELECTOR_SORT_ALGORITHM = RegistryTypes.spongeKeyInGame("selector_sort_algorithm");

0 commit comments

Comments
 (0)