This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
Hello!
Im assuming that these has to do with speed:
protected void updateEntityActionState()
{
this.despawnEntity();
EntityPlayer entityplayer = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D);
if (entityplayer != null)
{
this.faceEntity(entityplayer, 10.0F, 20.0F);
}
if (this.onGround && this.slimeJumpDelay-- <= 0)
{
this.slimeJumpDelay = this.getJumpDelay();
if (entityplayer != null)
{
this.slimeJumpDelay /= 3;
}
this.isJumping = true;
if (this.makesSoundOnJump())
{
this.playSound(this.getJumpSound(), this.getSoundVolume(), ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F) * 0.8F);
}
this.moveStrafing = 1.0F - this.rand.nextFloat() * 2.0F;
this.moveForward = (float)(1 * this.getSlimeSize());
}
else
{
this.isJumping = false;
if (this.onGround)
{
this.moveStrafing = this.moveForward = 0.0F;
}
}
}
protected int getJumpDelay()
{
return this.rand.nextInt(20) + 10;
}
public void onCollideWithPlayer(EntityPlayer par1EntityPlayer)
{
if (this.canDamagePlayer())
{
int i = this.getSlimeSize();
if (this.canEntityBeSeen(par1EntityPlayer) && this.getDistanceSqToEntity(par1EntityPlayer) < 0.6D * (double)i * 0.6D * (double)i && par1EntityPlayer.attackEntityFrom(DamageSource.causeMobDamage(this), (float)this.getAttackStrength()))
{
this.playSound("mob.attack", 1.0F, (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F);
}
}
}
Hello!