Search in sources :

Example 1 with HorseStyleType

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

the class HorseStyle method getItem.

@Override
public ItemBuilder getItem() {
    ItemBuilder item = type.getDataItemByName("horsestyle", 0);
    if (entityPet instanceof IEntityHorsePet) {
        IEntityHorsePet var = (IEntityHorsePet) entityPet;
        HorseStyleType typeID = HorseStyleType.NONE;
        if (var.getStyle() != null) {
            typeID = var.getStyle();
        }
        switch(typeID) {
            case NONE:
                item = type.getDataItemByName("horsestyle", 0);
                break;
            case BLACK_DOTS:
                item = type.getDataItemByName("horsestyle", 1);
                break;
            case WHITE_DOTS:
                item = type.getDataItemByName("horsestyle", 2);
                break;
            case WHITEFIELD:
                item = type.getDataItemByName("horsestyle", 3);
                break;
            case WHITE:
                item = type.getDataItemByName("horsestyle", 4);
                break;
        }
    }
    return item;
}
Also used : HorseStyleType(simplepets.brainsynder.wrapper.HorseStyleType) ItemBuilder(simple.brainsynder.api.ItemBuilder) IEntityHorsePet(simplepets.brainsynder.api.entity.passive.IEntityHorsePet)

Aggregations

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