Search in sources :

Example 46 with ItemBuilder

use of simple.brainsynder.api.ItemBuilder in project SimplePets by brainsynder-Dev.

the class HorseArmor method getItem.

@Override
public ItemBuilder getItem() {
    ItemBuilder item = null;
    if (entityPet instanceof IEntityHorsePet) {
        IEntityHorsePet var = (IEntityHorsePet) entityPet;
        int typeID = 0;
        if (var.getArmor() != null) {
            typeID = var.getArmor().getId();
        }
        switch(typeID) {
            case 0:
                item = type.getDataItemByName("horsearmor", 0);
                break;
            case 1:
                item = type.getDataItemByName("horsearmor", 1);
                break;
            case 2:
                item = type.getDataItemByName("horsearmor", 2);
                break;
            case 3:
                item = type.getDataItemByName("horsearmor", 3);
                break;
        }
    }
    return item;
}
Also used : ItemBuilder(simple.brainsynder.api.ItemBuilder) IEntityHorsePet(simplepets.brainsynder.api.entity.passive.IEntityHorsePet)

Example 47 with ItemBuilder

use of simple.brainsynder.api.ItemBuilder in project SimplePets by brainsynder-Dev.

the class HorseStyle method getDefaultItems.

@Override
public List<ItemBuilder> getDefaultItems() {
    List<ItemBuilder> items = new ArrayList<>();
    ItemBuilder item = new ItemBuilder(Utilities.fetchMaterial("LEASH", "LEAD"));
    item.withName("&6None");
    items.add(item.clone());
    item.withName("&6Black Spots");
    items.add(item.clone());
    item.withName("&6White Dots");
    items.add(item.clone());
    item.withName("&6White Field");
    items.add(item.clone());
    item.withName("&6White");
    items.add(item.clone());
    return items;
}
Also used : ItemBuilder(simple.brainsynder.api.ItemBuilder) ArrayList(java.util.ArrayList)

Example 48 with ItemBuilder

use of simple.brainsynder.api.ItemBuilder 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)

Example 49 with ItemBuilder

use of simple.brainsynder.api.ItemBuilder in project SimplePets by brainsynder-Dev.

the class LlamaColor method getDefaultItems.

@Override
public List<ItemBuilder> getDefaultItems() {
    List<ItemBuilder> items = new ArrayList<>();
    ItemBuilder item = ItemBuilder.getColored(simple.brainsynder.utils.MatType.WOOL, 4);
    item.withName("&6Creamy");
    items.add(item);
    item = ItemBuilder.getColored(simple.brainsynder.utils.MatType.WOOL, 12);
    item.withName("&6Brown");
    items.add(item);
    item = ItemBuilder.getColored(simple.brainsynder.utils.MatType.WOOL, 7);
    item.withName("&6Gray");
    items.add(item);
    item = ItemBuilder.getColored(simple.brainsynder.utils.MatType.WOOL, 0);
    item.withName("&6White");
    items.add(item);
    return items;
}
Also used : ItemBuilder(simple.brainsynder.api.ItemBuilder) ArrayList(java.util.ArrayList)

Example 50 with ItemBuilder

use of simple.brainsynder.api.ItemBuilder in project SimplePets by brainsynder-Dev.

the class Age method getDefaultItems.

@Override
public List<ItemBuilder> getDefaultItems() {
    ItemBuilder item = new ItemBuilder(Material.WHEAT);
    item.withName("&6Baby: &e%value%");
    return new ArrayList<>(Collections.singleton(item));
}
Also used : ItemBuilder(simple.brainsynder.api.ItemBuilder) ArrayList(java.util.ArrayList)

Aggregations

ItemBuilder (simple.brainsynder.api.ItemBuilder)108 ArrayList (java.util.ArrayList)65 PetDefault (simplepets.brainsynder.pet.PetDefault)13 List (java.util.List)11 IEntityPet (simplepets.brainsynder.api.entity.IEntityPet)11 MenuItemAbstract (simplepets.brainsynder.menu.menuItems.base.MenuItemAbstract)11 ValueType (simplepets.brainsynder.utils.ValueType)11 ServerVersion (simple.brainsynder.utils.ServerVersion)10 DyeColorWrapper (simplepets.brainsynder.wrapper.DyeColorWrapper)8 JSONArray (org.json.simple.JSONArray)7 IEntityPandaPet (simplepets.brainsynder.api.entity.passive.IEntityPandaPet)6 IEntityFoxPet (simplepets.brainsynder.api.entity.passive.IEntityFoxPet)5 Utilities (simplepets.brainsynder.utils.Utilities)5 ItemStack (org.bukkit.inventory.ItemStack)4 IEntityHorsePet (simplepets.brainsynder.api.entity.passive.IEntityHorsePet)3 IEntityTropicalFishPet (simplepets.brainsynder.api.entity.passive.IEntityTropicalFishPet)3 SkullType (simple.brainsynder.utils.SkullType)2 IEntityArmorStandPet (simplepets.brainsynder.api.entity.ambient.IEntityArmorStandPet)2 IEntityWitherPet (simplepets.brainsynder.api.entity.hostile.IEntityWitherPet)2 IEntityZombiePet (simplepets.brainsynder.api.entity.hostile.IEntityZombiePet)2