Program: 169711
Project: 169711
Buggy source:
/** 
 * Called to update the entity's position/logic. 
 */
@Override public void onUpdate(){
  if (this.shengYin != null) {
    this.shengYin.update();
  }
  if (!this.worldObj.isRemote) {
    ExplosivePreDetonationEvent evt=new ExplosivePreDetonationEvent(worldObj,posX,posY,posZ,ExplosiveType.AIR,ExplosiveRegistry.get(explosiveID));
    MinecraftForge.EVENT_BUS.post(evt);
    if (evt.isCanceled()) {
      if (this.feiXingTick >= 0) {
        this.dropMissileAsItem();
      }
      this.setDead();
      return;
    }
  }
  try {
    if (this.worldObj.isRemote) {
      this.feiXingTick=this.dataWatcher.getWatchableObjectInt(16);
      int status=this.dataWatcher.getWatchableObjectInt(17);
switch (status) {
case 1:
        setNormalExplode=true;
      break;
case 2:
    setExplode=true;
  break;
}
}
 else {
this.dataWatcher.updateObject(16,feiXingTick);
}
}
 catch (Exception e) {
e.printStackTrace();
}
if (setNormalExplode) {
normalExplode();
return;
}
if (setExplode) {
explode();
return;
}
if (this.feiXingTick >= 0) {
RadarRegistry.register(this);
if (!this.worldObj.isRemote) {
if (this.missileType == MissileType.CruiseMissile || this.missileType == MissileType.LAUNCHER) {
if (this.feiXingTick == 0 && this.xiaoDanMotion != null) {
  this.xiaoDanMotion=new Vector3(this.deltaPathX / (missileFlightTime * 0.3),this.deltaPathY / (missileFlightTime * 0.3),this.deltaPathZ / (missileFlightTime * 0.3));
  this.motionX=this.xiaoDanMotion.x;
  this.motionY=this.xiaoDanMotion.y;
  this.motionZ=this.xiaoDanMotion.z;
}
this.rotationPitch=(float)(Math.atan(this.motionY / (Math.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ))) * 180 / Math.PI);
this.rotationYaw=(float)(Math.atan2(this.motionX,this.motionZ) * 180 / Math.PI);
((Explosion)ExplosiveRegistry.get(this.explosiveID)).update(this);
Block block=Block.blocksList[this.worldObj.getBlockId((int)this.posX,(int)this.posY,(int)this.posZ)];
if (this.protectionTime <= 0 && ((block != null && !(block instanceof BlockFluid)) || this.posY > 1000 || this.isCollided || this.feiXingTick > 20 * Settings.ShortRangeMissileLifetimeSeconds || (this.motionX == 0 && this.motionY == 0 && this.motionZ == 0))) {
  setExplode();
  return;
}
this.moveEntity(this.motionX,this.motionY,this.motionZ);
}
 else {
if (this.qiFeiGaoDu > 0) {
  this.motionY=SPEED * this.feiXingTick * (this.feiXingTick / 2);
  this.motionX=0;
  this.motionZ=0;
  this.qiFeiGaoDu-=this.motionY;
  this.moveEntity(this.motionX,this.motionY,this.motionZ);
  if (this.qiFeiGaoDu <= 0) {
    this.motionY=this.acceleration * (this.missileFlightTime / 2);
    this.motionX=this.deltaPathX / missileFlightTime;
    this.motionZ=this.deltaPathZ / missileFlightTime;
  }
}
 else {
  this.motionY-=this.acceleration;
  this.rotationPitch=(float)(Math.atan(this.motionY / (Math.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ))) * 180 / Math.PI);
  this.rotationYaw=(float)(Math.atan2(this.motionX,this.motionZ) * 180 / Math.PI);
  ((Explosion)ExplosiveRegistry.get(this.explosiveID)).update(this);
  this.moveEntity(this.motionX,this.motionY,this.motionZ);
  if (this.isCollided) {
    this.explode();
  }
  if (this.targetHeight > 0 && this.motionY < 0) {
    int blockBelowID=this.worldObj.getBlockId((int)this.posX,(int)this.posY - targetHeight,(int)this.posZ);
    if (blockBelowID > 0) {
      this.targetHeight=0;
      this.explode();
    }
  }
}
}
}
 else {
this.rotationPitch=(float)(Math.atan(this.motionY / (Math.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ))) * 180 / Math.PI);
this.rotationYaw=(float)(Math.atan2(this.motionX,this.motionZ) * 180 / Math.PI);
}
this.lastTickPosX=this.posX;
this.lastTickPosY=this.posY;
this.lastTickPosZ=this.posZ;
this.spawnMissileSmoke();
this.protectionTime--;
this.feiXingTick++;
}
 else if (this.missileType != MissileType.LAUNCHER) {
ILauncherContainer launcher=this.getLauncher();
if (launcher != null) {
launcher.setContainingMissile(this);
if (launcher instanceof TileCruiseLauncher) {
this.missileType=MissileType.CruiseMissile;
this.noClip=true;
if (this.worldObj.isRemote) {
  this.rotationYaw=-((TileCruiseLauncher)launcher).rotationYaw + 90;
  this.rotationPitch=((TileCruiseLauncher)launcher).rotationPitch;
}
this.posY=((TileCruiseLauncher)launcher).yCoord + 1;
}
}
 else {
this.setDead();
}
}
super.onUpdate();
}

