Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package name.ModId.Entity;
- import net.minecraft.block.Block;
- import net.minecraft.entity.Entity;
- import net.minecraft.entity.SharedMonsterAttributes;
- import net.minecraft.entity.monster.EntityMob;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.world.World;
- public class EntityMob extends EntityMob{
- public EntityMob(World par1World) {
- super(par1World);
- }
- protected String getLivingSound() {
- return "mob.pig.say";
- }
- protected String getDeathSound() {
- return "mob.pig.death";
- }
- protected String getHurtSound() {
- return "mob.pig.say";
- }
- protected void func_145780_a(int p_145780_1_, int p_145780_2_, int p_145780_3_, Block p_145780_4_)
- {
- this.playSound("mob.pig.step", 0.15F, 1.0F);
- }
- protected Entity findPlayerToAttack() {
- EntityPlayer entityplayer = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D);
- return entityplayer != null && this.canEntityBeSeen(entityplayer) ? entityplayer : null;
- }
- public void applyEntityAttributes() {
- super.applyEntityAttributes();
- //Max Health = default 20.0D - Min 0.0D - Max Double.MAX_VALUE
- this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(10.0D);
- // Follow Range - default 32.0D - Min 0.0D - Max 2048.0D
- this.getEntityAttribute(SharedMonsterAttributes.followRange).setBaseValue(32.0D);
- // KnockBack Resistance - default 0.0D - Min 0.0D - Max 1.0D
- this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(0.0D);
- // Movement Speed - defualt 0.699D- Min 0.0D - Max Double.MAX_VALUE
- this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.70D);
- // Attack Damage - default 2.0D - Min 0.0D - Max Double.MAX_VALUE
- this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(24.0D);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement