Search in sources :

Example 1 with HorseColorType

use of simplepets.brainsynder.wrapper.HorseColorType in project SimplePets by brainsynder-Dev.

the class HorseColor method getItem.

@Override
public ItemBuilder getItem() {
    ItemBuilder item = null;
    if (entityPet instanceof IEntityHorsePet) {
        IEntityHorsePet var = (IEntityHorsePet) entityPet;
        HorseColorType typeID = HorseColorType.WHITE;
        if (var.getColor() != null) {
            typeID = var.getColor();
        }
        switch(typeID) {
            case BLACK:
                item = type.getDataItemByName("horsecolor", 0);
                break;
            case CHESTNUT:
                item = type.getDataItemByName("horsecolor", 1);
                break;
            case CREAMY:
                item = type.getDataItemByName("horsecolor", 2);
                break;
            case BROWN:
                item = type.getDataItemByName("horsecolor", 3);
                break;
            case DARKBROWN:
                item = type.getDataItemByName("horsecolor", 4);
                break;
            case GRAY:
                item = type.getDataItemByName("horsecolor", 5);
                break;
            case WHITE:
                item = type.getDataItemByName("horsecolor", 6);
                break;
        }
    }
    return item;
}
Also used : ItemBuilder(simple.brainsynder.api.ItemBuilder) HorseColorType(simplepets.brainsynder.wrapper.HorseColorType) IEntityHorsePet(simplepets.brainsynder.api.entity.passive.IEntityHorsePet)

Aggregations

ItemBuilder (simple.brainsynder.api.ItemBuilder)1 IEntityHorsePet (simplepets.brainsynder.api.entity.passive.IEntityHorsePet)1 HorseColorType (simplepets.brainsynder.wrapper.HorseColorType)1