Search in sources :

Example 21 with ItemBuilder

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

the class Tilt method getDefaultItems.

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

Example 22 with ItemBuilder

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

the class Tilt method getItem.

@Override
public ItemBuilder getItem() {
    ItemBuilder item = type.getDataItemByName("tilt", 0);
    if (entityPet instanceof IEntityWolfPet) {
        IEntityWolfPet var = (IEntityWolfPet) entityPet;
        item.withName(item.getName().replace("%value%", String.valueOf(var.isHeadTilted())));
    }
    return item;
}
Also used : ItemBuilder(simple.brainsynder.api.ItemBuilder) IEntityWolfPet(simplepets.brainsynder.api.entity.passive.IEntityWolfPet)

Example 23 with ItemBuilder

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

the class WitherSize method getDefaultItems.

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

Example 24 with ItemBuilder

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

the class CatTilt method getItem.

@Override
public ItemBuilder getItem() {
    ItemBuilder builder = type.getDataItemByName(getTargetName(), 0);
    builder.withName(formatName(builder, (entity, name) -> {
        name = name.replace("%value%", String.valueOf(entity.isHeadUp()));
        return name;
    }));
    return builder;
}
Also used : IEntityCatPet(simplepets.brainsynder.api.entity.passive.IEntityCatPet) List(java.util.List) PetDefault(simplepets.brainsynder.pet.PetDefault) ItemBuilder(simple.brainsynder.api.ItemBuilder) IEntityPet(simplepets.brainsynder.api.entity.IEntityPet) ValueType(simplepets.brainsynder.utils.ValueType) SkullType(simple.brainsynder.utils.SkullType) MenuItemAbstract(simplepets.brainsynder.menu.menuItems.base.MenuItemAbstract) ArrayList(java.util.ArrayList) ItemBuilder(simple.brainsynder.api.ItemBuilder)

Example 25 with ItemBuilder

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

the class FoxColor method getItem.

@Override
public ItemBuilder getItem() {
    ItemBuilder item = type.getDataItemByName(getTargetName(), 0);
    if (entityPet instanceof IEntityFoxPet) {
        IEntityFoxPet var = (IEntityFoxPet) entityPet;
        item = type.getDataItemByName(getTargetName(), var.getFoxType().ordinal());
    }
    return item;
}
Also used : IEntityFoxPet(simplepets.brainsynder.api.entity.passive.IEntityFoxPet) ItemBuilder(simple.brainsynder.api.ItemBuilder)

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