Skip to content

Commit c315763

Browse files
committed
feat(content): add Nautilus and related content
- Introduced `Nautilus`, `Zombie Nautilus`, and `NautilusLike` entities. - Added new sound types, tags, potion effects, damage types, and enchantments associated with Nautilus. - Included Nautilus armors, spears, spawn eggs, and taming items. BREAKING: - Keys.ANGER_LEVEL now returns a Long instead of an Integer See: https://minecraft.wiki/w/Java_Edition_25w41a
1 parent c84b850 commit c315763

File tree

16 files changed

+236
-4
lines changed

16 files changed

+236
-4
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ public final class Keys {
407407
* fade over time and the entity will become peaceful again once its anger
408408
* reaches its minimum.</p>
409409
*/
410-
public static final Key<Value<Integer>> ANGER_LEVEL = Keys.key(ResourceKey.sponge("anger_level"), Integer.class);
410+
public static final Key<Value<Long>> ANGER_LEVEL = Keys.key(ResourceKey.sponge("anger_level"), Long.class);
411411

412412
/**
413413
* The set of {@link PotionEffect}s applied on use of an {@link ItemStack}.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@
3131
* Represents a possible type of {@link ItemAction}.
3232
*/
3333
@CatalogedBy(ItemActionTypes.class)
34-
public interface ItemActionType extends DefaultedRegistryValue {
34+
public interface ItemActionType extends DefaultedRegistryValue<ItemActionType> {
3535
}

src/main/java/org/spongepowered/api/effect/potion/PotionEffectTypes.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ public final class PotionEffectTypes {
4646

4747
public static final DefaultedRegistryReference<PotionEffectType> BLINDNESS = PotionEffectTypes.key(ResourceKey.minecraft("blindness"));
4848

49+
public static final DefaultedRegistryReference<PotionEffectType> BREATH_OF_THE_NAUTILUS = PotionEffectTypes.key(ResourceKey.minecraft("breath_of_the_nautilus"));
50+
4951
public static final DefaultedRegistryReference<PotionEffectType> CONDUIT_POWER = PotionEffectTypes.key(ResourceKey.minecraft("conduit_power"));
5052

5153
public static final DefaultedRegistryReference<PotionEffectType> DARKNESS = PotionEffectTypes.key(ResourceKey.minecraft("darkness"));

src/main/java/org/spongepowered/api/effect/sound/SoundTypes.java

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1756,6 +1756,16 @@ public final class SoundTypes {
17561756

17571757
public static final DefaultedRegistryReference<SoundType> ENTITY_AXOLOTL_SWIM = SoundTypes.key(ResourceKey.minecraft("entity.axolotl.swim"));
17581758

1759+
public static final DefaultedRegistryReference<SoundType> ENTITY_BABY_NAUTILUS_AMBIENT = SoundTypes.key(ResourceKey.minecraft("entity.baby_nautilus.ambient"));
1760+
1761+
public static final DefaultedRegistryReference<SoundType> ENTITY_BABY_NAUTILUS_DEATH = SoundTypes.key(ResourceKey.minecraft("entity.baby_nautilus.death"));
1762+
1763+
public static final DefaultedRegistryReference<SoundType> ENTITY_BABY_NAUTILUS_EAT = SoundTypes.key(ResourceKey.minecraft("entity.baby_nautilus.eat"));
1764+
1765+
public static final DefaultedRegistryReference<SoundType> ENTITY_BABY_NAUTILUS_HURT = SoundTypes.key(ResourceKey.minecraft("entity.baby_nautilus.hurt"));
1766+
1767+
public static final DefaultedRegistryReference<SoundType> ENTITY_BABY_NAUTILUS_SWIM = SoundTypes.key(ResourceKey.minecraft("entity.baby_nautilus.swim"));
1768+
17591769
public static final DefaultedRegistryReference<SoundType> ENTITY_BAT_AMBIENT = SoundTypes.key(ResourceKey.minecraft("entity.bat.ambient"));
17601770

17611771
public static final DefaultedRegistryReference<SoundType> ENTITY_BAT_DEATH = SoundTypes.key(ResourceKey.minecraft("entity.bat.death"));
@@ -2456,6 +2466,20 @@ public final class SoundTypes {
24562466

24572467
public static final DefaultedRegistryReference<SoundType> ENTITY_MULE_JUMP = SoundTypes.key(ResourceKey.minecraft("entity.mule.jump"));
24582468

2469+
public static final DefaultedRegistryReference<SoundType> ENTITY_NAUTILUS_AMBIENT = SoundTypes.key(ResourceKey.minecraft("entity.nautilus.ambient"));
2470+
2471+
public static final DefaultedRegistryReference<SoundType> ENTITY_NAUTILUS_DASH = SoundTypes.key(ResourceKey.minecraft("entity.nautilus.dash"));
2472+
2473+
public static final DefaultedRegistryReference<SoundType> ENTITY_NAUTILUS_DASH_READY = SoundTypes.key(ResourceKey.minecraft("entity.nautilus.dash_ready"));
2474+
2475+
public static final DefaultedRegistryReference<SoundType> ENTITY_NAUTILUS_DEATH = SoundTypes.key(ResourceKey.minecraft("entity.nautilus.death"));
2476+
2477+
public static final DefaultedRegistryReference<SoundType> ENTITY_NAUTILUS_EAT = SoundTypes.key(ResourceKey.minecraft("entity.nautilus.eat"));
2478+
2479+
public static final DefaultedRegistryReference<SoundType> ENTITY_NAUTILUS_HURT = SoundTypes.key(ResourceKey.minecraft("entity.nautilus.hurt"));
2480+
2481+
public static final DefaultedRegistryReference<SoundType> ENTITY_NAUTILUS_SWIM = SoundTypes.key(ResourceKey.minecraft("entity.nautilus.swim"));
2482+
24592483
public static final DefaultedRegistryReference<SoundType> ENTITY_OCELOT_AMBIENT = SoundTypes.key(ResourceKey.minecraft("entity.ocelot.ambient"));
24602484

24612485
public static final DefaultedRegistryReference<SoundType> ENTITY_OCELOT_DEATH = SoundTypes.key(ResourceKey.minecraft("entity.ocelot.death"));
@@ -3210,6 +3234,8 @@ public final class SoundTypes {
32103234

32113235
public static final DefaultedRegistryReference<SoundType> ENTITY_ZOMBIE_HORSE_AMBIENT = SoundTypes.key(ResourceKey.minecraft("entity.zombie_horse.ambient"));
32123236

3237+
public static final DefaultedRegistryReference<SoundType> ENTITY_ZOMBIE_HORSE_ANGRY = SoundTypes.key(ResourceKey.minecraft("entity.zombie_horse.angry"));
3238+
32133239
public static final DefaultedRegistryReference<SoundType> ENTITY_ZOMBIE_HORSE_DEATH = SoundTypes.key(ResourceKey.minecraft("entity.zombie_horse.death"));
32143240

32153241
public static final DefaultedRegistryReference<SoundType> ENTITY_ZOMBIE_HORSE_HURT = SoundTypes.key(ResourceKey.minecraft("entity.zombie_horse.hurt"));
@@ -3218,6 +3244,20 @@ public final class SoundTypes {
32183244

32193245
public static final DefaultedRegistryReference<SoundType> ENTITY_ZOMBIE_INFECT = SoundTypes.key(ResourceKey.minecraft("entity.zombie.infect"));
32203246

3247+
public static final DefaultedRegistryReference<SoundType> ENTITY_ZOMBIE_NAUTILUS_AMBIENT = SoundTypes.key(ResourceKey.minecraft("entity.zombie_nautilus.ambient"));
3248+
3249+
public static final DefaultedRegistryReference<SoundType> ENTITY_ZOMBIE_NAUTILUS_DASH = SoundTypes.key(ResourceKey.minecraft("entity.zombie_nautilus.dash"));
3250+
3251+
public static final DefaultedRegistryReference<SoundType> ENTITY_ZOMBIE_NAUTILUS_DASH_READY = SoundTypes.key(ResourceKey.minecraft("entity.zombie_nautilus.dash_ready"));
3252+
3253+
public static final DefaultedRegistryReference<SoundType> ENTITY_ZOMBIE_NAUTILUS_DEATH = SoundTypes.key(ResourceKey.minecraft("entity.zombie_nautilus.death"));
3254+
3255+
public static final DefaultedRegistryReference<SoundType> ENTITY_ZOMBIE_NAUTILUS_EAT = SoundTypes.key(ResourceKey.minecraft("entity.zombie_nautilus.eat"));
3256+
3257+
public static final DefaultedRegistryReference<SoundType> ENTITY_ZOMBIE_NAUTILUS_HURT = SoundTypes.key(ResourceKey.minecraft("entity.zombie_nautilus.hurt"));
3258+
3259+
public static final DefaultedRegistryReference<SoundType> ENTITY_ZOMBIE_NAUTILUS_SWIM = SoundTypes.key(ResourceKey.minecraft("entity.zombie_nautilus.swim"));
3260+
32213261
public static final DefaultedRegistryReference<SoundType> ENTITY_ZOMBIE_STEP = SoundTypes.key(ResourceKey.minecraft("entity.zombie.step"));
32223262

32233263
public static final DefaultedRegistryReference<SoundType> ENTITY_ZOMBIE_VILLAGER_AMBIENT = SoundTypes.key(ResourceKey.minecraft("entity.zombie_villager.ambient"));
@@ -3266,12 +3306,16 @@ public final class SoundTypes {
32663306

32673307
public static final DefaultedRegistryReference<SoundType> ITEM_ARMOR_EQUIP_LEATHER = SoundTypes.key(ResourceKey.minecraft("item.armor.equip_leather"));
32683308

3309+
public static final DefaultedRegistryReference<SoundType> ITEM_ARMOR_EQUIP_NAUTILUS = SoundTypes.key(ResourceKey.minecraft("item.armor.equip_nautilus"));
3310+
32693311
public static final DefaultedRegistryReference<SoundType> ITEM_ARMOR_EQUIP_NETHERITE = SoundTypes.key(ResourceKey.minecraft("item.armor.equip_netherite"));
32703312

32713313
public static final DefaultedRegistryReference<SoundType> ITEM_ARMOR_EQUIP_TURTLE = SoundTypes.key(ResourceKey.minecraft("item.armor.equip_turtle"));
32723314

32733315
public static final DefaultedRegistryReference<SoundType> ITEM_ARMOR_EQUIP_WOLF = SoundTypes.key(ResourceKey.minecraft("item.armor.equip_wolf"));
32743316

3317+
public static final DefaultedRegistryReference<SoundType> ITEM_ARMOR_UNEQUIP_NAUTILUS = SoundTypes.key(ResourceKey.minecraft("item.armor.unequip_nautilus"));
3318+
32753319
public static final DefaultedRegistryReference<SoundType> ITEM_ARMOR_UNEQUIP_WOLF = SoundTypes.key(ResourceKey.minecraft("item.armor.unequip_wolf"));
32763320

32773321
public static final DefaultedRegistryReference<SoundType> ITEM_AXE_SCRAPE = SoundTypes.key(ResourceKey.minecraft("item.axe.scrape"));
@@ -3420,6 +3464,24 @@ public final class SoundTypes {
34203464

34213465
public static final DefaultedRegistryReference<SoundType> ITEM_SHOVEL_FLATTEN = SoundTypes.key(ResourceKey.minecraft("item.shovel.flatten"));
34223466

3467+
public static final DefaultedRegistryReference<SoundType> ITEM_SPEAR_ATTACK = SoundTypes.key(ResourceKey.minecraft("item.spear.attack"));
3468+
3469+
public static final DefaultedRegistryReference<SoundType> ITEM_SPEAR_HIT = SoundTypes.key(ResourceKey.minecraft("item.spear.hit"));
3470+
3471+
public static final DefaultedRegistryReference<SoundType> ITEM_SPEAR_LUNGE_1 = SoundTypes.key(ResourceKey.minecraft("item.spear.lunge_1"));
3472+
3473+
public static final DefaultedRegistryReference<SoundType> ITEM_SPEAR_LUNGE_2 = SoundTypes.key(ResourceKey.minecraft("item.spear.lunge_2"));
3474+
3475+
public static final DefaultedRegistryReference<SoundType> ITEM_SPEAR_LUNGE_3 = SoundTypes.key(ResourceKey.minecraft("item.spear.lunge_3"));
3476+
3477+
public static final DefaultedRegistryReference<SoundType> ITEM_SPEAR_USE = SoundTypes.key(ResourceKey.minecraft("item.spear.use"));
3478+
3479+
public static final DefaultedRegistryReference<SoundType> ITEM_SPEAR_WOOD_ATTACK = SoundTypes.key(ResourceKey.minecraft("item.spear_wood.attack"));
3480+
3481+
public static final DefaultedRegistryReference<SoundType> ITEM_SPEAR_WOOD_HIT = SoundTypes.key(ResourceKey.minecraft("item.spear_wood.hit"));
3482+
3483+
public static final DefaultedRegistryReference<SoundType> ITEM_SPEAR_WOOD_USE = SoundTypes.key(ResourceKey.minecraft("item.spear_wood.use"));
3484+
34233485
public static final DefaultedRegistryReference<SoundType> ITEM_SPYGLASS_STOP_USING = SoundTypes.key(ResourceKey.minecraft("item.spyglass.stop_using"));
34243486

34253487
public static final DefaultedRegistryReference<SoundType> ITEM_SPYGLASS_USE = SoundTypes.key(ResourceKey.minecraft("item.spyglass.use"));

src/main/java/org/spongepowered/api/entity/Angerable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ default Value.Mutable<Boolean> angry() {
4343
*
4444
* @return The anger level, decays over time
4545
*/
46-
default Value.Mutable<Integer> angerLevel() {
46+
default Value.Mutable<Long> angerLevel() {
4747
return this.requireValue(Keys.ANGER_LEVEL).asMutable();
4848
}
4949
}

src/main/java/org/spongepowered/api/entity/EntityTypes.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
import org.spongepowered.api.entity.living.animal.Goat;
4949
import org.spongepowered.api.entity.living.animal.HappyGhast;
5050
import org.spongepowered.api.entity.living.animal.Hoglin;
51+
import org.spongepowered.api.entity.living.animal.Nautilus;
5152
import org.spongepowered.api.entity.living.animal.Ocelot;
5253
import org.spongepowered.api.entity.living.animal.Panda;
5354
import org.spongepowered.api.entity.living.animal.Parrot;
@@ -59,6 +60,7 @@
5960
import org.spongepowered.api.entity.living.animal.Strider;
6061
import org.spongepowered.api.entity.living.animal.Turtle;
6162
import org.spongepowered.api.entity.living.animal.Wolf;
63+
import org.spongepowered.api.entity.living.animal.ZombieNautilus;
6264
import org.spongepowered.api.entity.living.animal.cow.Cow;
6365
import org.spongepowered.api.entity.living.animal.cow.Mooshroom;
6466
import org.spongepowered.api.entity.living.animal.frog.Frog;
@@ -348,6 +350,8 @@ public final class EntityTypes {
348350

349351
public static final DefaultedRegistryReference<EntityType<Mule>> MULE = EntityTypes.key(ResourceKey.minecraft("mule"));
350352

353+
public static final DefaultedRegistryReference<EntityType<Nautilus>> NAUTILUS = EntityTypes.key(ResourceKey.minecraft("nautilus"));
354+
351355
public static final DefaultedRegistryReference<EntityType<Boat>> OAK_BOAT = EntityTypes.key(ResourceKey.minecraft("oak_boat"));
352356

353357
public static final DefaultedRegistryReference<EntityType<ChestBoat>> OAK_CHEST_BOAT = EntityTypes.key(ResourceKey.minecraft("oak_chest_boat"));
@@ -472,6 +476,8 @@ public final class EntityTypes {
472476

473477
public static final DefaultedRegistryReference<EntityType<ZombieHorse>> ZOMBIE_HORSE = EntityTypes.key(ResourceKey.minecraft("zombie_horse"));
474478

479+
public static final DefaultedRegistryReference<EntityType<ZombieNautilus>> ZOMBIE_NAUTILUS = EntityTypes.key(ResourceKey.minecraft("zombie_nautilus"));
480+
475481
public static final DefaultedRegistryReference<EntityType<ZombieVillager>> ZOMBIE_VILLAGER = EntityTypes.key(ResourceKey.minecraft("zombie_villager"));
476482

477483
public static final DefaultedRegistryReference<EntityType<ZombifiedPiglin>> ZOMBIFIED_PIGLIN = EntityTypes.key(ResourceKey.minecraft("zombified_piglin"));
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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.entity.living.animal;
26+
27+
/**
28+
* A friendly {@link NautilusLike} entity.
29+
* <p>
30+
* See <a href="https://minecraft.wiki/w/Nautilus">Minecraft Wiki</a>
31+
*/
32+
public interface Nautilus extends NautilusLike {
33+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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.entity.living.animal;
26+
27+
/**
28+
* Represents a Nautilus-like entity, all of which can be mounted.
29+
* <p>
30+
* See <a href="https://minecraft.wiki/w/Nautilus">Minecraft Wiki</a>
31+
*/
32+
public interface NautilusLike extends TameableAnimal {
33+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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.entity.living.animal;
26+
27+
/**
28+
* Represents a Zombie Nautilus.
29+
* <p>
30+
* See <a href="https://minecraft.wiki/w/Zombie_Nautilus">Minecraft Wiki</a>
31+
*/
32+
public interface ZombieNautilus extends NautilusLike {
33+
34+
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ public final class DamageTypes {
114114

115115
public static final DefaultedRegistryReference<DamageType> SONIC_BOOM = DamageTypes.key(ResourceKey.minecraft("sonic_boom"));
116116

117+
public static final DefaultedRegistryReference<DamageType> SPEAR = DamageTypes.key(ResourceKey.minecraft("spear"));
118+
117119
public static final DefaultedRegistryReference<DamageType> SPIT = DamageTypes.key(ResourceKey.minecraft("spit"));
118120

119121
public static final DefaultedRegistryReference<DamageType> STALAGMITE = DamageTypes.key(ResourceKey.minecraft("stalagmite"));

0 commit comments

Comments
 (0)