Search in sources :

Example 6 with EntitySize

use of de.Keyle.MyPet.api.entity.EntitySize in project MyPet by xXKeyleXx.

the class EntityMySlime method updateVisuals.

@Override
public void updateVisuals() {
    int size = Math.max(1, getMyPet().getSize());
    this.datawatcher.set(sizeWatcher, size);
    EntitySize es = EntityMySlime.class.getAnnotation(EntitySize.class);
    if (es != null) {
        this.setSize(es.width() * size, es.width() * size);
    }
    if (petPathfinderSelector != null && petPathfinderSelector.hasGoal("MeleeAttack")) {
        petPathfinderSelector.replaceGoal("MeleeAttack", new MeleeAttack(this, 0.1F, 3 + (getMyPet().getSize() * 0.51), 20));
    }
}
Also used : EntitySize(de.Keyle.MyPet.api.entity.EntitySize) MeleeAttack(de.Keyle.MyPet.compat.v1_9_R1.entity.ai.attack.MeleeAttack)

Example 7 with EntitySize

use of de.Keyle.MyPet.api.entity.EntitySize in project MyPet by xXKeyleXx.

the class EntityMySlime method updateVisuals.

@Override
public void updateVisuals() {
    int size = Math.max(1, getMyPet().getSize());
    this.datawatcher.watch(16, new Byte((byte) size));
    EntitySize es = EntityMySlime.class.getAnnotation(EntitySize.class);
    if (es != null) {
        this.setSize(es.width() * size, es.width() * size);
    }
    if (petPathfinderSelector != null && petPathfinderSelector.hasGoal("MeleeAttack")) {
        petPathfinderSelector.replaceGoal("MeleeAttack", new MeleeAttack(this, 0.1F, 3 + (getMyPet().getSize() * 0.51), 20));
    }
}
Also used : EntitySize(de.Keyle.MyPet.api.entity.EntitySize) MeleeAttack(de.Keyle.MyPet.compat.v1_8_R2.entity.ai.attack.MeleeAttack)

Example 8 with EntitySize

use of de.Keyle.MyPet.api.entity.EntitySize in project MyPet by xXKeyleXx.

the class EntityMyMagmaCube method updateVisuals.

@Override
public void updateVisuals() {
    int size = Math.max(1, getMyPet().getSize());
    this.datawatcher.set(sizeWatcher, size);
    EntitySize es = EntityMyMagmaCube.class.getAnnotation(EntitySize.class);
    if (es != null) {
        this.setSize(es.width() * size, es.width() * size);
    }
    if (petPathfinderSelector != null && petPathfinderSelector.hasGoal("MeleeAttack")) {
        petPathfinderSelector.replaceGoal("MeleeAttack", new MeleeAttack(this, 0.1F, 3 + (getMyPet().getSize() * 0.51), 20));
    }
}
Also used : EntitySize(de.Keyle.MyPet.api.entity.EntitySize) MeleeAttack(de.Keyle.MyPet.compat.v1_10_R1.entity.ai.attack.MeleeAttack)

Example 9 with EntitySize

use of de.Keyle.MyPet.api.entity.EntitySize in project MyPet by xXKeyleXx.

the class EntityMyMagmaCube method updateVisuals.

@Override
public void updateVisuals() {
    int size = Math.max(1, getMyPet().getSize());
    this.datawatcher.set(SIZE_WATCHER, size);
    EntitySize es = EntityMyMagmaCube.class.getAnnotation(EntitySize.class);
    if (es != null) {
        this.setSize(es.width() * size, es.width() * size);
    }
    if (petPathfinderSelector != null && petPathfinderSelector.hasGoal("MeleeAttack")) {
        petPathfinderSelector.replaceGoal("MeleeAttack", new MeleeAttack(this, 0.1F, 3 + (getMyPet().getSize() * 0.51), 20));
    }
}
Also used : EntitySize(de.Keyle.MyPet.api.entity.EntitySize) MeleeAttack(de.Keyle.MyPet.compat.v1_12_R1.entity.ai.attack.MeleeAttack)

Example 10 with EntitySize

use of de.Keyle.MyPet.api.entity.EntitySize in project MyPet by xXKeyleXx.

the class EntityMySlime method updateVisuals.

@Override
public void updateVisuals() {
    int size = Math.max(1, getMyPet().getSize());
    this.datawatcher.set(SIZE_WATCHER, size);
    EntitySize es = EntityMySlime.class.getAnnotation(EntitySize.class);
    if (es != null) {
        this.setSize(es.width() * size, es.width() * size);
    }
    if (petPathfinderSelector != null && petPathfinderSelector.hasGoal("MeleeAttack")) {
        petPathfinderSelector.replaceGoal("MeleeAttack", new MeleeAttack(this, 0.1F, 3 + (getMyPet().getSize() * 0.51), 20));
    }
}
Also used : EntitySize(de.Keyle.MyPet.api.entity.EntitySize) MeleeAttack(de.Keyle.MyPet.compat.v1_12_R1.entity.ai.attack.MeleeAttack)

Aggregations

EntitySize (de.Keyle.MyPet.api.entity.EntitySize)32 MeleeAttack (de.Keyle.MyPet.compat.v1_10_R1.entity.ai.attack.MeleeAttack)2 MeleeAttack (de.Keyle.MyPet.compat.v1_11_R1.entity.ai.attack.MeleeAttack)2 MeleeAttack (de.Keyle.MyPet.compat.v1_12_R1.entity.ai.attack.MeleeAttack)2 MeleeAttack (de.Keyle.MyPet.compat.v1_7_R4.entity.ai.attack.MeleeAttack)2 MeleeAttack (de.Keyle.MyPet.compat.v1_8_R1.entity.ai.attack.MeleeAttack)2 MeleeAttack (de.Keyle.MyPet.compat.v1_8_R2.entity.ai.attack.MeleeAttack)2 MeleeAttack (de.Keyle.MyPet.compat.v1_8_R3.entity.ai.attack.MeleeAttack)2 MeleeAttack (de.Keyle.MyPet.compat.v1_9_R1.entity.ai.attack.MeleeAttack)2 MeleeAttack (de.Keyle.MyPet.compat.v1_9_R2.entity.ai.attack.MeleeAttack)2