Skip to content

Commit 6164c4a

Browse files
committed
Remove Human in favor of Mannequin
1 parent a0493bd commit 6164c4a

File tree

5 files changed

+17
-100
lines changed

5 files changed

+17
-100
lines changed

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
import org.spongepowered.api.entity.living.Allay;
3939
import org.spongepowered.api.entity.living.ArmorStand;
4040
import org.spongepowered.api.entity.living.Bat;
41-
import org.spongepowered.api.entity.living.Human;
4241
import org.spongepowered.api.entity.living.animal.Armadillo;
4342
import org.spongepowered.api.entity.living.animal.Axolotl;
4443
import org.spongepowered.api.entity.living.animal.Bee;
@@ -302,8 +301,6 @@ public final class EntityTypes {
302301

303302
public static final DefaultedRegistryReference<EntityType<Horse>> HORSE = EntityTypes.key(ResourceKey.minecraft("horse"));
304303

305-
public static final DefaultedRegistryReference<EntityType<Human>> HUMAN = EntityTypes.key(ResourceKey.sponge("human"));
306-
307304
public static final DefaultedRegistryReference<EntityType<Husk>> HUSK = EntityTypes.key(ResourceKey.minecraft("husk"));
308305

309306
public static final DefaultedRegistryReference<EntityType<Illusioner>> ILLUSIONER = EntityTypes.key(ResourceKey.minecraft("illusioner"));

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

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,7 @@
2424
*/
2525
package org.spongepowered.api.entity;
2626

27-
import org.spongepowered.api.data.Keys;
28-
import org.spongepowered.api.data.type.HandPreference;
29-
import org.spongepowered.api.data.value.Value;
30-
import org.spongepowered.api.entity.living.Living;
27+
import org.spongepowered.api.entity.living.Humanoid;
3128

32-
public interface Mannequin extends Living {
33-
34-
/**
35-
* {@link Keys#DOMINANT_HAND}
36-
*
37-
* @return The dominant HandPreference of the player
38-
*/
39-
default Value.Mutable<HandPreference> dominantHand() {
40-
return this.requireValue(Keys.DOMINANT_HAND).asMutable();
41-
}
29+
public interface Mannequin extends Humanoid {
4230
}

src/main/java/org/spongepowered/api/entity/living/Human.java

Lines changed: 0 additions & 69 deletions
This file was deleted.

src/main/java/org/spongepowered/api/entity/living/Humanoid.java

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,26 @@
2525
package org.spongepowered.api.entity.living;
2626

2727
import org.spongepowered.api.data.Keys;
28+
import org.spongepowered.api.data.type.HandPreference;
2829
import org.spongepowered.api.data.value.Value;
29-
import org.spongepowered.api.entity.Tamer;
30+
import org.spongepowered.api.entity.Mannequin;
3031
import org.spongepowered.api.entity.living.player.Player;
3132
import org.spongepowered.api.item.inventory.ArmorEquipable;
3233
import org.spongepowered.api.profile.property.ProfileProperty;
3334

3435
/**
35-
* Represents a human-like entity in game, such as {@link Player} or {@link Human}s.
36+
* Represents a human-like entity in game, such as {@link Player} or {@link Mannequin}s.
3637
*/
37-
public interface Humanoid extends Living, ArmorEquipable, Tamer {
38+
public interface Humanoid extends Living, ArmorEquipable {
39+
40+
/**
41+
* {@link Keys#DOMINANT_HAND}
42+
*
43+
* @return The dominant HandPreference of the humanoid
44+
*/
45+
default Value.Mutable<HandPreference> dominantHand() {
46+
return this.requireValue(Keys.DOMINANT_HAND).asMutable();
47+
}
3848

3949
/**
4050
* {@link Keys#SKIN_PROFILE_PROPERTY}

src/main/java/org/spongepowered/api/entity/living/player/Player.java

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
import net.kyori.adventure.identity.Identified;
2929
import org.spongepowered.api.block.entity.EnderChest;
3030
import org.spongepowered.api.data.Keys;
31-
import org.spongepowered.api.data.type.HandPreference;
3231
import org.spongepowered.api.data.value.Value;
3332
import org.spongepowered.api.effect.Viewer;
3433
import org.spongepowered.api.entity.Aerial;
34+
import org.spongepowered.api.entity.Tamer;
3535
import org.spongepowered.api.entity.living.Humanoid;
3636
import org.spongepowered.api.item.inventory.Carrier;
3737
import org.spongepowered.api.item.inventory.Inventory;
@@ -42,7 +42,7 @@
4242
/**
4343
* A Player is the representation of an actual unit playing the game.
4444
*/
45-
public interface Player extends Humanoid, Identified, LocaleSource, Viewer, BossBarViewer, Carrier, Aerial {
45+
public interface Player extends Humanoid, Identified, LocaleSource, Viewer, BossBarViewer, Carrier, Tamer, Aerial {
4646

4747
/**
4848
* Gets the associated {@link GameProfile} of this player.
@@ -85,15 +85,6 @@ default Value.Mutable<Boolean> canFly() {
8585
return this.requireValue(Keys.CAN_FLY).asMutable();
8686
}
8787

88-
/**
89-
* {@link Keys#DOMINANT_HAND}
90-
*
91-
* @return The dominant HandPreference of the player
92-
*/
93-
default Value.Mutable<HandPreference> dominantHand() {
94-
return this.requireValue(Keys.DOMINANT_HAND).asMutable();
95-
}
96-
9788
/**
9889
* {@link Keys#EXHAUSTION}
9990
*

0 commit comments

Comments
 (0)