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.watch(16, new Byte((byte) 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));
}
}
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));
}
}
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));
}
}
use of de.Keyle.MyPet.api.entity.EntitySize in project MyPet by xXKeyleXx.
the class EntityMyPet method a.
// Obfuscated Methods -------------------------------------------------------------------------------------------
@Override
public net.minecraft.server.v1_16_R1.EntitySize a(EntityPose entitypose) {
EntitySize es = this.getClass().getAnnotation(EntitySize.class);
if (es != null) {
float width = es.width();
float height = java.lang.Float.isNaN(es.height()) ? width : es.height();
return new net.minecraft.server.v1_16_R1.EntitySize(width, height, false);
}
return super.a(entitypose);
}
use of de.Keyle.MyPet.api.entity.EntitySize in project MyPet by xXKeyleXx.
the class EntityMySlime method getDimensions.
@Override
public net.minecraft.world.entity.EntityDimensions getDimensions(Pose entitypose) {
EntitySize es = this.getClass().getAnnotation(EntitySize.class);
if (es != null) {
int size = Math.max(1, getMyPet().getSize());
float width = es.width();
float height = Float.isNaN(es.height()) ? width : es.height();
return new net.minecraft.world.entity.EntityDimensions(width * size, height * size, false);
}
return super.getDimensions(entitypose);
}
Aggregations