

var canpathrandomly=true;

var ep = entity.getPosition();
var ev = entity.getLookVec();
var er = entity.getRotation();
	

//--------------------------------------------------
tameRam=Model();
tameRam.texture="mob/sheep2.png";

tameRam.x=0;
tameRam.y=.9;
tameRam.z=0;
tameRam.yaw=0;
trb=tameRam.addBox("bod",-4,-3,-8,8,6,16,16,0);
tameRam.attachedTo=entity;


//--------------------------------------------
tameRamHead=Model();
tameRamHead.texture="mob/sheep2.png";
tameRamHead.x=0;
tameRamHead.y=1.15;
tameRamHead.z=.6;
tameRamHead.yaw=0;
trh=tameRamHead.addBox("head",-3,-3,-2,6,8,6,0,0);
tameRamHead.attachedTo=entity;
//----------------------------------------
hl=Model();
hl.texture="mob/sheep2.png";
hornL =hl.addBox("hornL",-5,0,-4,2,8,6,48,2);
hl.modelAttachment=tameRamHead;
//-------------------------------------------
hr=Model();
hr.texture="mob/sheep2.png";
hornR =hr.addBox("hornR",3,0,-4,2,8,6,48,2);
hr.modelAttachment=tameRamHead;
//----------------------------------
lfl=Model();
lfl.x=.175;
lfl.y=-.4;
lfl.z=.425;
lfl.yaw=0;
lfl.pitch=0;
leftfleg=lfl.addBox("leftfrontleg",-2,-8,-2,4,12,4,0,16)
lfl.modelAttachment=tameRam;
//----------------------------------
lrl=Model();
lrl.x=.175;
lrl.y=-.4;
lrl.z=-.425;
lrl.yaw=0;
lrl.pitch=0;
leftrleg=lrl.addBox("leftrearleg",-2,-8,-2,4,12,4,0,16)
lrl.modelAttachment=tameRam;
//----------------------------------
rfl=Model();
rfl.x=-.175;
rfl.y=-.4;
rfl.z=.425;
rfl.yaw=0;
rfl.pitch=0;
leftfleg=rfl.addBox("rightfrontleg",-2,-8,-2,4,12,4,0,16)
rfl.modelAttachment=tameRam;
//----------------------------------
rrl=Model();
rrl.x=-.175;
rrl.y=-.4;
rrl.z=-.425;
rrl.yaw=0;
rrl.pitch=0;
leftfleg=rrl.addBox("rightreatleg",-2,-8,-2,4,12,4,0,16)
rrl.modelAttachment=tameRam;

la=0;
legmoved=true;


function pathrandomly(){
setInterval(function pathRandomly(){
var a=Math.round(Math.random(9));
var b=Math.round(Math.random(9));
var c=Math.round(Math.random(9));

var nx=a+rp.x;
var ny=b+rp.y;
var nz=c+rp.z;

yblockA = world.getBlockID(nx,ny,nz);
entity.pathToBlock(nx,ny,nz);}
,8000);}

function AnimWalk(){
setInterval(function animWalk(){
setTimeout(function walkA(){
	lfl.pitch=35;
	rfl.pitch=-35;
	lrl.pitch=-35;
	rrl.pitch=35;
	},0);
setTimeout(function walkC(){	
	lfl.pitch=0
	rfl.pitch=0
	lrl.pitch=0
	rrl.pitch=0	
	},500)
setTimeout(function walkB(){	
	lfl.pitch=-35
	rfl.pitch=35
	lrl.pitch=35
	rrl.pitch=-35	
	},1000);
setTimeout(function walkD(){	
	lfl.pitch=0
	rfl.pitch=0
	lrl.pitch=0
	rrl.pitch=0	
	},1500)

	},1550)}