001/*
002 * Trident - A Multithreaded Server Alternative
003 * Copyright 2014 The TridentSDK Team
004 *
005 * Licensed under the Apache License, Version 2.0 (the "License");
006 * you may not use this file except in compliance with the License.
007 * You may obtain a copy of the License at
008 *
009 *    http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017
018package net.tridentsdk.server.entity;
019
020/**
021 * Enum to state entity status in PacketPlayOutEntityStatus
022 *
023 * @author The TridentSDK Team
024 * @see net.tridentsdk.server.packets.play.out.PacketPlayOutEntityStatus
025 */
026public enum EntityStatus {
027    /**
028     * Entity has been hurt
029     */
030    ENTITY_HURT(2),
031    /**
032     * Entity has died
033     */
034    ENTITY_DEAD(3),
035    /**
036     * An Iron Golem smashes an (unfortunate) mob
037     */
038    GOLEM_MASH(4),
039    /**
040     * A wolf is being tamed
041     */
042    ANIMAL_TAMING(6),
043    /**
044     * A wolf that has been tamed
045     */
046    ANIMAL_TAMED(7),
047    /**
048     * A wolf that is shaking water off
049     */
050    WOLF_SHAKING(8),
051    /**
052     * Occurs after food is consumed
053     */
054    EATING_ACCEPTED(9),
055    /**
056     * Sheep bends down to eat grass
057     */
058    SHEEP_EAT(10),
059    /**
060     * An Iron Golem picks an entity up
061     */
062    GOLEM_HANDLING(11),
063    /**
064     * A villager mates
065     */
066    VILLAGER_MATING(12),
067    /**
068     * A villager is displeased by something
069     */
070    VILLAGER_ANGRY(13),
071    /**
072     * The villager is pleased by something
073     */
074    VILLAGER_HAPPY(14),
075    /**
076     * Something the witch does
077     */
078    WITCH_ANIMATION(15),
079    /**
080     * When a villager-zombie is cured and turns back into a villager
081     */
082    ZOMBIE_SHAKE(16), // to indicate that the zombie is converting into a Villager
083    /**
084     * When a firework destroys itself and effects follow
085     */
086    FIREWORK_EXPLODE(17),
087    /**
088     * Animals like each other
089     */
090    ANIMAL_LOVE(18);
091
092    private final byte b;
093
094    EntityStatus(int i) {
095        this.b = (byte) i;
096    }
097
098    /**
099     * Gets the ID value representing the status
100     *
101     * @return the {@code byte} ID value
102     */
103    public byte asByte() {
104        return this.b;
105    }
106}