Search in sources :

Example 1 with IEntityZombiePet

use of simplepets.brainsynder.api.entity.hostile.IEntityZombiePet in project SimplePets by brainsynder-Dev.

the class Shaking method getItem.

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

Example 2 with IEntityZombiePet

use of simplepets.brainsynder.api.entity.hostile.IEntityZombiePet in project SimplePets by brainsynder-Dev.

the class Arms method getItem.

@Override
public ItemBuilder getItem() {
    ItemBuilder item = type.getDataItemByName("arms", 0);
    if (entityPet instanceof IEntityZombiePet) {
        IEntityZombiePet var = (IEntityZombiePet) entityPet;
        item.withName(item.getName().replace("%value%", String.valueOf(var.isArmsRaised())));
    } else if (entityPet instanceof ISkeletonAbstract) {
        ISkeletonAbstract var = (ISkeletonAbstract) entityPet;
        item.withName(item.getName().replace("%value%", String.valueOf(var.isArmsRaised())));
    }
    return item;
}
Also used : ItemBuilder(simple.brainsynder.api.ItemBuilder) IEntityZombiePet(simplepets.brainsynder.api.entity.hostile.IEntityZombiePet) ISkeletonAbstract(simplepets.brainsynder.api.entity.misc.ISkeletonAbstract)

Example 3 with IEntityZombiePet

use of simplepets.brainsynder.api.entity.hostile.IEntityZombiePet in project SimplePets by brainsynder-Dev.

the class Arms method onLeftClick.

@Override
public void onLeftClick() {
    if (entityPet instanceof IEntityZombiePet) {
        IEntityZombiePet pet = (IEntityZombiePet) entityPet;
        pet.setArmsRaised(!pet.isArmsRaised());
    }
    if (entityPet instanceof ISkeletonAbstract) {
        ISkeletonAbstract pet = (ISkeletonAbstract) entityPet;
        pet.setArmsRaised(!pet.isArmsRaised());
    }
}
Also used : IEntityZombiePet(simplepets.brainsynder.api.entity.hostile.IEntityZombiePet) ISkeletonAbstract(simplepets.brainsynder.api.entity.misc.ISkeletonAbstract)

Aggregations

IEntityZombiePet (simplepets.brainsynder.api.entity.hostile.IEntityZombiePet)3 ItemBuilder (simple.brainsynder.api.ItemBuilder)2 ISkeletonAbstract (simplepets.brainsynder.api.entity.misc.ISkeletonAbstract)2