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.entity.types;
019
020/**
021 * The types of entities that are possible to be in Minecraft, they populate the world, whether being a mob, animal,
022 * player, dropped items, or item frames.
023 *
024 * @author The TridentSDK Team
025 * @since 0.3-alpha-DP
026 */
027public enum EntityType {
028    NOT_IMPL(-1),
029    CREEPER(50),
030    BAT(65),
031    BLAZE(61),
032    CHICKEN(93),
033    COW(92),
034    ENDER_DRAGON(63),
035    ENDERMAN(58),
036    ENDERMITE(67),
037    GHAST(56),
038    HORSE(100),
039    MAGMA_CUBE(62),
040    MOOSHROOM(96),
041    OCELOT(98),
042    PIG(90),
043    GUARDIAN(68),
044    PLAYER(-1),
045    RABBIT(101),
046    SHEEP(91),
047    SKELETON(51),
048    SLIME(55),
049    VILLAGER(120),
050    WITHER(64),
051    WOLF(95),
052    ZOMBIE(54),
053    ARMOR_STAND(78),
054    FALLING_BLOCK(70), // objects
055    ITEM_FRAME(71),
056    PAINTING(-1), // what?
057    PRIMED_TNT(50),
058    ARROW(60),
059    EGG(62),
060    ENDER_PEARL(65),
061    EXPERIENCE_BOTTLE(75),
062    FIREBALL(63),
063    FISH_HOOK(90),
064    POTION(73),
065    SMALL_FIREBALL(64), // firecharge...?
066    SNOWBALL(61),
067    WITHER_SKULL(66),
068    BOAT(1),
069    COMMAND_MINECART(10),
070    FURNANCE_MINECART(10),
071    HOPPER_MINECART(10),
072    MINECART(10),
073    SPAWNER_MINECART(10),
074    TNT_MINECART(10),
075    ITEM(2),
076    EXPERIENCE_ORB(-1), // ?
077    FIREWORK(76);
078    // TODO: Finish/check this enum
079
080    private final int id;
081
082    EntityType(int id) {
083        this.id = id;
084    }
085
086    /**
087     * Obtains the entity ID as a byte
088     *
089     * @return a byte representing the entity ID
090     */
091    public byte asByte() {
092        return (byte) this.id;
093    }
094}