-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAbleSwimming.js
33 lines (32 loc) · 1.27 KB
/
AbleSwimming.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
function modTick()
{
if(Entity.isSneaking(getPlayerEnt())==true&&getTile(getPlayerX()-1,getPlayerY()-1,getPlayerZ())==9)
{
Level.addParticle(ParticleType.bubble,getPlayerX(),getPlayerY(),getPlayerZ(),0,0,0,15);
Level.addParticle(ParticleType.bubble,getPlayerX(),getPlayerY(),getPlayerZ(),0,0,0,15);
Level.addParticle(ParticleType.bubble,getPlayerX(),getPlayerY(),getPlayerZ(),0,0,0,15);
Level.addParticle(ParticleType.bubble,getPlayerX(),getPlayerY()+1,getPlayerZ(),0,0,0,15);
Level.addParticle(ParticleType.bubble,getPlayerX(),getPlayerY()+1,getPlayerZ(),0,0,0,15);
Level.addParticle(ParticleType.bubble,getPlayerX(),getPlayerY()+1,getPlayerZ(),0,0,0,15);
Entity.addEffect(getPlayerEnt(),MobEffect.waterBreathing,20,0,false,true);
Entity.addEffect(getPlayerEnt(),MobEffect.nightVision,20,0,false,true);
px = getPlayerX();
py=getPlayerY();
pz=getPlayerZ();
pe=getPlayerEnt();
yaw=getYaw();
pitch=getPitch();
sin=-Math.sin(yaw/180*Math.PI);
cos=Math.cos(yaw/180*Math.PI);
tan=-Math.sin(pitch/180*Math.PI);
pcos=Math.cos(pitch/180*Math.PI);
Entity.setVelX(getPlayerEnt(),0.5*sin);
Entity.setVelY(getPlayerEnt(),0.25*tan);
Entity.setVelZ(getPlayerEnt(),0.5*cos);
}
}
function newLevel()
{
clientMessage("제작자 쿠키샌드");
clientMessage("물속에서 웅크리기를 하면 수영을 합니다");
}