Program: 34641
Project: 34641
Buggy source:
@Override public void onUpdate(){
  lastTickPosX=posX;
  lastTickPosY=posY;
  lastTickPosZ=posZ;
  onEntityUpdate();
  if (!worldObj.isRemote) {
    for (int cycles=enhancements.contains(SpatialDashGemEnhancements.INSTANT) ? 48 : 1; cycles > 0; cycles--) {
      if (++ticks > (enhancements.contains(SpatialDashGemEnhancements.RANGE) ? 48 : 28))       setDead();
      Vec3 vecPos=Vec3.createVectorHelper(posX,posY,posZ);
      Vec3 vecPosWithMotion=Vec3.createVectorHelper(posX + motionX,posY + motionY,posZ + motionZ);
      Vec3 hitVec;
      MovingObjectPosition mop=worldObj.rayTraceBlocks(vecPos,vecPosWithMotion);
      vecPos=Vec3.createVectorHelper(posX,posY,posZ);
      if (mop != null)       hitVec=Vec3.createVectorHelper(mop.hitVec.xCoord,mop.hitVec.yCoord,mop.hitVec.zCoord);
 else       hitVec=Vec3.createVectorHelper(posX + motionX,posY + motionY,posZ + motionZ);
      Entity finalEntity=null;
      List<Entity> collisionList=worldObj.getEntitiesWithinAABBExcludingEntity(this,boundingBox.addCoord(motionX,motionY,motionZ).expand(1D,1D,1D));
      double minDist=Double.MAX_VALUE, dist;
      EntityLivingBase thrower=getThrower();
      for (      Entity e : collisionList) {
        if (e.canBeCollidedWith() && (e != thrower || ticks >= 5)) {
          AxisAlignedBB aabb=e.boundingBox.expand(0.3F,0.3F,0.3F);
          MovingObjectPosition mopTest=aabb.calculateIntercept(vecPos,hitVec);
          if (mopTest != null) {
            dist=vecPos.distanceTo(mopTest.hitVec);
            if (dist < minDist) {
              finalEntity=e;
              minDist=dist;
            }
          }
        }
      }
      if (finalEntity != null)       mop=new MovingObjectPosition(finalEntity);
      if (mop != null) {
        onImpact(mop);
        break;
      }
      posX+=motionX;
      posY+=motionY;
      posZ+=motionZ;
      setPosition(posX,posY,posZ);
    }
    PacketPipeline.sendToAllAround(this,128D,new C22EffectLine(FXType.Line.SPATIAL_DASH_MOVE,lastTickPosX,lastTickPosY,lastTickPosZ,posX,posY,posZ));
  }
}

Fixed version (ground truth):
@Override public void onUpdate(){
  lastTickPosX=posX;
  lastTickPosY=posY;
  lastTickPosZ=posZ;
  onEntityUpdate();
  if (!worldObj.isRemote) {
    for (int cycles=1; cycles > 0; cycles--) {
      if (++ticks > (28))       setDead();
      Vec3 vecPos=Vec3.createVectorHelper(posX,posY,posZ);
      Vec3 vecPosWithMotion=Vec3.createVectorHelper(posX + motionX,posY + motionY,posZ + motionZ);
      Vec3 hitVec;
      MovingObjectPosition mop=worldObj.rayTraceBlocks(vecPos,vecPosWithMotion);
      vecPos=Vec3.createVectorHelper(posX,posY,posZ);
      if (mop != null)       hitVec=Vec3.createVectorHelper(mop.hitVec.xCoord,mop.hitVec.yCoord,mop.hitVec.zCoord);
 else       hitVec=Vec3.createVectorHelper(posX + motionX,posY + motionY,posZ + motionZ);
      Entity finalEntity=null;
      List<Entity> collisionList=worldObj.getEntitiesWithinAABBExcludingEntity(this,boundingBox.addCoord(motionX,motionY,motionZ).expand(1D,1D,1D));
      double minDist=Double.MAX_VALUE, dist;
      EntityLivingBase thrower=getThrower();
      for (      Entity e : collisionList) {
        if (e.canBeCollidedWith() && (e != thrower || ticks >= 5)) {
          AxisAlignedBB aabb=e.boundingBox.expand(0.3F,0.3F,0.3F);
          MovingObjectPosition mopTest=aabb.calculateIntercept(vecPos,hitVec);
          if (mopTest != null) {
            dist=vecPos.distanceTo(mopTest.hitVec);
            if (dist < minDist) {
              finalEntity=e;
              minDist=dist;
            }
          }
        }
      }
      if (finalEntity != null)       mop=new MovingObjectPosition(finalEntity);
      if (mop != null) {
        onImpact(mop);
        break;
      }
      posX+=motionX;
      posY+=motionY;
      posZ+=motionZ;
      setPosition(posX,posY,posZ);
    }
    PacketPipeline.sendToAllAround(this,128D,new C22EffectLine(FXType.Line.SPATIAL_DASH_MOVE,lastTickPosX,lastTickPosY,lastTickPosZ,posX,posY,posZ));
  }
}