Fixed version (ground truth):
/** 
 * Called to update the entity's position/logic. 
 */
@Override public void onUpdate(){
  if (this.shengYin != null) {
    this.shengYin.update();
  }
  if (!this.worldObj.isRemote) {
    ExplosivePreDetonationEvent evt=new ExplosivePreDetonationEvent(worldObj,posX,posY,posZ,ExplosiveType.AIR,ExplosiveRegistry.get(explosiveID));
    MinecraftForge.EVENT_BUS.post(evt);
    if (evt.isCanceled()) {
      if (this.feiXingTick >= 0) {
        this.dropMissileAsItem();
      }
      this.setDead();
      return;
    }
  }
  try {
    if (this.worldObj.isRemote) {
      this.feiXingTick=this.dataWatcher.getWatchableObjectInt(16);
      int status=this.dataWatcher.getWatchableObjectInt(17);
switch (status) {
case 1:
        setNormalExplode=true;
      break;
case 2:
    setExplode=true;
  break;
}
}
 else {
this.dataWatcher.updateObject(16,feiXingTick);
}
}
 catch (Exception e) {
e.printStackTrace();
}
if (setNormalExplode) {
normalExplode();
return;
}
if (setExplode) {
explode();
return;
}
if (this.feiXingTick >= 0) {
RadarRegistry.register(this);
if (!this.worldObj.isRemote) {
if (this.missileType == MissileType.CruiseMissile || this.missileType == MissileType.LAUNCHER) {
if (this.feiXingTick == 0 && this.xiaoDanMotion != null) {
  this.xiaoDanMotion=new Vector3(this.deltaPathX / (missileFlightTime * 0.3),this.deltaPathY / (missileFlightTime * 0.3),this.deltaPathZ / (missileFlightTime * 0.3));
  this.motionX=this.xiaoDanMotion.x();
  this.motionY=this.xiaoDanMotion.y();
  this.motionZ=this.xiaoDanMotion.z();
}
this.rotationPitch=(float)(Math.atan(this.motionY / (Math.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ))) * 180 / Math.PI);
this.rotationYaw=(float)(Math.atan2(this.motionX,this.motionZ) * 180 / Math.PI);
((Explosion)ExplosiveRegistry.get(this.explosiveID)).update(this);
Block block=this.worldObj.getBlock((int)this.posX,(int)this.posY,(int)this.posZ);
if (this.protectionTime <= 0 && ((block != null && !(block instanceof IFluidBlock)) || this.posY > 1000 || this.isCollided || this.feiXingTick > 20 * Settings.ShortRangeMissileLifetimeSeconds || (this.motionX == 0 && this.motionY == 0 && this.motionZ == 0))) {
  setExplode();
  return;
}
this.moveEntity(this.motionX,this.motionY,this.motionZ);
}
 else {
if (this.qiFeiGaoDu > 0) {
  this.motionY=SPEED * this.feiXingTick * (this.feiXingTick / 2);
  this.motionX=0;
  this.motionZ=0;
  this.qiFeiGaoDu-=this.motionY;
  this.moveEntity(this.motionX,this.motionY,this.motionZ);
  if (this.qiFeiGaoDu <= 0) {
    this.motionY=this.acceleration * (this.missileFlightTime / 2);
    this.motionX=this.deltaPathX / missileFlightTime;
    this.motionZ=this.deltaPathZ / missileFlightTime;
  }
}
 else {
  this.motionY-=this.acceleration;
  this.rotationPitch=(float)(Math.atan(this.motionY / (Math.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ))) * 180 / Math.PI);
  this.rotationYaw=(float)(Math.atan2(this.motionX,this.motionZ) * 180 / Math.PI);
  ((Explosion)ExplosiveRegistry.get(this.explosiveID)).update(this);
  this.moveEntity(this.motionX,this.motionY,this.motionZ);
  if (this.isCollided) {
    this.explode();
  }
  if (this.targetHeight > 0 && this.motionY < 0) {
    Block blockBelow=worldObj.getBlock((int)this.posX,(int)this.posY - targetHeight,(int)this.posZ);
    if (blockBelow != null && !blockBelow.isAir(worldObj,(int)this.posX,(int)this.posY - targetHeight,(int)this.posZ)) {
      this.targetHeight=0;
      this.explode();
    }
  }
}
}
}
 else {
this.rotationPitch=(float)(Math.atan(this.motionY / (Math.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ))) * 180 / Math.PI);
this.rotationYaw=(float)(Math.atan2(this.motionX,this.motionZ) * 180 / Math.PI);
}
this.lastTickPosX=this.posX;
this.lastTickPosY=this.posY;
this.lastTickPosZ=this.posZ;
this.spawnMissileSmoke();
this.protectionTime--;
this.feiXingTick++;
}
 else if (this.missileType != MissileType.LAUNCHER) {
ILauncherContainer launcher=this.getLauncher();
if (launcher != null) {
launcher.setContainingMissile(this);
if (launcher instanceof TileCruiseLauncher) {
this.missileType=MissileType.CruiseMissile;
this.noClip=true;
if (this.worldObj.isRemote) {
  this.rotationYaw=-((TileCruiseLauncher)launcher).rotationYaw + 90;
  this.rotationPitch=((TileCruiseLauncher)launcher).rotationPitch;
}
this.posY=((TileCruiseLauncher)launcher).yCoord + 1;
}
}
 else {
this.setDead();
}
}
super.onUpdate();
}