cn.nukkit.entity.passive.EntityCat Maven / Gradle / Ivy
package cn.nukkit.entity.passive;
import cn.nukkit.api.PowerNukkitOnly;
import cn.nukkit.api.Since;
import cn.nukkit.level.format.FullChunk;
import cn.nukkit.nbt.tag.CompoundTag;
public class EntityCat extends EntityWalkingAnimal {
public static final int NETWORK_ID = 75;
public EntityCat(FullChunk chunk, CompoundTag nbt) {
super(chunk, nbt);
}
@Override
public void updateMovement() {
//猫猫流线运动怎么可能会摔落造成伤害呢~
this.highestPosition = this.y;
super.updateMovement();
}
@Override
public int getNetworkId() {
return NETWORK_ID;
}
@Override
public float getWidth() {
if (this.isBaby()) {
return 0.3f;
}
return 0.6f;
}
@Override
public float getHeight() {
if (this.isBaby()) {
return 0.35f;
}
return 0.7f;
}
@Override
public void initEntity() {
this.setMaxHealth(10);
super.initEntity();
}
@PowerNukkitOnly
@Since("1.5.1.0-PN")
@Override
public String getOriginalName() {
return "Cat";
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy