diff --git a/src/main/java/org/spongepowered/api/entity/EntityTypes.java b/src/main/java/org/spongepowered/api/entity/EntityTypes.java index 6c629b4776..e740127fb9 100644 --- a/src/main/java/org/spongepowered/api/entity/EntityTypes.java +++ b/src/main/java/org/spongepowered/api/entity/EntityTypes.java @@ -38,7 +38,6 @@ import org.spongepowered.api.entity.living.Allay; import org.spongepowered.api.entity.living.ArmorStand; import org.spongepowered.api.entity.living.Bat; -import org.spongepowered.api.entity.living.Human; import org.spongepowered.api.entity.living.animal.Armadillo; import org.spongepowered.api.entity.living.animal.Axolotl; import org.spongepowered.api.entity.living.animal.Bee; @@ -302,8 +301,6 @@ public final class EntityTypes { public static final DefaultedRegistryReference> HORSE = EntityTypes.key(ResourceKey.minecraft("horse")); - public static final DefaultedRegistryReference> HUMAN = EntityTypes.key(ResourceKey.sponge("human")); - public static final DefaultedRegistryReference> HUSK = EntityTypes.key(ResourceKey.minecraft("husk")); public static final DefaultedRegistryReference> ILLUSIONER = EntityTypes.key(ResourceKey.minecraft("illusioner")); diff --git a/src/main/java/org/spongepowered/api/entity/Mannequin.java b/src/main/java/org/spongepowered/api/entity/Mannequin.java index ca02b9dc56..94f228c8e9 100644 --- a/src/main/java/org/spongepowered/api/entity/Mannequin.java +++ b/src/main/java/org/spongepowered/api/entity/Mannequin.java @@ -24,19 +24,7 @@ */ package org.spongepowered.api.entity; -import org.spongepowered.api.data.Keys; -import org.spongepowered.api.data.type.HandPreference; -import org.spongepowered.api.data.value.Value; -import org.spongepowered.api.entity.living.Living; +import org.spongepowered.api.entity.living.Humanoid; -public interface Mannequin extends Living { - - /** - * {@link Keys#DOMINANT_HAND} - * - * @return The dominant HandPreference of the player - */ - default Value.Mutable dominantHand() { - return this.requireValue(Keys.DOMINANT_HAND).asMutable(); - } +public interface Mannequin extends Humanoid { } diff --git a/src/main/java/org/spongepowered/api/entity/living/Human.java b/src/main/java/org/spongepowered/api/entity/living/Human.java deleted file mode 100644 index fc870ae6ed..0000000000 --- a/src/main/java/org/spongepowered/api/entity/living/Human.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * This file is part of SpongeAPI, licensed under the MIT License (MIT). - * - * Copyright (c) SpongePowered - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package org.spongepowered.api.entity.living; - -import java.util.UUID; - -public interface Human extends Humanoid, PathfinderAgent, RangedAgent { - - /** - * Sets the appearance "skin" of this human to the appearance used by a real - * Mojang account holder's current skin based on their {@link UUID unique id} - * assigned to them at account creation in Mojang's auth services. - * - *

This can also have additional rendering effects on an official Minecraft - * client based on the Mojang account holder (if they are considered a special - * "individual")

- * - *

Providing a unique id that isn't a real account has no defined handling - * by this API. Consult your implementation vendor to determine what will - * happen. Additionally the result is also left up to the vendor to define.

- * - * @param minecraftAccount The unique id to use - * @return True if successful, false if not - */ - boolean useSkinFor(UUID minecraftAccount); - - /** - * Sets the appearance "skin" of this human to the appearance used by a real - * Mojang account holder's current skin based on their {@link String username}. - * - *

This will trigger a request to Mojang's authentication servers to determine - * their account's {@link UUID unique id} should the server not have that - * already cached.

- * - *

This can also have additional rendering effects on an official Minecraft - * client based on the Mojang account holder (if they are considered a special - * "individual")

- * - *

Providing a username that isn't a real account has no defined handling - * by this API. Consult your implementation vendor to determine what will - * happen. Additionally the result is also left up to the vendor to define.

- * - * @param minecraftUsername The username to use - * @return True if successful, false if not - */ - boolean useSkinFor(String minecraftUsername); -} diff --git a/src/main/java/org/spongepowered/api/entity/living/Humanoid.java b/src/main/java/org/spongepowered/api/entity/living/Humanoid.java index b28e9ffbb3..7e2bc9014b 100644 --- a/src/main/java/org/spongepowered/api/entity/living/Humanoid.java +++ b/src/main/java/org/spongepowered/api/entity/living/Humanoid.java @@ -25,16 +25,26 @@ package org.spongepowered.api.entity.living; import org.spongepowered.api.data.Keys; +import org.spongepowered.api.data.type.HandPreference; import org.spongepowered.api.data.value.Value; -import org.spongepowered.api.entity.Tamer; +import org.spongepowered.api.entity.Mannequin; import org.spongepowered.api.entity.living.player.Player; import org.spongepowered.api.item.inventory.ArmorEquipable; import org.spongepowered.api.profile.property.ProfileProperty; /** - * Represents a human-like entity in game, such as {@link Player} or {@link Human}s. + * Represents a human-like entity in game, such as {@link Player} or {@link Mannequin}s. */ -public interface Humanoid extends Living, ArmorEquipable, Tamer { +public interface Humanoid extends Living, ArmorEquipable { + + /** + * {@link Keys#DOMINANT_HAND} + * + * @return The dominant HandPreference of the humanoid + */ + default Value.Mutable dominantHand() { + return this.requireValue(Keys.DOMINANT_HAND).asMutable(); + } /** * {@link Keys#SKIN_PROFILE_PROPERTY} diff --git a/src/main/java/org/spongepowered/api/entity/living/player/Player.java b/src/main/java/org/spongepowered/api/entity/living/player/Player.java index 9c4d1934a1..50ea2e04fb 100644 --- a/src/main/java/org/spongepowered/api/entity/living/player/Player.java +++ b/src/main/java/org/spongepowered/api/entity/living/player/Player.java @@ -28,10 +28,10 @@ import net.kyori.adventure.identity.Identified; import org.spongepowered.api.block.entity.EnderChest; import org.spongepowered.api.data.Keys; -import org.spongepowered.api.data.type.HandPreference; import org.spongepowered.api.data.value.Value; import org.spongepowered.api.effect.Viewer; import org.spongepowered.api.entity.Aerial; +import org.spongepowered.api.entity.Tamer; import org.spongepowered.api.entity.living.Humanoid; import org.spongepowered.api.item.inventory.Carrier; import org.spongepowered.api.item.inventory.Inventory; @@ -42,7 +42,7 @@ /** * A Player is the representation of an actual unit playing the game. */ -public interface Player extends Humanoid, Identified, LocaleSource, Viewer, BossBarViewer, Carrier, Aerial { +public interface Player extends Humanoid, Identified, LocaleSource, Viewer, BossBarViewer, Carrier, Tamer, Aerial { /** * Gets the associated {@link GameProfile} of this player. @@ -85,15 +85,6 @@ default Value.Mutable canFly() { return this.requireValue(Keys.CAN_FLY).asMutable(); } - /** - * {@link Keys#DOMINANT_HAND} - * - * @return The dominant HandPreference of the player - */ - default Value.Mutable dominantHand() { - return this.requireValue(Keys.DOMINANT_HAND).asMutable(); - } - /** * {@link Keys#EXHAUSTION} *