001    package net.minecraft.src;
002    
003    public abstract class EntityWaterMob extends EntityCreature implements IAnimals
004    {
005        public EntityWaterMob(World par1World)
006        {
007            super(par1World);
008        }
009    
010        public boolean canBreatheUnderwater()
011        {
012            return true;
013        }
014    
015        /**
016         * Checks if the entity's current position is a valid location to spawn this entity.
017         */
018        public boolean getCanSpawnHere()
019        {
020            return this.worldObj.checkIfAABBIsClear(this.boundingBox);
021        }
022    
023        /**
024         * Get number of ticks, at least during which the living entity will be silent.
025         */
026        public int getTalkInterval()
027        {
028            return 120;
029        }
030    
031        /**
032         * Determines if an entity can be despawned, used on idle far away entities
033         */
034        protected boolean canDespawn()
035        {
036            return true;
037        }
038    
039        /**
040         * Get the experience points the entity currently has.
041         */
042        protected int getExperiencePoints(EntityPlayer par1EntityPlayer)
043        {
044            return 1 + this.worldObj.rand.nextInt(3);
045        }
046    }